blob: 63406b8c2ac4f8baaedba3b7e3b3c8ef5cdda571 [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 */
Chip Boling2d51f052021-02-09 09:04:15 -060017/*
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// VoiceServiceProfileClassID is the 16-bit ID for the OMCI
29// Managed entity Voice service profile
Chip Boling610117d2021-09-09 11:24:34 -050030const VoiceServiceProfileClassID = ClassID(58) // 0x003a
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var voiceserviceprofileBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// VoiceServiceProfile (Class ID: #58 / 0x003a)
Chip Boling6e27b352020-02-14 09:10:01 -060035// This ME organizes data that describe the voice service functions of the ONU. Instances of this
36// ME are created and deleted by the OLT.
37//
38// Relationships
39// An instance of this ME may be associated with zero or more instances of a VoIP voice CTP by way
40// of a VoIP media profile.
41//
42// Attributes
43// Managed Entity Id
Chip Boling610117d2021-09-09 11:24:34 -050044// This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory)
45// (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060046//
47// Announcement Type
Chip Boling610117d2021-09-09 11:24:34 -050048// This attribute specifies the treatment when a subscriber goes off hook but does not attempt a
49// call within the dial-tone timeout interval. Valid values include the following.
50//
51// 0x01 Silence
52//
53// 0x02 Reorder tone
54//
55// 0x03 Fast busy
56//
57// 0x04 Voice announcement
58//
59// 0xFF Not specified; ONU is free to make its own choice.
60//
Chip Boling6e27b352020-02-14 09:10:01 -060061// (R,-W, setbycreate) (mandatory) (1-byte)
62//
63// Jitter Target
Chip Boling610117d2021-09-09 11:24:34 -050064// This attribute specifies the target value of the jitter buffer in milliseconds. The system tries
65// to maintain the jitter buffer at the target value. The value 0 specifies dynamic jitter buffer
66// sizing. (R,-W, setbycreate) (optional) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060067//
68// Jitter Buffer Max
Chip Boling610117d2021-09-09 11:24:34 -050069// This attribute specifies the maximum depth of the jitter buffer associated with this service in
70// milliseconds. The value 0 specifies that the ONU uses its internal default. (R,-W, set-by-
71// create) (optional) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060072//
73// Echo Cancel Ind
Chip Boling610117d2021-09-09 11:24:34 -050074// The Boolean value true specifies that echo cancellation is on; false specifies off. (R,-W,
75// setbycreate) (mandatory) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -060076//
77// Pstn Protocol Variant
Chip Boling610117d2021-09-09 11:24:34 -050078// This attribute controls which variant of POTS signalling is used on the associated UNIs. Its
79// value is equal to the [ITU-T E.164] country code. The value 0 specifies that the ONU uses its
80// internal default. (R,-W, set-by-create) (optional) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060081//
82// Dtmf Digit Levels
Chip Boling610117d2021-09-09 11:24:34 -050083// This attribute specifies the power level of DTMF digits that may be generated by the ONU towards
84// the subscriber set. It is a 2s complement value referred to 1-mW at the 0 transmission level
85// point (TLP) (dBm0), with resolution 1-dB. The default value 0x8000 selects the ONU's internal
86// policy. (R, W, setbycreate) (optional) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060087//
88// Dtmf Digit Duration
Chip Boling610117d2021-09-09 11:24:34 -050089// This attribute specifies the duration of DTMF digits that may be generated by the ONU towards
90// the subscriber set. It is specified in milliseconds. The default value 0 selects the ONU's
91// internal policy. (R, W, setbycreate) (optional) (2 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060092//
93// Hook Flash Minimum Time
Chip Boling610117d2021-09-09 11:24:34 -050094// This attribute defines the minimum duration recognized by the ONU as a switchhook flash. It is
95// expressed in milliseconds; the default value 0 selects the ONU's internal policy. (R, W,
96// setbycreate) (optional) (2 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060097//
98// Hook Flash Maximum Time
Chip Boling610117d2021-09-09 11:24:34 -050099// This attribute defines the maximum duration recognized by the ONU as a switchhook flash. It is
100// expressed in milliseconds; the default value 0 selects the ONU's internal policy. (R, W,
101// setbycreate) (optional) (2 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600102//
103// Tone Pattern Table
Chip Boling610117d2021-09-09 11:24:34 -0500104// This attribute is a table, each of whose entries specifies a complex tone (or silence) and a
105// duration. By linking tones and silence together, possibly cyclically, continuous, varying or
106// interrupted tone sequences, repetitive or not, may be defined. A tone sequence is initiated by
107// pointing to the first tone pattern table entry that defines its parameters. Each entry is a
108// vector comprising the following components.
109//
110// Index (1 byte): This component is simply an index into the table. It ranges from 1..255. In a
111// set operation, the value 0 in this field clears the table.
112//
113// Tone on (1 byte): This Boolean component controls whether the tone is on (true) or off. If the
114// tone is off, the frequency and power fields are not meaningful.
115//
116// Frequency 1 (2 bytes): This component specifies the frequency of one of the tone components in
117// hertz.
118//
119// Power 1 (1 byte): This component specifies the power level of the corresponding frequency
120// component. It ranges from 0 (coded as 0) to -25.5 (coded as 255)-dBm0 with 0.1-dB resolution.
121//
122// Three additional pairs of frequency-power components may be specified to define a complex tone.
123// If a pair of possibilities is not to be used, its frequency field should be set to 0.
124//
125// Frequency 2 (2 bytes)
126//
127// Power 2 (1 byte)
128//
129// Frequency 3 (2 bytes)
130//
131// Power 3 (1 byte)
132//
133// Frequency 4 (2 bytes)
134//
135// Power 4 (1 byte)
136//
137// The following pair of frequency-power components allows the composite tone to be modulated
138// (warble effect). If this effect is not to be used, the frequency should be set to 0.
139//
140// Modulation frequency (2 bytes), hertz
141//
142// Modulation power (1 byte), 0..25.5-dBm0
143//
144// Duration (2 bytes): This component specifies the duration of the phase, in milliseconds. The
145// value 0 specifies that the phase endures indefinitely, i.e., until terminated by other events
146// such as call abandonment.
147//
148// Next entry (1 byte): This component is a pointer to another entry in this same table, which
149// permits sequences of tones to be defined, possibly cyclically. A reference to a non-existent
150// table entry, or the value 0, indicates that the sequence should be terminated.
151//
Chip Boling6e27b352020-02-14 09:10:01 -0600152// (R,-W) (optional) (N * 20 bytes)
153//
154// Tone Event Table
Chip Boling610117d2021-09-09 11:24:34 -0500155// This attribute is a table, each of whose entries specifies an event for which a tone is defined.
156// If the tone can be synthesized by a sequence of complex tones and silence, the event refers to
157// an entry in the tone pattern table. Otherwise, the event refers to a file name that is expected
158// to be recognized by the ONU environment. Each entry in the tone event table is a vector
159// comprising the following components.
160//
161// Event (1 byte): This component is an enumeration of the events for which a tone may be defined.
162// The event component also serves as the index for the table. A set operation to event 0 causes
163// the table to be cleared.
164//
165// Tone pattern (1 byte): This component specifies an entry point into the tone pattern table
166// attribute, to be invoked when the specified event occurs. The value 0 indicates that no tone
167// from the tone pattern table is to be played.
168//
169// Tone file (2 bytes): This component points to a large string ME that contains the path and name
170// of a file containing a codec sequence to be played out. If no file is found after traversing
171// these links, no tone is played. The behaviour is unspecified if both tone pattern and tone file
172// are specified.
173//
174// Tone file repetitions (1 byte): This component specifies the number of times the tone file is to
175// be repeated. The value 0 means that the file is to be repeated indefinitely until terminated by
176// some external event such as call abandonment.
177//
178// Reserved (2 bytes)
179//
Chip Boling6e27b352020-02-14 09:10:01 -0600180// (R,-W) (optional) (N * 7 bytes).
181//
182// Ringing Pattern Table
Chip Boling610117d2021-09-09 11:24:34 -0500183// This attribute is a table, each of whose entries specifies a ringing pattern and a duration. By
184// linking ringing and silence together, possibly cyclically, continuous or interrupted ringing
185// sequences, repetitive or not, may be defined. A ringing sequence is initiated by pointing to the
186// first ringing pattern table entry that defines its parameters. Each entry is a vector comprising
187// the following components.
188//
189// Index (1 byte): This component is simply an index into the table. It ranges from 1..255. In a
190// set operation, the value 0 in this field clears the table.
191//
192// Ringing on (1 byte): This Boolean component controls whether ringing is on (true) or off during
193// this interval.
194//
195// Duration (2 bytes): This component specifies the duration of the ringing phase, in milliseconds.
196// The value 0 specifies that the phase endures indefinitely, i.e., until terminated by other
197// events such as call abandonment.
198//
199// Next entry (1 byte): This component is a pointer to another entry in this same table, which
200// permits sequences of ringing bursts to be defined, possibly cyclically. A reference to a non-
201// existent table entry, or the value 0, indicates that the sequence should be terminated.
202//
Chip Boling6e27b352020-02-14 09:10:01 -0600203// (R,-W) (optional) (N * 5 bytes).
204//
205// Ringing Event Table
Chip Boling610117d2021-09-09 11:24:34 -0500206// This attribute is a table, each of whose entries specifies an event for which a ringing sequence
207// is defined. If the ringing sequence can be generated as a sequence of power ringing and silent
208// intervals, the event refers to an entry in the ringing pattern table. Otherwise, the event
209// refers to a file name that is expected to be recognized by the ONU environment. Each entry is a
210// vector comprising the following components:
211//
212// Event (1 byte): This component is an enumeration of the events for which a ringing sequence may
213// be defined. The event component also serves as the index for the table. A set operation with the
214// value 0 in this field causes the table to be cleared.
215//
216// Ringing pattern (1 byte): This component specifies an entry point into the ringing pattern table
217// attribute, to be invoked when the specified event occurs. The value 0 indicates that no ringing
218// sequence is defined in the ringing pattern table.
219//
220// Ringing file (2 bytes): This component points to a large string ME that contains the path and
221// name of a file containing a ring tone to be played out. If no file is found after traversing
222// these links, no ringing is played. The behaviour is unspecified if both ringing pattern and
223// ringing file fields are specified.
224//
225// Ringing file repetitions (1 byte): This component specifies the number of times the ringing file
226// is to be repeated. The value 0 means that the file is to be repeated indefinitely until
227// terminated by some external event such as call abandonment.
228//
229// Ringing text (2 bytes): This component points to a large string ME that contains a text string
230// to be displayed on the CPE device in conjunction with this event. A null pointer indicates that
231// no text is to be displayed.
232//
Chip Boling6e27b352020-02-14 09:10:01 -0600233// (R,-W) (optional) (N * 7 bytes).
234//
235// Network Specific Extensions Pointer
Chip Boling610117d2021-09-09 11:24:34 -0500236// This attribute points to a network address ME that contains the path and name of a file
237// containing network specific parameters for the associated UNIs. The default value for this
238// attribute is 0xFFFF, a null pointer. (R,-W, set-by-create) (optional) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600239//
240type VoiceServiceProfile struct {
241 ManagedEntityDefinition
242 Attributes AttributeValueMap
243}
244
245func init() {
246 voiceserviceprofileBME = &ManagedEntityDefinition{
247 Name: "VoiceServiceProfile",
248 ClassID: 58,
249 MessageTypes: mapset.NewSetWith(
250 Create,
251 Delete,
252 Get,
253 Set,
Chip Boling2d51f052021-02-09 09:04:15 -0600254 SetTable,
Chip Boling6e27b352020-02-14 09:10:01 -0600255 ),
256 AllowedAttributeMask: 0xfffc,
257 AttributeDefinitions: AttributeDefinitionMap{
258 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
259 1: ByteField("AnnouncementType", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
260 2: Uint16Field("JitterTarget", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 2),
261 3: Uint16Field("JitterBufferMax", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 3),
262 4: ByteField("EchoCancelInd", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
263 5: Uint16Field("PstnProtocolVariant", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
264 6: Uint16Field("DtmfDigitLevels", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 6),
265 7: Uint16Field("DtmfDigitDuration", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 7),
266 8: Uint16Field("HookFlashMinimumTime", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 8),
267 9: Uint16Field("HookFlashMaximumTime", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 9),
268 10: MultiByteField("TonePatternTable", OctetsAttributeType, 0x0040, 20, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 10),
269 11: MultiByteField("ToneEventTable", OctetsAttributeType, 0x0020, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 11),
270 12: MultiByteField("RingingPatternTable", OctetsAttributeType, 0x0010, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 12),
271 13: MultiByteField("RingingEventTable", OctetsAttributeType, 0x0008, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 13),
272 14: Uint16Field("NetworkSpecificExtensionsPointer", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 14),
273 },
274 Access: CreatedByOlt,
275 Support: UnknownSupport,
276 }
277}
278
279// NewVoiceServiceProfile (class ID 58) creates the basic
280// Managed Entity definition that is used to validate an ME of this type that
281// is received from or transmitted to the OMCC.
282func NewVoiceServiceProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
283 return NewManagedEntity(*voiceserviceprofileBME, params...)
284}