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