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