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 | // Dot1AgChassisManagementInfoClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Dot1ag chassis-management info |
| 30 | const Dot1AgChassisManagementInfoClassID ClassID = ClassID(306) |
| 31 | |
| 32 | var dot1agchassismanagementinfoBME *ManagedEntityDefinition |
| 33 | |
| 34 | // Dot1AgChassisManagementInfo (class ID #306) |
| 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 |
| 55 | // Managed entity ID: This attribute uniquely identifies this ME. There is at most one instance, |
| 56 | // whose value is 0. (R) (mandatory) (2-bytes) |
| 57 | // |
| 58 | // Chassis Id Length |
| 59 | // Chassis ID length: The length of the chassis ID attribute (not including the chassis ID subtype |
| 60 | // attribute), default value 0. (R,-W) (mandatory) (1-byte) |
| 61 | // |
| 62 | // Chassis Id Subtype |
| 63 | // (R,-W) (mandatory) (1-byte) |
| 64 | // |
| 65 | // Chassis Id Part 1 Chassis Id Part 2 |
| 66 | // Chassis ID part 1, Chassis ID part 2: These two attributes may be regarded as an octet string of |
| 67 | // up to 50-bytes whose length is given by the chassis ID length attribute and whose value is the |
| 68 | // left-justified chassis ID. (R,-W) (mandatory) (25-bytes-*-2 attributes) |
| 69 | // |
| 70 | // Management Address Domain Length |
| 71 | // Management address domain length: The length of the management address domain attribute, default |
| 72 | // value 0. If this attribute has the value 0, all of the other management address attributes are |
| 73 | // undefined. (R,-W) (mandatory) (1-byte) |
| 74 | // |
| 75 | // Management Address Domain 1, Management Address Domain 2 |
| 76 | // Management address domain 1, Management address domain 2: These two attributes may be regarded |
| 77 | // as an octet string of up to 50-bytes whose length is given by the management address domain |
| 78 | // length attribute and whose value is the left-justified management address domain. The attribute |
| 79 | // is coded as an object identifier (OID) as per [ITUT X.690], referring to a TDomain as defined in |
| 80 | // [IETF RFC 2579]. Typical domain values include snmpUDPDomain (from SNMPv2-TM [IETF RFC 3417]) |
| 81 | // and snmpIeee802Domain (from SNMP-IEEE 802-TM-MIB [IETF RFC 4789]). (R,-W) (mandatory) (25-bytes |
| 82 | // * 2 attributes) |
| 83 | // |
| 84 | // Management Address Length |
| 85 | // Management address length: The length of the management address attribute, default value 0. |
| 86 | // (R,-W) (mandatory) (1-byte) |
| 87 | // |
| 88 | // Management Address 1 Management Address 2 |
| 89 | // Management address 1, Management address 2: These two attributes may be regarded as an octet |
| 90 | // string of up to 50-bytes whose length is given by the management address length attribute and |
| 91 | // whose value is the left-justified management address. (R,-W) (mandatory) (25-bytes * 2 |
| 92 | // attributes) |
| 93 | // |
| 94 | type Dot1AgChassisManagementInfo struct { |
| 95 | ManagedEntityDefinition |
| 96 | Attributes AttributeValueMap |
| 97 | } |
| 98 | |
| 99 | func init() { |
| 100 | dot1agchassismanagementinfoBME = &ManagedEntityDefinition{ |
| 101 | Name: "Dot1AgChassisManagementInfo", |
| 102 | ClassID: 306, |
| 103 | MessageTypes: mapset.NewSetWith( |
| 104 | Get, |
| 105 | Set, |
| 106 | ), |
| 107 | AllowedAttributeMask: 0xfe00, |
| 108 | AttributeDefinitions: AttributeDefinitionMap{ |
| 109 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 110 | 1: ByteField("ChassisIdLength", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1), |
| 111 | 2: ByteField("ChassisIdSubtype", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2), |
| 112 | 3: MultiByteField("ChassisIdPart1ChassisIdPart2", OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3), |
| 113 | 4: ByteField("ManagementAddressDomainLength", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4), |
| 114 | 5: MultiByteField("ManagementAddressDomain1,ManagementAddressDomain2", OctetsAttributeType, 0x0800, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 5), |
| 115 | 6: ByteField("ManagementAddressLength", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6), |
| 116 | 7: MultiByteField("ManagementAddress1ManagementAddress2", OctetsAttributeType, 0x0200, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 7), |
| 117 | }, |
| 118 | Access: CreatedByOnu, |
| 119 | Support: UnknownSupport, |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | // NewDot1AgChassisManagementInfo (class ID 306) creates the basic |
| 124 | // Managed Entity definition that is used to validate an ME of this type that |
| 125 | // is received from or transmitted to the OMCC. |
| 126 | func NewDot1AgChassisManagementInfo(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 127 | return NewManagedEntity(*dot1agchassismanagementinfoBME, params...) |
| 128 | } |