blob: e089f91b5fe51635785acda03cfb9ebf40d0b231 [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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080017 /*
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
30const RtpPseudowireParametersClassID ClassID = ClassID(283)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
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,
Matteo Scandolof9d43412021-01-12 11:11:34 -080048// setbycreate) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070049//
50// Clock Reference
51// Clock reference: This attribute specifies the frequency of the common timing reference, in
Matteo Scandolof9d43412021-01-12 11:11:34 -080052// multiples of 8 kHz. (R,-W, setbycreate) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070053//
54// Rtp Timestamp Mode
Matteo Scandolof9d43412021-01-12 11:11:34 -080055// (R,-W, setbycreate) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070056//
57// Ptype
58// PTYPE: This attribute specifies the RTP payload type in the TDM to the PSN direction. It
Matteo Scandolof9d43412021-01-12 11:11:34 -080059// comprises two 1-byte values. The first is for the payload channel, the second, for the optional
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070060// separate signalling channel. Assignable PTYPEs lie in the dynamic range 96..127. If signalling
Matteo Scandolof9d43412021-01-12 11:11:34 -080061// is not transported in its own channel, the second value should be set to 0. (R,-W, setbycreate)
62// (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070063//
64// Ssrc
65// SSRC: This attribute specifies the RTP synchronization source in the TDM to the PSN direction.
Matteo Scandolof9d43412021-01-12 11:11:34 -080066// It comprises two 4-byte values. The first is for the payload channel, the second, for the
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070067// optional separate signalling channel. If signalling is not transported in its own channel, the
Matteo Scandolof9d43412021-01-12 11:11:34 -080068// second value should be set to 0. (R,-W, setbycreate) (mandatory) (8-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070069//
70// Expected Ptype
71// Expected PTYPE: This attribute specifies the RTP payload type in the PSN to the TDM direction.
Matteo Scandolof9d43412021-01-12 11:11:34 -080072// The received payload type may be used to detect malformed packets. It comprises two 1-byte
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070073// 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
Matteo Scandolof9d43412021-01-12 11:11:34 -080075// default value 0. (R,-W, setbycreate) (optional) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070076//
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
Matteo Scandolof9d43412021-01-12 11:11:34 -080080// two 4-byte values. The first is for the payload channel, the second, for the optional separate
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070081// signalling channel. To disable either or both of the check functions, set the corresponding
Matteo Scandolof9d43412021-01-12 11:11:34 -080082// value to its default value 0. (R,-W, setbycreate) (optional) (8-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070083//
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 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -080099 AllowedAttributeMask: 0xfc00,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700100 AttributeDefinitions: AttributeDefinitionMap{
Matteo Scandolof9d43412021-01-12 11:11:34 -0800101 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),
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700108 },
Matteo Scandolof9d43412021-01-12 11:11:34 -0800109 Access: CreatedByOlt,
110 Support: UnknownSupport,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700111 }
112}
113
Matteo Scandolof9d43412021-01-12 11:11:34 -0800114// NewRtpPseudowireParameters (class ID 283) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700115// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -0800116// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700117func NewRtpPseudowireParameters(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800118 return NewManagedEntity(*rtppseudowireparametersBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700119}