blob: 37b7bfb135cb69c5bfd62035458b0a684be95ed6 [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// VoiceServiceProfileClassID is the 16-bit ID for the OMCI
26// Managed entity Voice service profile
27const VoiceServiceProfileClassID ClassID = ClassID(58)
28
29var voiceserviceprofileBME *ManagedEntityDefinition
30
31// VoiceServiceProfile (class ID #58)
32// This ME organizes data that describe the voice service functions of the ONU. Instances of this
33// ME are created and deleted by the OLT.
34//
35// Relationships
36// An instance of this ME may be associated with zero or more instances of a VoIP voice CTP by way
37// of a VoIP media profile.
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// Announcement Type
45// (R,-W, setbycreate) (mandatory) (1-byte)
46//
47// Jitter Target
48// Jitter target: This attribute specifies the target value of the jitter buffer in milliseconds.
49// The system tries to maintain the jitter buffer at the target value. The value 0 specifies
50// dynamic jitter buffer sizing. (R,-W, setbycreate) (optional) (2-bytes)
51//
52// Jitter Buffer Max
53// Jitter buffer max: This attribute specifies the maximum depth of the jitter buffer associated
54// with this service in milliseconds. The value 0 specifies that the ONU uses its internal default.
55// (R,-W, set-by-create) (optional) (2-bytes)
56//
57// Echo Cancel Ind
58// Echo cancel ind: The Boolean value true specifies that echo cancellation is on; false specifies
59// off. (R,-W, setbycreate) (mandatory) (1-byte)
60//
61// Pstn Protocol Variant
62// PSTN protocol variant: This attribute controls which variant of POTS signalling is used on the
63// associated UNIs. Its value is equal to the [ITU-T E.164] country code. The value 0 specifies
64// that the ONU uses its internal default. (R,-W, set-by-create) (optional) (2-bytes)
65//
66// Dtmf Digit Levels
67// DTMF digit levels: This attribute specifies the power level of DTMF digits that may be generated
68// by the ONU towards the subscriber set. It is a 2s complement value referred to 1-mW at the 0
69// transmission level point (TLP) (dBm0), with resolution 1-dB. The default value 0x8000 selects
70// the ONU's internal policy. (R, W, setbycreate) (optional) (2-bytes)
71//
72// Dtmf Digit Duration
73// DTMF digit duration: This attribute specifies the duration of DTMF digits that may be generated
74// by the ONU towards the subscriber set. It is specified in milliseconds. The default value 0
75// selects the ONU's internal policy. (R, W, setbycreate) (optional) (2 bytes)
76//
77// Hook Flash Minimum Time
78// Hook flash minimum time: This attribute defines the minimum duration recognized by the ONU as a
79// switchhook flash. It is expressed in milliseconds; the default value 0 selects the ONU's
80// internal policy. (R, W, setbycreate) (optional) (2 bytes)
81//
82// Hook Flash Maximum Time
83// Hook flash maximum time: This attribute defines the maximum duration recognized by the ONU as a
84// switchhook flash. It is expressed in milliseconds; the default value 0 selects the ONU's
85// internal policy. (R, W, setbycreate) (optional) (2 bytes)
86//
87// Tone Pattern Table
88// (R,-W) (optional) (N * 20 bytes)
89//
90// Tone Event Table
91// (R,-W) (optional) (N * 7 bytes).
92//
93// Ringing Pattern Table
94// (R,-W) (optional) (N * 5 bytes).
95//
96// Ringing Event Table
97// (R,-W) (optional) (N * 7 bytes).
98//
99// Network Specific Extensions Pointer
100// Network specific extensions pointer: This attribute points to a network address ME that contains
101// the path and name of a file containing network specific parameters for the associated UNIs. The
102// default value for this attribute is 0xFFFF, a null pointer. (R,-W, set-by-create) (optional)
103// (2-bytes)
104//
105type VoiceServiceProfile struct {
106 ManagedEntityDefinition
107 Attributes AttributeValueMap
108}
109
110func init() {
111 voiceserviceprofileBME = &ManagedEntityDefinition{
112 Name: "VoiceServiceProfile",
113 ClassID: 58,
114 MessageTypes: mapset.NewSetWith(
115 Create,
116 Delete,
117 Get,
118 Set,
119 ),
120 AllowedAttributeMask: 0xfffc,
121 AttributeDefinitions: AttributeDefinitionMap{
122 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
123 1: ByteField("AnnouncementType", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
124 2: Uint16Field("JitterTarget", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 2),
125 3: Uint16Field("JitterBufferMax", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 3),
126 4: ByteField("EchoCancelInd", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
127 5: Uint16Field("PstnProtocolVariant", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
128 6: Uint16Field("DtmfDigitLevels", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 6),
129 7: Uint16Field("DtmfDigitDuration", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 7),
130 8: Uint16Field("HookFlashMinimumTime", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 8),
131 9: Uint16Field("HookFlashMaximumTime", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 9),
132 10: MultiByteField("TonePatternTable", OctetsAttributeType, 0x0040, 20, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 10),
133 11: MultiByteField("ToneEventTable", OctetsAttributeType, 0x0020, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 11),
134 12: MultiByteField("RingingPatternTable", OctetsAttributeType, 0x0010, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 12),
135 13: MultiByteField("RingingEventTable", OctetsAttributeType, 0x0008, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 13),
136 14: Uint16Field("NetworkSpecificExtensionsPointer", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 14),
137 },
138 Access: CreatedByOlt,
139 Support: UnknownSupport,
140 }
141}
142
143// NewVoiceServiceProfile (class ID 58) creates the basic
144// Managed Entity definition that is used to validate an ME of this type that
145// is received from or transmitted to the OMCC.
146func NewVoiceServiceProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
147 return NewManagedEntity(*voiceserviceprofileBME, params...)
148}