blob: 75d0106d88be723c97756d486b2b737ba936433d [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Andrea Campanella7167ebb2020-02-24 09:56:38 +01003 * Copyright 2020-present Open Networking Foundation
4
Chip Boling6e27b352020-02-14 09:10:01 -06005 * 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 Campanella7167ebb2020-02-24 09:56:38 +01008
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Andrea Campanella7167ebb2020-02-24 09:56:38 +010010
Chip Boling6e27b352020-02-14 09:10:01 -060011 * 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. Bainbridgeadf422d2021-04-09 16:06:41 +000017/*
Chip Boling6e27b352020-02-14 09:10:01 -060018 * 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
Chip Boling610117d2021-09-09 11:24:34 -050030const Dot1AgChassisManagementInfoClassID = ClassID(306) // 0x0132
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var dot1agchassismanagementinfoBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// Dot1AgChassisManagementInfo (Class ID: #306 / 0x0132)
Chip Boling6e27b352020-02-14 09:10:01 -060035// 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 Boling8fddd112021-08-11 09:58:20 -050055// This attribute uniquely identifies this ME. There is at most one instance, whose value is 0. (R)
56// (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060057//
58// Chassis Id Length
Chip Boling8fddd112021-08-11 09:58:20 -050059// The length of the chassis ID attribute (not including the chassis ID subtype attribute), default
60// value 0. (R,-W) (mandatory) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -060061//
62// Chassis Id Subtype
Chip Boling8fddd112021-08-11 09:58:20 -050063// The format of the chassis ID attribute, default value 7, as defined in [IEEE 802.1AB]:
64//
Chip Boling6e27b352020-02-14 09:10:01 -060065// (R,-W) (mandatory) (1-byte)
66//
Chip Boling8fddd112021-08-11 09:58:20 -050067// 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 Boling6e27b352020-02-14 09:10:01 -060076//
77// Management Address Domain Length
Chip Boling8fddd112021-08-11 09:58:20 -050078// 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 Boling6e27b352020-02-14 09:10:01 -060081//
Chip Boling8fddd112021-08-11 09:58:20 -050082// 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 Boling6e27b352020-02-14 09:10:01 -060097//
98// Management Address Length
Chip Boling8fddd112021-08-11 09:58:20 -050099// The length of the management address attribute, default value 0. (R,-W) (mandatory) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -0600100//
Chip Boling8fddd112021-08-11 09:58:20 -0500101// 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 Boling6e27b352020-02-14 09:10:01 -0600110//
111type Dot1AgChassisManagementInfo struct {
112 ManagedEntityDefinition
113 Attributes AttributeValueMap
114}
115
116func init() {
117 dot1agchassismanagementinfoBME = &ManagedEntityDefinition{
118 Name: "Dot1AgChassisManagementInfo",
119 ClassID: 306,
120 MessageTypes: mapset.NewSetWith(
121 Get,
122 Set,
123 ),
Chip Boling8fddd112021-08-11 09:58:20 -0500124 AllowedAttributeMask: 0xffc0,
Chip Boling6e27b352020-02-14 09:10:01 -0600125 AttributeDefinitions: AttributeDefinitionMap{
Chip Boling8fddd112021-08-11 09:58:20 -0500126 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 Boling6e27b352020-02-14 09:10:01 -0600137 },
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.
146func NewDot1AgChassisManagementInfo(params ...ParamData) (*ManagedEntity, OmciErrors) {
147 return NewManagedEntity(*dot1agchassismanagementinfoBME, params...)
148}