Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 3 | * Copyright 2020-present Open Networking Foundation |
| 4 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 5 | * 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 Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 8 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 10 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 11 | * 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 Boling | 2d51f05 | 2021-02-09 09:04:15 -0600 | [diff] [blame] | 17 | /* |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 18 | * 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 | |
| 24 | package generated |
| 25 | |
| 26 | import "github.com/deckarep/golang-set" |
| 27 | |
| 28 | // VoiceServiceProfileClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Voice service profile |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const VoiceServiceProfileClassID = ClassID(58) // 0x003a |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var voiceserviceprofileBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // VoiceServiceProfile (Class ID: #58 / 0x003a) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // 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 Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 44 | // This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory) |
| 45 | // (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 46 | // |
| 47 | // Announcement Type |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 48 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 61 | // (R,-W, setbycreate) (mandatory) (1-byte) |
| 62 | // |
| 63 | // Jitter Target |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 64 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 67 | // |
| 68 | // Jitter Buffer Max |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 69 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 72 | // |
| 73 | // Echo Cancel Ind |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 74 | // The Boolean value true specifies that echo cancellation is on; false specifies off. (R,-W, |
| 75 | // setbycreate) (mandatory) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 76 | // |
| 77 | // Pstn Protocol Variant |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 78 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 81 | // |
| 82 | // Dtmf Digit Levels |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 83 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 87 | // |
| 88 | // Dtmf Digit Duration |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 89 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 92 | // |
| 93 | // Hook Flash Minimum Time |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 94 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 97 | // |
| 98 | // Hook Flash Maximum Time |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 99 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 102 | // |
| 103 | // Tone Pattern Table |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 104 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 152 | // (R,-W) (optional) (N * 20 bytes) |
| 153 | // |
| 154 | // Tone Event Table |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 155 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 180 | // (R,-W) (optional) (N * 7 bytes). |
| 181 | // |
| 182 | // Ringing Pattern Table |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 183 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 203 | // (R,-W) (optional) (N * 5 bytes). |
| 204 | // |
| 205 | // Ringing Event Table |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 206 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 233 | // (R,-W) (optional) (N * 7 bytes). |
| 234 | // |
| 235 | // Network Specific Extensions Pointer |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 236 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 239 | // |
| 240 | type VoiceServiceProfile struct { |
| 241 | ManagedEntityDefinition |
| 242 | Attributes AttributeValueMap |
| 243 | } |
| 244 | |
| 245 | func init() { |
| 246 | voiceserviceprofileBME = &ManagedEntityDefinition{ |
| 247 | Name: "VoiceServiceProfile", |
| 248 | ClassID: 58, |
| 249 | MessageTypes: mapset.NewSetWith( |
| 250 | Create, |
| 251 | Delete, |
| 252 | Get, |
Chip Boling | 17e1778 | 2021-10-06 08:29:06 -0500 | [diff] [blame] | 253 | GetNext, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 254 | Set, |
Chip Boling | 2d51f05 | 2021-02-09 09:04:15 -0600 | [diff] [blame] | 255 | SetTable, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 256 | ), |
| 257 | AllowedAttributeMask: 0xfffc, |
| 258 | AttributeDefinitions: AttributeDefinitionMap{ |
| 259 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 260 | 1: ByteField("AnnouncementType", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 261 | 2: Uint16Field("JitterTarget", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 2), |
| 262 | 3: Uint16Field("JitterBufferMax", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 3), |
| 263 | 4: ByteField("EchoCancelInd", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4), |
| 264 | 5: Uint16Field("PstnProtocolVariant", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5), |
| 265 | 6: Uint16Field("DtmfDigitLevels", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 6), |
| 266 | 7: Uint16Field("DtmfDigitDuration", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 7), |
| 267 | 8: Uint16Field("HookFlashMinimumTime", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 8), |
| 268 | 9: Uint16Field("HookFlashMaximumTime", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 9), |
Chip Boling | 17e1778 | 2021-10-06 08:29:06 -0500 | [diff] [blame] | 269 | 10: TableField("TonePatternTable", TableAttributeType, 0x0040, TableInfo{nil, 20}, mapset.NewSetWith(Read, Write), false, true, false, 10), |
| 270 | 11: TableField("ToneEventTable", TableAttributeType, 0x0020, TableInfo{nil, 7}, mapset.NewSetWith(Read, Write), false, true, false, 11), |
| 271 | 12: TableField("RingingPatternTable", TableAttributeType, 0x0010, TableInfo{nil, 5}, mapset.NewSetWith(Read, Write), false, true, false, 12), |
| 272 | 13: TableField("RingingEventTable", TableAttributeType, 0x0008, TableInfo{nil, 7}, mapset.NewSetWith(Read, Write), false, true, false, 13), |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 273 | 14: Uint16Field("NetworkSpecificExtensionsPointer", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 14), |
| 274 | }, |
| 275 | Access: CreatedByOlt, |
| 276 | Support: UnknownSupport, |
Chip Boling | 17e1778 | 2021-10-06 08:29:06 -0500 | [diff] [blame] | 277 | Alarms: AlarmMap{ |
| 278 | 1: "File not found", |
| 279 | }, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 280 | } |
| 281 | } |
| 282 | |
| 283 | // NewVoiceServiceProfile (class ID 58) creates the basic |
| 284 | // Managed Entity definition that is used to validate an ME of this type that |
| 285 | // is received from or transmitted to the OMCC. |
| 286 | func NewVoiceServiceProfile(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 287 | return NewManagedEntity(*voiceserviceprofileBME, params...) |
| 288 | } |