blob: bfdf25b079f53da83a5c15245acce240f64d002d [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
4
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
8
9 * http://www.apache.org/licenses/LICENSE-2.0
10
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. 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
30const Dot1AgChassisManagementInfoClassID ClassID = ClassID(306)
31
32var 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
mpagenko71eb3202021-08-19 07:41:22 +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
mpagenko71eb3202021-08-19 07:41:22 +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
mpagenko71eb3202021-08-19 07:41:22 +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//
mpagenko71eb3202021-08-19 07:41:22 +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
mpagenko71eb3202021-08-19 07:41:22 +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//
mpagenko71eb3202021-08-19 07:41:22 +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
mpagenko71eb3202021-08-19 07:41:22 +000099// The length of the management address attribute, default value 0. (R,-W) (mandatory) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000100//
mpagenko71eb3202021-08-19 07:41:22 +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
116func init() {
117 dot1agchassismanagementinfoBME = &ManagedEntityDefinition{
118 Name: "Dot1AgChassisManagementInfo",
119 ClassID: 306,
120 MessageTypes: mapset.NewSetWith(
121 Get,
122 Set,
123 ),
mpagenko71eb3202021-08-19 07:41:22 +0000124 AllowedAttributeMask: 0xffc0,
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000125 AttributeDefinitions: AttributeDefinitionMap{
mpagenko71eb3202021-08-19 07:41:22 +0000126 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),
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000137 },
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}