blob: 305c13e733a4e26558f8dfbfaeed6cd55f36202e [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
8 * Unless required by applicable law or agreed to in writing, software
9 * distributed under the License is distributed on an "AS IS" BASIS,
10 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 * See the License for the specific language governing permissions and
12 * limitations under the License.
13 */
14/*
15 * NOTE: This file was generated, manual edits will be overwritten!
16 *
17 * Generated by 'goCodeGenerator.py':
18 * https://github.com/cboling/OMCI-parser/README.md
19 */
20
21package generated
22
23import "github.com/deckarep/golang-set"
24
25// Dot1AgChassisManagementInfoClassID is the 16-bit ID for the OMCI
26// Managed entity Dot1ag chassis-management info
27const Dot1AgChassisManagementInfoClassID ClassID = ClassID(306)
28
29var dot1agchassismanagementinfoBME *ManagedEntityDefinition
30
31// Dot1AgChassisManagementInfo (class ID #306)
32// This ME represents the system-level chassis ID or management address for [IEEE-802.1ag] CFM
33// messages, and potentially for other IEEE 802-based functions. Although [IEEE-802.1AB] allows for
34// several management addresses (synonyms in different formats or with granularity to the component
35// level), [IEEE-802.1ag] does not provide for more than one. Nor is it expected that an ONU would
36// require more than one format. Accordingly, this ME provides for only one.
37//
38// According to sender ID permission attributes in several dot1ag MEs, transmitted IEEE-802.1ag CFM
39// messages may include either or both of the chassis ID or management address
40// fields.[IEEE-802.1ag] requires that CCMs do not exceed 128-bytes, of which 74 are separately
41// allocated to other purposes; the sender ID TLV, if present, must accommodate this requirement.
42// The chassis info and management info must fit, with a minimum of 4 additional overhead bytes,
43// into the remaining 54-bytes. This limit is exploited in defining the maximum size of the ME's
44// attributes.
45//
46// Relationships
47// If an ONU supports [IEEE 802.1ag] functionality, it automatically creates an instance of this
48// ME.
49//
50// Attributes
51// Managed Entity Id
52// Managed entity ID: This attribute uniquely identifies this ME. There is at most one instance,
53// whose value is 0. (R) (mandatory) (2-bytes)
54//
55// Chassis Id Length
56// Chassis ID length: The length of the chassis ID attribute (not including the chassis ID subtype
57// attribute), default value 0. (R,-W) (mandatory) (1-byte)
58//
59// Chassis Id Subtype
60// (R,-W) (mandatory) (1-byte)
61//
62// Chassis Id Part 1 Chassis Id Part 2
63// Chassis ID part 1, Chassis ID part 2: These two attributes may be regarded as an octet string of
64// up to 50-bytes whose length is given by the chassis ID length attribute and whose value is the
65// left-justified chassis ID. (R,-W) (mandatory) (25-bytes-*-2 attributes)
66//
67// Management Address Domain Length
68// Management address domain length: The length of the management address domain attribute, default
69// value 0. If this attribute has the value 0, all of the other management address attributes are
70// undefined. (R,-W) (mandatory) (1-byte)
71//
72// Management Address Domain 1, Management Address Domain 2
73// Management address domain 1, Management address domain 2: These two attributes may be regarded
74// as an octet string of up to 50-bytes whose length is given by the management address domain
75// length attribute and whose value is the left-justified management address domain. The attribute
76// is coded as an object identifier (OID) as per [ITUT X.690], referring to a TDomain as defined in
77// [IETF RFC 2579]. Typical domain values include snmpUDPDomain (from SNMPv2-TM [IETF RFC 3417])
78// and snmpIeee802Domain (from SNMP-IEEE 802-TM-MIB [IETF RFC 4789]). (R,-W) (mandatory) (25-bytes
79// * 2 attributes)
80//
81// Management Address Length
82// Management address length: The length of the management address attribute, default value 0.
83// (R,-W) (mandatory) (1-byte)
84//
85// Management Address 1 Management Address 2
86// Management address 1, Management address 2: These two attributes may be regarded as an octet
87// string of up to 50-bytes whose length is given by the management address length attribute and
88// whose value is the left-justified management address. (R,-W) (mandatory) (25-bytes * 2
89// attributes)
90//
91type Dot1AgChassisManagementInfo struct {
92 ManagedEntityDefinition
93 Attributes AttributeValueMap
94}
95
96func init() {
97 dot1agchassismanagementinfoBME = &ManagedEntityDefinition{
98 Name: "Dot1AgChassisManagementInfo",
99 ClassID: 306,
100 MessageTypes: mapset.NewSetWith(
101 Get,
102 Set,
103 ),
104 AllowedAttributeMask: 0xfe00,
105 AttributeDefinitions: AttributeDefinitionMap{
106 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
107 1: ByteField("ChassisIdLength", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
108 2: ByteField("ChassisIdSubtype", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
109 3: MultiByteField("ChassisIdPart1ChassisIdPart2", OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3),
110 4: ByteField("ManagementAddressDomainLength", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
111 5: MultiByteField("ManagementAddressDomain1,ManagementAddressDomain2", OctetsAttributeType, 0x0800, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 5),
112 6: ByteField("ManagementAddressLength", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
113 7: MultiByteField("ManagementAddress1ManagementAddress2", OctetsAttributeType, 0x0200, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 7),
114 },
115 Access: CreatedByOnu,
116 Support: UnknownSupport,
117 }
118}
119
120// NewDot1AgChassisManagementInfo (class ID 306) creates the basic
121// Managed Entity definition that is used to validate an ME of this type that
122// is received from or transmitted to the OMCC.
123func NewDot1AgChassisManagementInfo(params ...ParamData) (*ManagedEntity, OmciErrors) {
124 return NewManagedEntity(*dot1agchassismanagementinfoBME, params...)
125}