blob: 472f7541037c6edece231a10b15c46a12455f760 [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Andrea Campanella7167ebb2020-02-24 09:56:38 +01003 * Copyright 2020-present Open Networking Foundation
4
Chip Boling6e27b352020-02-14 09:10:01 -06005 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
Andrea Campanella7167ebb2020-02-24 09:56:38 +01008
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Andrea Campanella7167ebb2020-02-24 09:56:38 +010010
Chip Boling6e27b352020-02-14 09:10:01 -060011 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
David K. Bainbridgeadf422d2021-04-09 16:06:41 +000017/*
Chip Boling6e27b352020-02-14 09:10:01 -060018 * NOTE: This file was generated, manual edits will be overwritten!
19 *
20 * Generated by 'goCodeGenerator.py':
21 * https://github.com/cboling/OMCI-parser/README.md
22 */
23
24package generated
25
26import "github.com/deckarep/golang-set"
27
28// RtpPseudowireParametersClassID is the 16-bit ID for the OMCI
29// Managed entity RTP pseudowire parameters
Chip Boling610117d2021-09-09 11:24:34 -050030const RtpPseudowireParametersClassID = ClassID(283) // 0x011b
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var rtppseudowireparametersBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// RtpPseudowireParameters (Class ID: #283 / 0x011b)
Chip Boling6e27b352020-02-14 09:10:01 -060035// If a pseudowire service uses RTP, the RTP pseudowire parameters ME provides configuration
36// information for the RTP layer. Instances of this ME are created and deleted by the OLT. The use
37// of RTP on a pseudowire is optional, and is determined by the existence of the RTP pseudowire
38// parameters ME.
39//
40// Relationships
41// An instance of the RTP pseudowire parameters ME may exist for each pseudowire TP ME, to which it
42// is implicitly bound by a common ME ID.
43//
44// Attributes
45// Managed Entity Id
Chip Boling610117d2021-09-09 11:24:34 -050046// This attribute uniquely identifies each instance of this ME. Through an identical ID, this ME is
47// implicitly linked to an instance of the pseudowire TP ME. (R, setbycreate) (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060048//
49// Clock Reference
Chip Boling610117d2021-09-09 11:24:34 -050050// This attribute specifies the frequency of the common timing reference, in multiples of 8 kHz.
51// (R,-W, setbycreate) (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060052//
53// Rtp Timestamp Mode
Chip Boling610117d2021-09-09 11:24:34 -050054// This attribute determines the mode in which RTP timestamps are generated in the TDM to the PSN
55// direction.
56//
57// 0 Unknown or not applicable.
58//
59// 1 Absolute. Timestamps are based on the timing of the incoming TDM signal.
60//
61// 2 Differential. Timestamps are based on the ONU's reference clock, which is understood to be
62// stratum-traceable along with the reference clock at the far end.
63//
Chip Boling6e27b352020-02-14 09:10:01 -060064// (R,-W, setbycreate) (mandatory) (1-byte)
65//
66// Ptype
Chip Boling610117d2021-09-09 11:24:34 -050067// This attribute specifies the RTP payload type in the TDM to the PSN direction. It comprises two
68// 1-byte values. The first is for the payload channel, the second, for the optional separate
69// signalling channel. Assignable PTYPEs lie in the dynamic range 96..127. If signalling is not
70// transported in its own channel, the second value should be set to 0. (R,-W, setbycreate)
Chip Boling6e27b352020-02-14 09:10:01 -060071// (mandatory) (2-bytes)
72//
73// Ssrc
Chip Boling610117d2021-09-09 11:24:34 -050074// This attribute specifies the RTP synchronization source in the TDM to the PSN direction. It
75// comprises two 4-byte values. The first is for the payload channel, the second, for the optional
76// separate signalling channel. If signalling is not transported in its own channel, the second
77// value should be set to 0. (R,-W, setbycreate) (mandatory) (8-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060078//
79// Expected Ptype
Chip Boling610117d2021-09-09 11:24:34 -050080// This attribute specifies the RTP payload type in the PSN to the TDM direction. The received
81// payload type may be used to detect malformed packets. It comprises two 1-byte values. The first
82// is for the payload channel, the second, for the optional separate signalling channel. To disable
83// either or both of the check functions, set the corresponding value to its default value 0.
84// (R,-W, setbycreate) (optional) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060085//
86// Expected Ssrc
Chip Boling610117d2021-09-09 11:24:34 -050087// This attribute specifies the RTP synchronization source in the PSN to the TDM direction. The
88// received SSRC may be used to detect misconnection (stray packets). It comprises two 4-byte
89// values. The first is for the payload channel, the second, for the optional separate signalling
90// channel. To disable either or both of the check functions, set the corresponding value to its
91// default value 0. (R,-W, setbycreate) (optional) (8-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060092//
93type RtpPseudowireParameters struct {
94 ManagedEntityDefinition
95 Attributes AttributeValueMap
96}
97
98func init() {
99 rtppseudowireparametersBME = &ManagedEntityDefinition{
100 Name: "RtpPseudowireParameters",
101 ClassID: 283,
102 MessageTypes: mapset.NewSetWith(
103 Create,
104 Delete,
105 Get,
106 Set,
107 ),
108 AllowedAttributeMask: 0xfc00,
109 AttributeDefinitions: AttributeDefinitionMap{
110 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
111 1: Uint16Field("ClockReference", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
112 2: ByteField("RtpTimestampMode", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
113 3: Uint16Field("Ptype", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
114 4: Uint64Field("Ssrc", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
115 5: Uint16Field("ExpectedPtype", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
116 6: Uint64Field("ExpectedSsrc", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 6),
117 },
118 Access: CreatedByOlt,
119 Support: UnknownSupport,
120 }
121}
122
123// NewRtpPseudowireParameters (class ID 283) creates the basic
124// Managed Entity definition that is used to validate an ME of this type that
125// is received from or transmitted to the OMCC.
126func NewRtpPseudowireParameters(params ...ParamData) (*ManagedEntity, OmciErrors) {
127 return NewManagedEntity(*rtppseudowireparametersBME, params...)
128}