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 | // MgcConfigDataClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity MGC config data |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const MgcConfigDataClassID = ClassID(155) // 0x009b |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var mgcconfigdataBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // MgcConfigData (Class ID: #155 / 0x009b) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // The MGC config data ME defines the MGC configuration associated with an MG subscriber. It is |
| 36 | // conditionally required for ONUs that support ITU-T H.248 VoIP services. If a non-OMCI interface |
| 37 | // is used to manage VoIP signalling, this ME is unnecessary. |
| 38 | // |
| 39 | // Instances of this ME are created and deleted by the OLT. |
| 40 | // |
| 41 | // Relationships |
| 42 | // An instance of this ME may be associated with one or more VoIP voice CTP MEs. |
| 43 | // |
| 44 | // Attributes |
| 45 | // Managed Entity Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 46 | // This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory) |
| 47 | // (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 48 | // |
| 49 | // Primary Mgc |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 50 | // This attribute points to a network address ME that contains the name (IP-address or resolved |
| 51 | // name) of the primary MGC that controls the signalling messages. The port is optional and |
| 52 | // defaults to 2944 for text message formats and 2955 for binary message formats. (R,-W, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 53 | // setbycreate) (mandatory) (2-bytes) |
| 54 | // |
| 55 | // Secondary Mgc |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 56 | // This attribute points to a network address ME that contains the name (IP-address or resolved |
| 57 | // name) of the secondary or backup MGC that controls the signalling messages. The port is optional |
| 58 | // and defaults to 2944 for text message formats and 2955 for binary message formats. (R,-W, |
| 59 | // setbycreate) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 60 | // |
| 61 | // Tcp_Udp Pointer |
| 62 | // TCP/UDP pointer: This attribute points to the TCP/UDP config data ME to be used for |
| 63 | // communication with the MGC. (R,-W, setbycreate) (mandatory) (2-bytes) |
| 64 | // |
| 65 | // Version |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 66 | // This integer attribute reports the version of the Megaco protocol in use. The ONU should deny an |
| 67 | // attempt by the OLT to set or create a value that it does not support. The value 0 indicates that |
| 68 | // no particular version is specified. (R,-W, setbycreate) (mandatory) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 69 | // |
| 70 | // Message Format |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 71 | // This attribute defines the message format. Valid values are as follows. |
| 72 | // |
| 73 | // 0 Text long |
| 74 | // |
| 75 | // 1 Text short |
| 76 | // |
| 77 | // 2 Binary |
| 78 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 79 | // The default value is recommended to be 0. (R,-W, setbycreate) (mandatory) (1-byte) |
| 80 | // |
| 81 | // Maximum Retry Time |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 82 | // This attribute specifies the maximum retry time for MGC transactions, in seconds. The default |
| 83 | // value 0 specifies vendor-specific implementation. (R,-W) (optional) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 84 | // |
| 85 | // Maximum Retry Attempts |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 86 | // This attribute specifies the maximum number of times a message is retransmitted to the MGC. The |
| 87 | // recommended default value 0 specifies vendor-specific implementation. (R,-W, setbycreate) |
| 88 | // (optional) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 89 | // |
| 90 | // Service Change Delay |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 91 | // This attribute specifies the service status delay time for changes in line service status. This |
| 92 | // attribute is specified in seconds. The default value 0 specifies no delay. (R,-W) (optional) |
| 93 | // (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 94 | // |
| 95 | // Termination Id Base |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 96 | // This attribute specifies the base string for the ITU-T H.248 physical termination ID(s) for this |
| 97 | // ONU. This string is intended to uniquely identify an ONU. Vendor-specific termination |
| 98 | // identifiers (port IDs) are optionally added to this string to uniquely identify a termination on |
| 99 | // a specific ONU. (R,-W) (optional) (25-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 100 | // |
| 101 | // Softswitch |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 102 | // This attribute identifies the gateway softswitch vendor. The format is four ASCII coded |
| 103 | // alphabetic characters [A..Z] as defined in [ATIS0300220]. A value of four null bytes indicates |
| 104 | // an unknown or unspecified vendor. (R,-W, setbycreate) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 105 | // |
| 106 | // Message Id Pointer |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 107 | // This attribute points to a large string whose value specifies the message identifier string for |
| 108 | // ITU-T H.248 messages originated by the ONU. (R, W, setbycreate) (optional) (2 bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 109 | // |
| 110 | type MgcConfigData struct { |
| 111 | ManagedEntityDefinition |
| 112 | Attributes AttributeValueMap |
| 113 | } |
| 114 | |
| 115 | func init() { |
| 116 | mgcconfigdataBME = &ManagedEntityDefinition{ |
| 117 | Name: "MgcConfigData", |
| 118 | ClassID: 155, |
| 119 | MessageTypes: mapset.NewSetWith( |
| 120 | Create, |
| 121 | Delete, |
| 122 | Get, |
| 123 | Set, |
| 124 | ), |
| 125 | AllowedAttributeMask: 0xffe0, |
| 126 | AttributeDefinitions: AttributeDefinitionMap{ |
| 127 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 128 | 1: Uint16Field("PrimaryMgc", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 129 | 2: Uint16Field("SecondaryMgc", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 130 | 3: Uint16Field("TcpUdpPointer", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3), |
| 131 | 4: ByteField("Version", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4), |
| 132 | 5: ByteField("MessageFormat", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5), |
| 133 | 6: Uint16Field("MaximumRetryTime", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, true, false, 6), |
| 134 | 7: Uint16Field("MaximumRetryAttempts", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 7), |
| 135 | 8: Uint16Field("ServiceChangeDelay", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8), |
| 136 | 9: MultiByteField("TerminationIdBase", OctetsAttributeType, 0x0080, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 9), |
| 137 | 10: Uint32Field("Softswitch", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10), |
| 138 | 11: Uint16Field("MessageIdPointer", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 11), |
| 139 | }, |
| 140 | Access: CreatedByOlt, |
| 141 | Support: UnknownSupport, |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 142 | Alarms: AlarmMap{ |
| 143 | 0: "Timeout", |
| 144 | }, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 145 | } |
| 146 | } |
| 147 | |
| 148 | // NewMgcConfigData (class ID 155) creates the basic |
| 149 | // Managed Entity definition that is used to validate an ME of this type that |
| 150 | // is received from or transmitted to the OMCC. |
| 151 | func NewMgcConfigData(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 152 | return NewManagedEntity(*mgcconfigdataBME, params...) |
| 153 | } |