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