blob: 3b0f568e51542204ebcc3d6c97c8f9c9c575af48 [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
30const RtpPseudowireParametersClassID ClassID = ClassID(283)
31
32var rtppseudowireparametersBME *ManagedEntityDefinition
33
34// RtpPseudowireParameters (class ID #283)
35// 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
46// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
47// identical ID, this ME is implicitly linked to an instance of the pseudowire TP ME. (R,
48// setbycreate) (mandatory) (2-bytes)
49//
50// Clock Reference
51// Clock reference: This attribute specifies the frequency of the common timing reference, in
52// multiples of 8 kHz. (R,-W, setbycreate) (mandatory) (2-bytes)
53//
54// Rtp Timestamp Mode
55// (R,-W, setbycreate) (mandatory) (1-byte)
56//
57// Ptype
58// PTYPE: This attribute specifies the RTP payload type in the TDM to the PSN direction. It
59// comprises two 1-byte values. The first is for the payload channel, the second, for the optional
60// separate signalling channel. Assignable PTYPEs lie in the dynamic range 96..127. If signalling
61// is not transported in its own channel, the second value should be set to 0. (R,-W, setbycreate)
62// (mandatory) (2-bytes)
63//
64// Ssrc
65// SSRC: This attribute specifies the RTP synchronization source in the TDM to the PSN direction.
66// It comprises two 4-byte values. The first is for the payload channel, the second, for the
67// optional separate signalling channel. If signalling is not transported in its own channel, the
68// second value should be set to 0. (R,-W, setbycreate) (mandatory) (8-bytes)
69//
70// Expected Ptype
71// Expected PTYPE: This attribute specifies the RTP payload type in the PSN to the TDM direction.
72// The received payload type may be used to detect malformed packets. It comprises two 1-byte
73// values. The first is for the payload channel, the second, for the optional separate signalling
74// channel. To disable either or both of the check functions, set the corresponding value to its
75// default value 0. (R,-W, setbycreate) (optional) (2-bytes)
76//
77// Expected Ssrc
78// Expected SSRC: This attribute specifies the RTP synchronization source in the PSN to the TDM
79// direction. The received SSRC may be used to detect misconnection (stray packets). It comprises
80// two 4-byte values. The first is for the payload channel, the second, for the optional separate
81// signalling channel. To disable either or both of the check functions, set the corresponding
82// value to its default value 0. (R,-W, setbycreate) (optional) (8-bytes)
83//
84type RtpPseudowireParameters struct {
85 ManagedEntityDefinition
86 Attributes AttributeValueMap
87}
88
89func init() {
90 rtppseudowireparametersBME = &ManagedEntityDefinition{
91 Name: "RtpPseudowireParameters",
92 ClassID: 283,
93 MessageTypes: mapset.NewSetWith(
94 Create,
95 Delete,
96 Get,
97 Set,
98 ),
99 AllowedAttributeMask: 0xfc00,
100 AttributeDefinitions: AttributeDefinitionMap{
101 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
102 1: Uint16Field("ClockReference", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
103 2: ByteField("RtpTimestampMode", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
104 3: Uint16Field("Ptype", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
105 4: Uint64Field("Ssrc", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
106 5: Uint16Field("ExpectedPtype", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
107 6: Uint64Field("ExpectedSsrc", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 6),
108 },
109 Access: CreatedByOlt,
110 Support: UnknownSupport,
111 }
112}
113
114// NewRtpPseudowireParameters (class ID 283) creates the basic
115// Managed Entity definition that is used to validate an ME of this type that
116// is received from or transmitted to the OMCC.
117func NewRtpPseudowireParameters(params ...ParamData) (*ManagedEntity, OmciErrors) {
118 return NewManagedEntity(*rtppseudowireparametersBME, params...)
119}