blob: 60539c234dd8948318d3c1f74601447439565e6c [file] [log] [blame]
Holger Hildebrandtfa074992020-03-27 15:42:06 +00001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00004 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00005 * 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
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00008 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +000011 * 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. Bainbridged80007b2021-04-12 12:22:29 +000017/*
Holger Hildebrandtfa074992020-03-27 15:42:06 +000018 * 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
24package generated
25
26import "github.com/deckarep/golang-set"
27
28// Dot1AgChassisManagementInfoClassID is the 16-bit ID for the OMCI
29// Managed entity Dot1ag chassis-management info
mpagenko836a1fd2021-11-01 16:12:42 +000030const Dot1AgChassisManagementInfoClassID = ClassID(306) // 0x0132
Holger Hildebrandtfa074992020-03-27 15:42:06 +000031
32var dot1agchassismanagementinfoBME *ManagedEntityDefinition
33
mpagenko836a1fd2021-11-01 16:12:42 +000034// Dot1AgChassisManagementInfo (Class ID: #306 / 0x0132)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000035// 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
mpagenkodcd63cf2021-08-19 07:31:08 +000055// This attribute uniquely identifies this ME. There is at most one instance, whose value is 0. (R)
56// (mandatory) (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000057//
58// Chassis Id Length
mpagenkodcd63cf2021-08-19 07:31:08 +000059// The length of the chassis ID attribute (not including the chassis ID subtype attribute), default
60// value 0. (R,-W) (mandatory) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000061//
62// Chassis Id Subtype
mpagenkodcd63cf2021-08-19 07:31:08 +000063// The format of the chassis ID attribute, default value 7, as defined in [IEEE 802.1AB]:
64//
Holger Hildebrandtfa074992020-03-27 15:42:06 +000065// (R,-W) (mandatory) (1-byte)
66//
mpagenkodcd63cf2021-08-19 07:31:08 +000067// 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)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000076//
77// Management Address Domain Length
mpagenkodcd63cf2021-08-19 07:31:08 +000078// 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)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000081//
mpagenkodcd63cf2021-08-19 07:31:08 +000082// 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)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000097//
98// Management Address Length
mpagenkodcd63cf2021-08-19 07:31:08 +000099// The length of the management address attribute, default value 0. (R,-W) (mandatory) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000100//
mpagenkodcd63cf2021-08-19 07:31:08 +0000101// 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)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000110//
111type Dot1AgChassisManagementInfo struct {
112 ManagedEntityDefinition
113 Attributes AttributeValueMap
114}
115
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000116// Attribute name constants
117
118const Dot1AgChassisManagementInfo_ChassisIdLength = "ChassisIdLength"
119const Dot1AgChassisManagementInfo_ChassisIdSubtype = "ChassisIdSubtype"
120const Dot1AgChassisManagementInfo_ChassisIdPart1 = "ChassisIdPart1"
121const Dot1AgChassisManagementInfo_ChassisIdPart2 = "ChassisIdPart2"
122const Dot1AgChassisManagementInfo_ManagementAddressDomainLength = "ManagementAddressDomainLength"
123const Dot1AgChassisManagementInfo_ManagementAddressDomain1 = "ManagementAddressDomain1"
124const Dot1AgChassisManagementInfo_ManagementAddressDomain2 = "ManagementAddressDomain2"
125const Dot1AgChassisManagementInfo_ManagementAddressLength = "ManagementAddressLength"
126const Dot1AgChassisManagementInfo_ManagementAddress1 = "ManagementAddress1"
127const Dot1AgChassisManagementInfo_ManagementAddress2 = "ManagementAddress2"
128
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000129func init() {
130 dot1agchassismanagementinfoBME = &ManagedEntityDefinition{
131 Name: "Dot1AgChassisManagementInfo",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000132 ClassID: Dot1AgChassisManagementInfoClassID,
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000133 MessageTypes: mapset.NewSetWith(
134 Get,
135 Set,
136 ),
mpagenkodcd63cf2021-08-19 07:31:08 +0000137 AllowedAttributeMask: 0xffc0,
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000138 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000139 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
140 1: ByteField(Dot1AgChassisManagementInfo_ChassisIdLength, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
141 2: ByteField(Dot1AgChassisManagementInfo_ChassisIdSubtype, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
142 3: MultiByteField(Dot1AgChassisManagementInfo_ChassisIdPart1, OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3),
143 4: MultiByteField(Dot1AgChassisManagementInfo_ChassisIdPart2, OctetsAttributeType, 0x1000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 4),
144 5: ByteField(Dot1AgChassisManagementInfo_ManagementAddressDomainLength, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
145 6: MultiByteField(Dot1AgChassisManagementInfo_ManagementAddressDomain1, OctetsAttributeType, 0x0400, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 6),
146 7: MultiByteField(Dot1AgChassisManagementInfo_ManagementAddressDomain2, OctetsAttributeType, 0x0200, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 7),
147 8: ByteField(Dot1AgChassisManagementInfo_ManagementAddressLength, UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, false, false, 8),
148 9: MultiByteField(Dot1AgChassisManagementInfo_ManagementAddress1, OctetsAttributeType, 0x0080, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 9),
149 10: MultiByteField(Dot1AgChassisManagementInfo_ManagementAddress2, OctetsAttributeType, 0x0040, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 10),
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000150 },
151 Access: CreatedByOnu,
152 Support: UnknownSupport,
153 }
154}
155
156// NewDot1AgChassisManagementInfo (class ID 306) creates the basic
157// Managed Entity definition that is used to validate an ME of this type that
158// is received from or transmitted to the OMCC.
159func NewDot1AgChassisManagementInfo(params ...ParamData) (*ManagedEntity, OmciErrors) {
160 return NewManagedEntity(*dot1agchassismanagementinfoBME, params...)
161}