blob: 77728a63dda5b542ccef2450fe11dcd13721ebf0 [file] [log] [blame]
Holger Hildebrandtfa074992020-03-27 15:42:06 +00001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00004 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00005 * 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
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00008 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +000011 * 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. Bainbridged80007b2021-04-12 12:22:29 +000017/*
Holger Hildebrandtfa074992020-03-27 15:42:06 +000018 * 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
mpagenko836a1fd2021-11-01 16:12:42 +000030const VoipMediaProfileClassID = ClassID(142) // 0x008e
Holger Hildebrandtfa074992020-03-27 15:42:06 +000031
32var voipmediaprofileBME *ManagedEntityDefinition
33
mpagenko836a1fd2021-11-01 16:12:42 +000034// VoipMediaProfile (Class ID: #142 / 0x008e)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000035// 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
mpagenko836a1fd2021-11-01 16:12:42 +000047// This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory)
48// (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000049//
50// Fax Mode
mpagenko836a1fd2021-11-01 16:12:42 +000051// Selects the fax mode; values are as follows.
52//
53// 0 Passthru
54//
55// 1 ITU-T T.38
56//
Holger Hildebrandtfa074992020-03-27 15:42:06 +000057// (R,-W, setbycreate) (mandatory) (1-byte)
58//
59// Voice Service Profile Pointer
mpagenko836a1fd2021-11-01 16:12:42 +000060// Pointer to a voice service profile, which defines parameters such as jitter buffering and echo
61// cancellation. (R,-W, setbycreate) (mandatory) (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000062//
63// Codec Selection 1st Order
mpagenko836a1fd2021-11-01 16:12:42 +000064// Codec selection (1st order): This attribute specifies codec selection as defined by [IETF-
65// RFC-3551].
66//
Holger Hildebrandtfa074992020-03-27 15:42:06 +000067// (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//
mpagenko836a1fd2021-11-01 16:12:42 +000078// Three more groups of three attributes are defined, with definitions identical to the preceding
79// three:
80//
Holger Hildebrandtfa074992020-03-27 15:42:06 +000081// 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
mpagenko836a1fd2021-11-01 16:12:42 +0000109// 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)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000112//
113// Rtp Profile Pointer
mpagenko836a1fd2021-11-01 16:12:42 +0000114// This attribute points to the associated RTP profile data ME. (R,-W, setbycreate) (mandatory)
115// (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000116//
117type VoipMediaProfile struct {
118 ManagedEntityDefinition
119 Attributes AttributeValueMap
120}
121
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000122// 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
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000141func init() {
142 voipmediaprofileBME = &ManagedEntityDefinition{
143 Name: "VoipMediaProfile",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000144 ClassID: VoipMediaProfileClassID,
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000145 MessageTypes: mapset.NewSetWith(
146 Create,
147 Delete,
148 Get,
149 Set,
150 ),
151 AllowedAttributeMask: 0xffff,
152 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000153 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),
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000170 },
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}