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