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 | 34ebcb6 | 2021-02-02 12:13:58 -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 | // VoipConfigDataClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity VoIP config data |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const VoipConfigDataClassID = ClassID(138) // 0x008a |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var voipconfigdataBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // VoipConfigData (Class ID: #138 / 0x008a) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // The VoIP configuration data ME defines the configuration for VoIP in the ONU. The OLT uses this |
| 36 | // ME to discover the VoIP signalling protocols and configuration methods supported by this ONU. |
| 37 | // The OLT then uses this ME to select the desired signalling protocol and configuration method. |
| 38 | // The entity is conditionally required for ONUs that offer VoIP services. |
| 39 | // |
| 40 | // An ONU that supports VoIP services automatically creates an instance of this ME. |
| 41 | // |
| 42 | // Relationships |
| 43 | // One instance of this ME is associated with the ONU. |
| 44 | // |
| 45 | // Attributes |
| 46 | // Managed Entity Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 47 | // This attribute uniquely identifies each instance of this ME. There is only one instance, number |
| 48 | // 0. (R) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 49 | // |
| 50 | // Available Signalling Protocols |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 51 | // This attribute is a bit map that defines the VoIP signalling protocols supported in the ONU. The |
| 52 | // bit value 1 specifies that the ONU supports the associated protocol. |
| 53 | // |
| 54 | // 1 (LSB) SIP |
| 55 | // |
| 56 | // 2 ITU-T H.248 |
| 57 | // |
| 58 | // 3 MGCP |
| 59 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 60 | // (R) (mandatory) (1-byte) |
| 61 | // |
| 62 | // Signalling Protocol Used |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 63 | // 0xFF Selected by non-OMCI management interface |
| 64 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 65 | // (R,-W) (mandatory) (1-byte) |
| 66 | // |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 67 | // This attribute specifies the VoIP signalling protocol to use. Only one type of protocol is |
| 68 | // allowed at a time. Valid values are: |
| 69 | // |
| 70 | // 0 None |
| 71 | // |
| 72 | // 1 SIP |
| 73 | // |
| 74 | // 2 ITU-T H.248 |
| 75 | // |
| 76 | // 3 MGCP |
| 77 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 78 | // Available Voip Configuration Methods |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 79 | // This attribute is a bit map that indicates the capabilities of the ONU with regard to VoIP |
| 80 | // service configuration. The bit value 1 specifies that the ONU supports the associated |
| 81 | // capability. |
| 82 | // |
| 83 | // 1 (LSB) ONU capable of using the OMCI to configure its VoIP services. |
| 84 | // |
| 85 | // 2 ONU capable of working with configuration file retrieval to configure its VoIP services. |
| 86 | // |
| 87 | // 3 ONU capable of working with [BBF TR-069] to configure its VoIP services. |
| 88 | // |
| 89 | // 4 ONU capable of working with IETF sipping config framework to configure its VoIP services. |
| 90 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 91 | // Bits 5..24 are reserved by ITU-T. Bits 25..32 are reserved for proprietary vendor configuration |
| 92 | // capabilities. (R) (mandatory) (4-bytes) |
| 93 | // |
| 94 | // Voip Configuration Method Used |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 95 | // Specifies which method is used to configure the ONU's VoIP service. |
| 96 | // |
| 97 | // 0 Do not configure - ONU default |
| 98 | // |
| 99 | // 1 OMCI |
| 100 | // |
| 101 | // 2 Configuration file retrieval |
| 102 | // |
| 103 | // 3 BBF TR-069 |
| 104 | // |
| 105 | // 4 IETF sipping config framework |
| 106 | // |
| 107 | // 5..240 Reserved by ITU-T |
| 108 | // |
| 109 | // 241..255 Reserved for proprietary vendor configuration methods |
| 110 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 111 | // (R,-W) (mandatory) (1-byte) |
| 112 | // |
| 113 | // Voip Configuration Address Pointer |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 114 | // If this attribute is set to any value other than a null pointer, it points to a network address |
| 115 | // ME, which indicates the address of the server to contact using the method indicated in the VoIP |
| 116 | // configuration method used attribute. This attribute is only relevant for non-OMCI configuration |
| 117 | // methods. |
| 118 | // |
| 119 | // If this attribute is set to a null pointer, no address is defined by this attribute. However, |
| 120 | // the address may be defined by other methods, such as deriving it from the ONU identifier |
| 121 | // attribute of the IP host config data ME and using a well-known URI schema. |
| 122 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 123 | // The default value is 0xFFFF (R,-W) (mandatory) (2-bytes) |
| 124 | // |
| 125 | // Voip Configuration State |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 126 | // Indicates the status of the ONU VoIP service. |
| 127 | // |
| 128 | // 0 Inactive: configuration retrieval has not been attempted |
| 129 | // |
| 130 | // 1 Active: configuration was retrieved |
| 131 | // |
| 132 | // 2 Initializing: configuration is now being retrieved |
| 133 | // |
| 134 | // 3 Fault: configuration retrieval process failed |
| 135 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 136 | // Other values are reserved. At ME instantiation, the ONU sets this attribute to 0. (R) |
| 137 | // (mandatory) (1-byte) |
| 138 | // |
| 139 | // Retrieve Profile |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 140 | // This attribute provides a means by which the ONU may be notified that a new VoIP profile should |
| 141 | // be retrieved. By setting this attribute, the OLT triggers the ONU to retrieve a new profile. The |
| 142 | // actual value in the set action is ignored because it is the action of setting that is important. |
| 143 | // (W) (mandatory) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 144 | // |
| 145 | // Profile Version |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 146 | // This attribute is a character string that identifies the version of the last retrieved profile. |
| 147 | // (R) (mandatory) (25-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 148 | // |
| 149 | type VoipConfigData struct { |
| 150 | ManagedEntityDefinition |
| 151 | Attributes AttributeValueMap |
| 152 | } |
| 153 | |
| 154 | func init() { |
| 155 | voipconfigdataBME = &ManagedEntityDefinition{ |
| 156 | Name: "VoipConfigData", |
| 157 | ClassID: 138, |
| 158 | MessageTypes: mapset.NewSetWith( |
| 159 | Get, |
| 160 | Set, |
| 161 | ), |
| 162 | AllowedAttributeMask: 0xff00, |
| 163 | AttributeDefinitions: AttributeDefinitionMap{ |
| 164 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 165 | 1: ByteField("AvailableSignallingProtocols", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1), |
| 166 | 2: ByteField("SignallingProtocolUsed", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2), |
| 167 | 3: Uint32Field("AvailableVoipConfigurationMethods", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3), |
| 168 | 4: ByteField("VoipConfigurationMethodUsed", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4), |
| 169 | 5: Uint16Field("VoipConfigurationAddressPointer", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5), |
| 170 | 6: ByteField("VoipConfigurationState", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6), |
| 171 | 7: ByteField("RetrieveProfile", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Write), false, false, false, 7), |
| 172 | 8: MultiByteField("ProfileVersion", OctetsAttributeType, 0x0100, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), true, false, false, 8), |
| 173 | }, |
| 174 | Access: CreatedByOnu, |
| 175 | Support: UnknownSupport, |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 176 | Alarms: AlarmMap{ |
| 177 | 0: "VCD config server name", |
| 178 | 1: "VCD config server reach", |
| 179 | 2: "VCD config server connect", |
| 180 | 3: "VCD config server validate", |
| 181 | 4: "VCD config server auth", |
| 182 | 5: "VCD config server timeout", |
| 183 | 6: "VCD config server fail", |
| 184 | 7: "VCD config file error", |
| 185 | 8: "VCD subscription name", |
| 186 | 9: "VCD subscription reach", |
| 187 | 10: "VCD subscription connect", |
| 188 | 11: "VCD subscription validate", |
| 189 | 12: "VCD subscription auth", |
| 190 | 13: "VCD subscription timeout", |
| 191 | 14: "VCD subscription fail", |
| 192 | 15: "VCD reboot request", |
| 193 | }, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 194 | } |
| 195 | } |
| 196 | |
| 197 | // NewVoipConfigData (class ID 138) creates the basic |
| 198 | // Managed Entity definition that is used to validate an ME of this type that |
| 199 | // is received from or transmitted to the OMCC. |
| 200 | func NewVoipConfigData(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 201 | return NewManagedEntity(*voipconfigdataBME, params...) |
| 202 | } |