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 |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 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 |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 8 | * |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [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 | |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 154 | // Attribute name constants |
| 155 | |
| 156 | const VoipConfigData_AvailableSignallingProtocols = "AvailableSignallingProtocols" |
| 157 | const VoipConfigData_SignallingProtocolUsed = "SignallingProtocolUsed" |
| 158 | const VoipConfigData_AvailableVoipConfigurationMethods = "AvailableVoipConfigurationMethods" |
| 159 | const VoipConfigData_VoipConfigurationMethodUsed = "VoipConfigurationMethodUsed" |
| 160 | const VoipConfigData_VoipConfigurationAddressPointer = "VoipConfigurationAddressPointer" |
| 161 | const VoipConfigData_VoipConfigurationState = "VoipConfigurationState" |
| 162 | const VoipConfigData_RetrieveProfile = "RetrieveProfile" |
| 163 | const VoipConfigData_ProfileVersion = "ProfileVersion" |
| 164 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 165 | func init() { |
| 166 | voipconfigdataBME = &ManagedEntityDefinition{ |
| 167 | Name: "VoipConfigData", |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 168 | ClassID: VoipConfigDataClassID, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 169 | MessageTypes: mapset.NewSetWith( |
| 170 | Get, |
| 171 | Set, |
| 172 | ), |
| 173 | AllowedAttributeMask: 0xff00, |
| 174 | AttributeDefinitions: AttributeDefinitionMap{ |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame^] | 175 | 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 176 | 1: ByteField(VoipConfigData_AvailableSignallingProtocols, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1), |
| 177 | 2: ByteField(VoipConfigData_SignallingProtocolUsed, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2), |
| 178 | 3: Uint32Field(VoipConfigData_AvailableVoipConfigurationMethods, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3), |
| 179 | 4: ByteField(VoipConfigData_VoipConfigurationMethodUsed, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4), |
| 180 | 5: Uint16Field(VoipConfigData_VoipConfigurationAddressPointer, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5), |
| 181 | 6: ByteField(VoipConfigData_VoipConfigurationState, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6), |
| 182 | 7: ByteField(VoipConfigData_RetrieveProfile, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Write), false, false, false, 7), |
| 183 | 8: MultiByteField(VoipConfigData_ProfileVersion, OctetsAttributeType, 0x0100, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), true, false, false, 8), |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 184 | }, |
| 185 | Access: CreatedByOnu, |
| 186 | Support: UnknownSupport, |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 187 | Alarms: AlarmMap{ |
| 188 | 0: "VCD config server name", |
| 189 | 1: "VCD config server reach", |
| 190 | 2: "VCD config server connect", |
| 191 | 3: "VCD config server validate", |
| 192 | 4: "VCD config server auth", |
| 193 | 5: "VCD config server timeout", |
| 194 | 6: "VCD config server fail", |
| 195 | 7: "VCD config file error", |
| 196 | 8: "VCD subscription name", |
| 197 | 9: "VCD subscription reach", |
| 198 | 10: "VCD subscription connect", |
| 199 | 11: "VCD subscription validate", |
| 200 | 12: "VCD subscription auth", |
| 201 | 13: "VCD subscription timeout", |
| 202 | 14: "VCD subscription fail", |
| 203 | 15: "VCD reboot request", |
| 204 | }, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 205 | } |
| 206 | } |
| 207 | |
| 208 | // NewVoipConfigData (class ID 138) creates the basic |
| 209 | // Managed Entity definition that is used to validate an ME of this type that |
| 210 | // is received from or transmitted to the OMCC. |
| 211 | func NewVoipConfigData(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 212 | return NewManagedEntity(*voipconfigdataBME, params...) |
| 213 | } |