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 | */ |
David K. Bainbridge | adf422d | 2021-04-09 16:06:41 +0000 | [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 | // Dot1AgChassisManagementInfoClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Dot1ag chassis-management info |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const Dot1AgChassisManagementInfoClassID = ClassID(306) // 0x0132 |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var dot1agchassismanagementinfoBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // Dot1AgChassisManagementInfo (Class ID: #306 / 0x0132) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // This ME represents the system-level chassis ID or management address for [IEEE-802.1ag] CFM |
| 36 | // messages, and potentially for other IEEE 802-based functions. Although [IEEE-802.1AB] allows for |
| 37 | // several management addresses (synonyms in different formats or with granularity to the component |
| 38 | // level), [IEEE-802.1ag] does not provide for more than one. Nor is it expected that an ONU would |
| 39 | // require more than one format. Accordingly, this ME provides for only one. |
| 40 | // |
| 41 | // According to sender ID permission attributes in several dot1ag MEs, transmitted IEEE-802.1ag CFM |
| 42 | // messages may include either or both of the chassis ID or management address |
| 43 | // fields.[IEEE-802.1ag] requires that CCMs do not exceed 128-bytes, of which 74 are separately |
| 44 | // allocated to other purposes; the sender ID TLV, if present, must accommodate this requirement. |
| 45 | // The chassis info and management info must fit, with a minimum of 4 additional overhead bytes, |
| 46 | // into the remaining 54-bytes. This limit is exploited in defining the maximum size of the ME's |
| 47 | // attributes. |
| 48 | // |
| 49 | // Relationships |
| 50 | // If an ONU supports [IEEE 802.1ag] functionality, it automatically creates an instance of this |
| 51 | // ME. |
| 52 | // |
| 53 | // Attributes |
| 54 | // Managed Entity Id |
Chip Boling | 8fddd11 | 2021-08-11 09:58:20 -0500 | [diff] [blame] | 55 | // This attribute uniquely identifies this ME. There is at most one instance, whose value is 0. (R) |
| 56 | // (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 57 | // |
| 58 | // Chassis Id Length |
Chip Boling | 8fddd11 | 2021-08-11 09:58:20 -0500 | [diff] [blame] | 59 | // The length of the chassis ID attribute (not including the chassis ID subtype attribute), default |
| 60 | // value 0. (R,-W) (mandatory) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 61 | // |
| 62 | // Chassis Id Subtype |
Chip Boling | 8fddd11 | 2021-08-11 09:58:20 -0500 | [diff] [blame] | 63 | // The format of the chassis ID attribute, default value 7, as defined in [IEEE 802.1AB]: |
| 64 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 65 | // (R,-W) (mandatory) (1-byte) |
| 66 | // |
Chip Boling | 8fddd11 | 2021-08-11 09:58:20 -0500 | [diff] [blame] | 67 | // Chassis ID Part 1 |
| 68 | // These two attributes may be regarded as an octet string of up to 50-bytes whose length is given |
| 69 | // by the chassis ID length attribute and whose value is the left-justified chassis ID. (R,-W) |
| 70 | // (mandatory) (25-bytes-*-2 attributes) |
| 71 | // |
| 72 | // Chassis ID Part 2 |
| 73 | // These two attributes may be regarded as an octet string of up to 50-bytes whose length is given |
| 74 | // by the chassis ID length attribute and whose value is the left-justified chassis ID. (R,-W) |
| 75 | // (mandatory) (25-bytes-*-2 attributes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 76 | // |
| 77 | // Management Address Domain Length |
Chip Boling | 8fddd11 | 2021-08-11 09:58:20 -0500 | [diff] [blame] | 78 | // The length of the management address domain attribute, default value 0. If this attribute has |
| 79 | // the value 0, all of the other management address attributes are undefined. (R,-W) (mandatory) |
| 80 | // (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 81 | // |
Chip Boling | 8fddd11 | 2021-08-11 09:58:20 -0500 | [diff] [blame] | 82 | // Management Address Domain 1 |
| 83 | // These two attributes may be regarded as an octet string of up to 50-bytes whose length is given |
| 84 | // by the management address domain length attribute and whose value is the left-justified |
| 85 | // management address domain. The attribute is coded as an object identifier (OID) as per [ITUT |
| 86 | // X.690], referring to a TDomain as defined in [IETF RFC 2579]. Typical domain values include |
| 87 | // snmpUDPDomain (from SNMPv2-TM [IETF RFC 3417]) and snmpIeee802Domain (from SNMP-IEEE 802-TM-MIB |
| 88 | // [IETF RFC 4789]). (R,-W) (mandatory) (25-bytes * 2 attributes) |
| 89 | // |
| 90 | // Management Address Domain 2 |
| 91 | // These two attributes may be regarded as an octet string of up to 50-bytes whose length is given |
| 92 | // by the management address domain length attribute and whose value is the left-justified |
| 93 | // management address domain. The attribute is coded as an object identifier (OID) as per [ITUT |
| 94 | // X.690], referring to a TDomain as defined in [IETF RFC 2579]. Typical domain values include |
| 95 | // snmpUDPDomain (from SNMPv2-TM [IETF RFC 3417]) and snmpIeee802Domain (from SNMP-IEEE 802-TM-MIB |
| 96 | // [IETF RFC 4789]). (R,-W) (mandatory) (25-bytes * 2 attributes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 97 | // |
| 98 | // Management Address Length |
Chip Boling | 8fddd11 | 2021-08-11 09:58:20 -0500 | [diff] [blame] | 99 | // The length of the management address attribute, default value 0. (R,-W) (mandatory) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 100 | // |
Chip Boling | 8fddd11 | 2021-08-11 09:58:20 -0500 | [diff] [blame] | 101 | // Management Address 1 |
| 102 | // These two attributes may be regarded as an octet string of up to 50-bytes whose length is given |
| 103 | // by the management address length attribute and whose value is the left-justified management |
| 104 | // address. (R,-W) (mandatory) (25-bytes * 2 attributes) |
| 105 | // |
| 106 | // Management Address 2 |
| 107 | // These two attributes may be regarded as an octet string of up to 50-bytes whose length is given |
| 108 | // by the management address length attribute and whose value is the left-justified management |
| 109 | // address. (R,-W) (mandatory) (25-bytes * 2 attributes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 110 | // |
| 111 | type Dot1AgChassisManagementInfo struct { |
| 112 | ManagedEntityDefinition |
| 113 | Attributes AttributeValueMap |
| 114 | } |
| 115 | |
| 116 | func init() { |
| 117 | dot1agchassismanagementinfoBME = &ManagedEntityDefinition{ |
| 118 | Name: "Dot1AgChassisManagementInfo", |
| 119 | ClassID: 306, |
| 120 | MessageTypes: mapset.NewSetWith( |
| 121 | Get, |
| 122 | Set, |
| 123 | ), |
Chip Boling | 8fddd11 | 2021-08-11 09:58:20 -0500 | [diff] [blame] | 124 | AllowedAttributeMask: 0xffc0, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 125 | AttributeDefinitions: AttributeDefinitionMap{ |
Chip Boling | 8fddd11 | 2021-08-11 09:58:20 -0500 | [diff] [blame] | 126 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 127 | 1: ByteField("ChassisIdLength", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1), |
| 128 | 2: ByteField("ChassisIdSubtype", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2), |
| 129 | 3: MultiByteField("ChassisIdPart1", OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3), |
| 130 | 4: MultiByteField("ChassisIdPart2", OctetsAttributeType, 0x1000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 4), |
| 131 | 5: ByteField("ManagementAddressDomainLength", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5), |
| 132 | 6: MultiByteField("ManagementAddressDomain1", OctetsAttributeType, 0x0400, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 6), |
| 133 | 7: MultiByteField("ManagementAddressDomain2", OctetsAttributeType, 0x0200, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 7), |
| 134 | 8: ByteField("ManagementAddressLength", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, false, false, 8), |
| 135 | 9: MultiByteField("ManagementAddress1", OctetsAttributeType, 0x0080, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 9), |
| 136 | 10: MultiByteField("ManagementAddress2", OctetsAttributeType, 0x0040, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 10), |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 137 | }, |
| 138 | Access: CreatedByOnu, |
| 139 | Support: UnknownSupport, |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | // NewDot1AgChassisManagementInfo (class ID 306) creates the basic |
| 144 | // Managed Entity definition that is used to validate an ME of this type that |
| 145 | // is received from or transmitted to the OMCC. |
| 146 | func NewDot1AgChassisManagementInfo(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 147 | return NewManagedEntity(*dot1agchassismanagementinfoBME, params...) |
| 148 | } |