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