blob: eb8fc53fd394d01572658c39806c02a9943a8e88 [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// VoipMediaProfileClassID is the 16-bit ID for the OMCI
26// Managed entity VoIP media profile
27const VoipMediaProfileClassID ClassID = ClassID(142)
28
29var voipmediaprofileBME *ManagedEntityDefinition
30
31// VoipMediaProfile (class ID #142)
32// The VoIP media profile ME contains settings that apply to VoIP voice encoding. This entity is
33// conditionally required for ONUs that offer VoIP services. If a non-OMCI interface is used to
34// manage VoIP signalling, this ME is unnecessary.
35//
36// An instance of this ME is created and deleted by the OLT. A VoIP media profile is needed for
37// each unique set of profile attributes.
38//
39// Relationships
40// An instance of this ME may be associated with one or more VoIP voice CTP MEs.
41//
42// Attributes
43// Managed Entity Id
44// Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
45// (mandatory) (2-bytes)
46//
47// Fax Mode
48// (R,-W, setbycreate) (mandatory) (1-byte)
49//
50// Voice Service Profile Pointer
51// Voice service profile pointer: Pointer to a voice service profile, which defines parameters such
52// as jitter buffering and echo cancellation. (R,-W, setbycreate) (mandatory) (2-bytes)
53//
54// Codec Selection 1st Order
55// (R,-W, set-by-create) (mandatory) (1-byte)
56//
57// Packet Period Selection 1st Order
58// Packet period selection (1st order): This attribute specifies the packet period selection
59// interval in milliseconds. The recommended default value is 10-ms. Valid values are 10..30-ms.
60// (R,-W, set-by-create) (mandatory) (1-byte)
61//
62// Silence Suppression 1st Order
63// Silence suppression (1st order): This attribute specifies whether silence suppression is on or
64// off. Valid values are 0-= off and 1-= on. (R,-W, set-by-create) (mandatory) (1-byte)
65//
66// Codec Selection 2nd Order
67// Codec selection (2nd order): (R,-W, setbycreate) (mandatory) (1-byte)
68//
69// Packet Period Selection 2nd Order
70// Packet period selection (2nd order): (R,-W, setbycreate) (mandatory) (1-byte)
71//
72// Silence Suppression 2nd Order
73// Silence suppression (2nd order): (R,-W, setbycreate) (mandatory) (1-byte)
74//
75// Codec Selection 3rd Order
76// Codec selection (3rd order): (R,-W, setbycreate) (mandatory) (1-byte)
77//
78// Packet Period Selection 3rd Order
79// Packet period selection (3rd order): (R,-W, setbycreate) (mandatory) (1-byte)
80//
81// Silence Suppression 3rd Order
82// Silence suppression (3rd order): (R,-W, setbycreate) (mandatory) (1-byte)
83//
84// Codec Selection 4th Order
85// Codec selection (4th order): (R,-W, setbycreate) (mandatory) (1-byte)
86//
87// Packet Period Selection 4th Order
88// Packet period selection (4th order): (R,-W, setbycreate) (mandatory) (1-byte)
89//
90// Silence Suppression 4th Order
91// Silence suppression (4th order): (R,-W, setbycreate) (mandatory) (1-byte)
92//
93// Oob Dtmf
94// OOB DTMF: This attribute specifies out-of-band DMTF carriage. When enabled (1), DTMF signals are
95// carried out of band via RTP or the associated signalling protocol. When disabled (0), DTMF tones
96// are carried in the PCM stream. (R,-W, setbycreate) (mandatory) (1-byte)
97//
98// Rtp Profile Pointer
99// RTP profile pointer: This attribute points to the associated RTP profile data ME. (R,-W,
100// setbycreate) (mandatory) (2-bytes)
101//
102type VoipMediaProfile struct {
103 ManagedEntityDefinition
104 Attributes AttributeValueMap
105}
106
107func init() {
108 voipmediaprofileBME = &ManagedEntityDefinition{
109 Name: "VoipMediaProfile",
110 ClassID: 142,
111 MessageTypes: mapset.NewSetWith(
112 Create,
113 Delete,
114 Get,
115 Set,
116 ),
117 AllowedAttributeMask: 0xffff,
118 AttributeDefinitions: AttributeDefinitionMap{
119 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
120 1: ByteField("FaxMode", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
121 2: Uint16Field("VoiceServiceProfilePointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
122 3: ByteField("CodecSelection1StOrder", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
123 4: ByteField("PacketPeriodSelection1StOrder", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
124 5: ByteField("SilenceSuppression1StOrder", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
125 6: ByteField("CodecSelection2NdOrder", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
126 7: ByteField("PacketPeriodSelection2NdOrder", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
127 8: ByteField("SilenceSuppression2NdOrder", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
128 9: ByteField("CodecSelection3RdOrder", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9),
129 10: ByteField("PacketPeriodSelection3RdOrder", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
130 11: ByteField("SilenceSuppression3RdOrder", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 11),
131 12: ByteField("CodecSelection4ThOrder", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 12),
132 13: ByteField("PacketPeriodSelection4ThOrder", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 13),
133 14: ByteField("SilenceSuppression4ThOrder", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 14),
134 15: ByteField("OobDtmf", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 15),
135 16: Uint16Field("RtpProfilePointer", UnsignedIntegerAttributeType, 0x0001, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 16),
136 },
137 Access: CreatedByOlt,
138 Support: UnknownSupport,
139 }
140}
141
142// NewVoipMediaProfile (class ID 142) creates the basic
143// Managed Entity definition that is used to validate an ME of this type that
144// is received from or transmitted to the OMCC.
145func NewVoipMediaProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
146 return NewManagedEntity(*voipmediaprofileBME, params...)
147}