blob: 472f7541037c6edece231a10b15c46a12455f760 [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Matteo Scandolof9d43412021-01-12 11:11:34 -08003 * Copyright 2020-present Open Networking Foundation
4
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07005 * 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
Matteo Scandolof9d43412021-01-12 11:11:34 -08008
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07009 * http://www.apache.org/licenses/LICENSE-2.0
Matteo Scandolof9d43412021-01-12 11:11:34 -080010
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070011 * 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 */
Girish Gowdra161d27a2021-05-05 12:01:44 -070017/*
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070018 * 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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080023
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070024package generated
25
26import "github.com/deckarep/golang-set"
27
Matteo Scandolof9d43412021-01-12 11:11:34 -080028// RtpPseudowireParametersClassID is the 16-bit ID for the OMCI
29// Managed entity RTP pseudowire parameters
Andrea Campanella10426e22021-10-15 17:58:04 +020030const RtpPseudowireParametersClassID = ClassID(283) // 0x011b
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
32var rtppseudowireparametersBME *ManagedEntityDefinition
33
Andrea Campanella10426e22021-10-15 17:58:04 +020034// RtpPseudowireParameters (Class ID: #283 / 0x011b)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070035// 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
Andrea Campanella10426e22021-10-15 17:58:04 +020046// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070048//
49// Clock Reference
Andrea Campanella10426e22021-10-15 17:58:04 +020050// This attribute specifies the frequency of the common timing reference, in multiples of 8 kHz.
51// (R,-W, setbycreate) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070052//
53// Rtp Timestamp Mode
Andrea Campanella10426e22021-10-15 17:58:04 +020054// 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//
Matteo Scandolof9d43412021-01-12 11:11:34 -080064// (R,-W, setbycreate) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070065//
66// Ptype
Andrea Campanella10426e22021-10-15 17:58:04 +020067// 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)
Matteo Scandolof9d43412021-01-12 11:11:34 -080071// (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070072//
73// Ssrc
Andrea Campanella10426e22021-10-15 17:58:04 +020074// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070078//
79// Expected Ptype
Andrea Campanella10426e22021-10-15 17:58:04 +020080// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070085//
86// Expected Ssrc
Andrea Campanella10426e22021-10-15 17:58:04 +020087// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070092//
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 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -0800108 AllowedAttributeMask: 0xfc00,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700109 AttributeDefinitions: AttributeDefinitionMap{
Matteo Scandolof9d43412021-01-12 11:11:34 -0800110 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),
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700117 },
Matteo Scandolof9d43412021-01-12 11:11:34 -0800118 Access: CreatedByOlt,
119 Support: UnknownSupport,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700120 }
121}
122
Matteo Scandolof9d43412021-01-12 11:11:34 -0800123// NewRtpPseudowireParameters (class ID 283) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700124// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -0800125// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700126func NewRtpPseudowireParameters(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800127 return NewManagedEntity(*rtppseudowireparametersBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700128}