blob: 77728a63dda5b542ccef2450fe11dcd13721ebf0 [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
Chip Boling8cdd6392022-01-27 08:43:37 -06004 *
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
Chip Boling8cdd6392022-01-27 08:43:37 -06008 *
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Chip Boling8cdd6392022-01-27 08:43:37 -060010 *
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// VoipMediaProfileClassID is the 16-bit ID for the OMCI
29// Managed entity VoIP media profile
Chip Boling610117d2021-09-09 11:24:34 -050030const VoipMediaProfileClassID = ClassID(142) // 0x008e
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var voipmediaprofileBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// VoipMediaProfile (Class ID: #142 / 0x008e)
Chip Boling6e27b352020-02-14 09:10:01 -060035// The VoIP media profile ME contains settings that apply to VoIP voice encoding. This entity is
36// conditionally required for ONUs that offer VoIP services. If a non-OMCI interface is used to
37// manage VoIP signalling, this ME is unnecessary.
38//
39// An instance of this ME is created and deleted by the OLT. A VoIP media profile is needed for
40// each unique set of profile attributes.
41//
42// Relationships
43// An instance of this ME may be associated with one or more VoIP voice CTP MEs.
44//
45// Attributes
46// Managed Entity Id
Chip Boling610117d2021-09-09 11:24:34 -050047// This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory)
48// (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060049//
50// Fax Mode
Chip Boling610117d2021-09-09 11:24:34 -050051// Selects the fax mode; values are as follows.
52//
53// 0 Passthru
54//
55// 1 ITU-T T.38
56//
Chip Boling6e27b352020-02-14 09:10:01 -060057// (R,-W, setbycreate) (mandatory) (1-byte)
58//
59// Voice Service Profile Pointer
Chip Boling610117d2021-09-09 11:24:34 -050060// Pointer to a voice service profile, which defines parameters such as jitter buffering and echo
61// cancellation. (R,-W, setbycreate) (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060062//
63// Codec Selection 1st Order
Chip Boling610117d2021-09-09 11:24:34 -050064// Codec selection (1st order): This attribute specifies codec selection as defined by [IETF-
65// RFC-3551].
66//
Chip Boling6e27b352020-02-14 09:10:01 -060067// (R,-W, set-by-create) (mandatory) (1-byte)
68//
69// Packet Period Selection 1st Order
70// Packet period selection (1st order): This attribute specifies the packet period selection
71// interval in milliseconds. The recommended default value is 10-ms. Valid values are 10..30-ms.
72// (R,-W, set-by-create) (mandatory) (1-byte)
73//
74// Silence Suppression 1st Order
75// Silence suppression (1st order): This attribute specifies whether silence suppression is on or
76// off. Valid values are 0-= off and 1-= on. (R,-W, set-by-create) (mandatory) (1-byte)
77//
Chip Boling610117d2021-09-09 11:24:34 -050078// Three more groups of three attributes are defined, with definitions identical to the preceding
79// three:
80//
Chip Boling6e27b352020-02-14 09:10:01 -060081// Codec Selection 2nd Order
82// Codec selection (2nd order): (R,-W, setbycreate) (mandatory) (1-byte)
83//
84// Packet Period Selection 2nd Order
85// Packet period selection (2nd order): (R,-W, setbycreate) (mandatory) (1-byte)
86//
87// Silence Suppression 2nd Order
88// Silence suppression (2nd order): (R,-W, setbycreate) (mandatory) (1-byte)
89//
90// Codec Selection 3rd Order
91// Codec selection (3rd order): (R,-W, setbycreate) (mandatory) (1-byte)
92//
93// Packet Period Selection 3rd Order
94// Packet period selection (3rd order): (R,-W, setbycreate) (mandatory) (1-byte)
95//
96// Silence Suppression 3rd Order
97// Silence suppression (3rd order): (R,-W, setbycreate) (mandatory) (1-byte)
98//
99// Codec Selection 4th Order
100// Codec selection (4th order): (R,-W, setbycreate) (mandatory) (1-byte)
101//
102// Packet Period Selection 4th Order
103// Packet period selection (4th order): (R,-W, setbycreate) (mandatory) (1-byte)
104//
105// Silence Suppression 4th Order
106// Silence suppression (4th order): (R,-W, setbycreate) (mandatory) (1-byte)
107//
108// Oob Dtmf
Chip Boling610117d2021-09-09 11:24:34 -0500109// This attribute specifies out-of-band DMTF carriage. When enabled (1), DTMF signals are carried
110// out of band via RTP or the associated signalling protocol. When disabled (0), DTMF tones are
111// carried in the PCM stream. (R,-W, setbycreate) (mandatory) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -0600112//
113// Rtp Profile Pointer
Chip Boling610117d2021-09-09 11:24:34 -0500114// This attribute points to the associated RTP profile data ME. (R,-W, setbycreate) (mandatory)
115// (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600116//
117type VoipMediaProfile struct {
118 ManagedEntityDefinition
119 Attributes AttributeValueMap
120}
121
Chip Boling8cdd6392022-01-27 08:43:37 -0600122// Attribute name constants
123
124const VoipMediaProfile_FaxMode = "FaxMode"
125const VoipMediaProfile_VoiceServiceProfilePointer = "VoiceServiceProfilePointer"
126const VoipMediaProfile_CodecSelection1StOrder = "CodecSelection1StOrder"
127const VoipMediaProfile_PacketPeriodSelection1StOrder = "PacketPeriodSelection1StOrder"
128const VoipMediaProfile_SilenceSuppression1StOrder = "SilenceSuppression1StOrder"
129const VoipMediaProfile_CodecSelection2NdOrder = "CodecSelection2NdOrder"
130const VoipMediaProfile_PacketPeriodSelection2NdOrder = "PacketPeriodSelection2NdOrder"
131const VoipMediaProfile_SilenceSuppression2NdOrder = "SilenceSuppression2NdOrder"
132const VoipMediaProfile_CodecSelection3RdOrder = "CodecSelection3RdOrder"
133const VoipMediaProfile_PacketPeriodSelection3RdOrder = "PacketPeriodSelection3RdOrder"
134const VoipMediaProfile_SilenceSuppression3RdOrder = "SilenceSuppression3RdOrder"
135const VoipMediaProfile_CodecSelection4ThOrder = "CodecSelection4ThOrder"
136const VoipMediaProfile_PacketPeriodSelection4ThOrder = "PacketPeriodSelection4ThOrder"
137const VoipMediaProfile_SilenceSuppression4ThOrder = "SilenceSuppression4ThOrder"
138const VoipMediaProfile_OobDtmf = "OobDtmf"
139const VoipMediaProfile_RtpProfilePointer = "RtpProfilePointer"
140
Chip Boling6e27b352020-02-14 09:10:01 -0600141func init() {
142 voipmediaprofileBME = &ManagedEntityDefinition{
143 Name: "VoipMediaProfile",
Chip Boling8cdd6392022-01-27 08:43:37 -0600144 ClassID: VoipMediaProfileClassID,
Chip Boling6e27b352020-02-14 09:10:01 -0600145 MessageTypes: mapset.NewSetWith(
146 Create,
147 Delete,
148 Get,
149 Set,
150 ),
151 AllowedAttributeMask: 0xffff,
152 AttributeDefinitions: AttributeDefinitionMap{
Chip Boling8cdd6392022-01-27 08:43:37 -0600153 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
154 1: ByteField(VoipMediaProfile_FaxMode, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
155 2: Uint16Field(VoipMediaProfile_VoiceServiceProfilePointer, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
156 3: ByteField(VoipMediaProfile_CodecSelection1StOrder, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
157 4: ByteField(VoipMediaProfile_PacketPeriodSelection1StOrder, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
158 5: ByteField(VoipMediaProfile_SilenceSuppression1StOrder, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
159 6: ByteField(VoipMediaProfile_CodecSelection2NdOrder, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
160 7: ByteField(VoipMediaProfile_PacketPeriodSelection2NdOrder, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
161 8: ByteField(VoipMediaProfile_SilenceSuppression2NdOrder, UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
162 9: ByteField(VoipMediaProfile_CodecSelection3RdOrder, UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9),
163 10: ByteField(VoipMediaProfile_PacketPeriodSelection3RdOrder, UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
164 11: ByteField(VoipMediaProfile_SilenceSuppression3RdOrder, UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 11),
165 12: ByteField(VoipMediaProfile_CodecSelection4ThOrder, UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 12),
166 13: ByteField(VoipMediaProfile_PacketPeriodSelection4ThOrder, UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 13),
167 14: ByteField(VoipMediaProfile_SilenceSuppression4ThOrder, UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 14),
168 15: ByteField(VoipMediaProfile_OobDtmf, UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 15),
169 16: Uint16Field(VoipMediaProfile_RtpProfilePointer, UnsignedIntegerAttributeType, 0x0001, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 16),
Chip Boling6e27b352020-02-14 09:10:01 -0600170 },
171 Access: CreatedByOlt,
172 Support: UnknownSupport,
173 }
174}
175
176// NewVoipMediaProfile (class ID 142) creates the basic
177// Managed Entity definition that is used to validate an ME of this type that
178// is received from or transmitted to the OMCC.
179func NewVoipMediaProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
180 return NewManagedEntity(*voipmediaprofileBME, params...)
181}