blob: 1a69261abef29c600a0488400fb8a46f64310b41 [file] [log] [blame]
Holger Hildebrandtfa074992020-03-27 15:42:06 +00001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00004 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00005 * 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
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00008 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +000011 * 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. Bainbridged80007b2021-04-12 12:22:29 +000017/*
Holger Hildebrandtfa074992020-03-27 15:42:06 +000018 * 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
mpagenko836a1fd2021-11-01 16:12:42 +000030const RtpPseudowireParametersClassID = ClassID(283) // 0x011b
Holger Hildebrandtfa074992020-03-27 15:42:06 +000031
32var rtppseudowireparametersBME *ManagedEntityDefinition
33
mpagenko836a1fd2021-11-01 16:12:42 +000034// RtpPseudowireParameters (Class ID: #283 / 0x011b)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000035// 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
mpagenko836a1fd2021-11-01 16:12:42 +000046// 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)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000048//
49// Clock Reference
mpagenko836a1fd2021-11-01 16:12:42 +000050// This attribute specifies the frequency of the common timing reference, in multiples of 8 kHz.
51// (R,-W, setbycreate) (mandatory) (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000052//
53// Rtp Timestamp Mode
mpagenko836a1fd2021-11-01 16:12:42 +000054// 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//
Holger Hildebrandtfa074992020-03-27 15:42:06 +000064// (R,-W, setbycreate) (mandatory) (1-byte)
65//
66// Ptype
mpagenko836a1fd2021-11-01 16:12:42 +000067// 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)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000071// (mandatory) (2-bytes)
72//
73// Ssrc
mpagenko836a1fd2021-11-01 16:12:42 +000074// 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)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000078//
79// Expected Ptype
mpagenko836a1fd2021-11-01 16:12:42 +000080// 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)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000085//
86// Expected Ssrc
mpagenko836a1fd2021-11-01 16:12:42 +000087// 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)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000092//
93type RtpPseudowireParameters struct {
94 ManagedEntityDefinition
95 Attributes AttributeValueMap
96}
97
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000098// Attribute name constants
99
100const RtpPseudowireParameters_ClockReference = "ClockReference"
101const RtpPseudowireParameters_RtpTimestampMode = "RtpTimestampMode"
102const RtpPseudowireParameters_Ptype = "Ptype"
103const RtpPseudowireParameters_Ssrc = "Ssrc"
104const RtpPseudowireParameters_ExpectedPtype = "ExpectedPtype"
105const RtpPseudowireParameters_ExpectedSsrc = "ExpectedSsrc"
106
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000107func init() {
108 rtppseudowireparametersBME = &ManagedEntityDefinition{
109 Name: "RtpPseudowireParameters",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000110 ClassID: RtpPseudowireParametersClassID,
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000111 MessageTypes: mapset.NewSetWith(
112 Create,
113 Delete,
114 Get,
115 Set,
116 ),
117 AllowedAttributeMask: 0xfc00,
118 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000119 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
120 1: Uint16Field(RtpPseudowireParameters_ClockReference, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
121 2: ByteField(RtpPseudowireParameters_RtpTimestampMode, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
122 3: Uint16Field(RtpPseudowireParameters_Ptype, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
123 4: Uint64Field(RtpPseudowireParameters_Ssrc, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
124 5: Uint16Field(RtpPseudowireParameters_ExpectedPtype, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
125 6: Uint64Field(RtpPseudowireParameters_ExpectedSsrc, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 6),
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000126 },
127 Access: CreatedByOlt,
128 Support: UnknownSupport,
129 }
130}
131
132// NewRtpPseudowireParameters (class ID 283) creates the basic
133// Managed Entity definition that is used to validate an ME of this type that
134// is received from or transmitted to the OMCC.
135func NewRtpPseudowireParameters(params ...ParamData) (*ManagedEntity, OmciErrors) {
136 return NewManagedEntity(*rtppseudowireparametersBME, params...)
137}