blob: acb599fc030c50fa300fbcf3f8f004f93dcf93c7 [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// Dot1AgMaintenanceAssociationClassID is the 16-bit ID for the OMCI
29// Managed entity Dot1ag maintenance association
30const Dot1AgMaintenanceAssociationClassID ClassID = ClassID(300)
31
32var dot1agmaintenanceassociationBME *ManagedEntityDefinition
33
34// Dot1AgMaintenanceAssociation (class ID #300)
35// This ME models an [IEEE 802.1ag] service defined on a bridge port. An MA is a set of endpoints
36// on opposite sides of a network, all existing at a defined maintenance level. One of the
37// endpoints resides on the local ONU; the others are understood to be configured in a consistent
38// way on external equipment. [ITUT Y.1731] refers to the MA as a maintenance entity group (MEG).
39//
40// An MA is created and deleted by the OLT.
41//
42// Relationships
43// Any number of MAs may be associated with a given MD, or may stand on their own without an MD.
44// One or more MAs may be associated with a MAC bridge or an IEEE 802.1p mapper. An MA exists at
45// one of eight possible maintenance levels.
46//
47// Attributes
48// Managed Entity Id
mpagenko71eb3202021-08-19 07:41:22 +000049// This attribute uniquely identifies an instance of this ME. The values 0 and 0xFFFF are reserved.
50// (R, setbycreate) (mandatory) (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000051//
52// Md Pointer
mpagenko71eb3202021-08-19 07:41:22 +000053// This pointer specifies the dot1ag maintenance domain with which this MA is associated. A null
54// pointer specifies that the MA is not associated with an MD. (R,-W, setbycreate) (mandatory)
55// (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000056//
57// Short Ma Name Format
mpagenko71eb3202021-08-19 07:41:22 +000058// This attribute specifies one of several possible formats for the short MA name attribute. Value
59// 1, the primary VLAN ID, is recommended to be the default. (R,-W, setbycreate) (mandatory)
60// (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000061//
mpagenko71eb3202021-08-19 07:41:22 +000062// Short MA Name 1
63// These two attributes may be regarded as an octet string whose value is the left-justified MA
64// name. Because the MA name may or may not be a printable character string, an octet string is the
65// appropriate representation. If the short MA name format specifies a character string, the string
66// is null-terminated; otherwise, its length is determined by the short MA name format. Note that
67// binary comparisons of the short MA name are made in other CFM state machines, so blanks,
68// alphabetic case, etc., are significant. Also, note that the MD name and the MA short name must
69// be packed (with additional bytes) into 48-byte CFM message headers. (R,-W) (mandatory) (25-bytes
70// * 2 attributes)
71//
72// Short MA Name 2
73// These two attributes may be regarded as an octet string whose value is the left-justified MA
74// name. Because the MA name may or may not be a printable character string, an octet string is the
75// appropriate representation. If the short MA name format specifies a character string, the string
76// is null-terminated; otherwise, its length is determined by the short MA name format. Note that
77// binary comparisons of the short MA name are made in other CFM state machines, so blanks,
78// alphabetic case, etc., are significant. Also, note that the MD name and the MA short name must
79// be packed (with additional bytes) into 48-byte CFM message headers. (R,-W) (mandatory) (25-bytes
80// * 2 attributes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000081//
82// Continuity Check Message Ccm Interval
mpagenko71eb3202021-08-19 07:41:22 +000083// 3: 100 ms
84//
85// 4: 1 s
86//
87// 5: 10 s
88//
89// 6: 1 min
90//
91// 7: 10 min
92//
Holger Hildebrandtfa074992020-03-27 15:42:06 +000093// Short intervals should be used judiciously, as they can interfere with the network's ability to
94// handle subscriber traffic. The recommended value is 1-s. (R,-W, setbycreate) (mandatory)
95// (1-byte)
96//
mpagenko71eb3202021-08-19 07:41:22 +000097// Continuity check message (CCM) interval: If CCMs are enabled on an MEP, the CCM interval
98// attribute specifies the rate at which they are generated. The MEP also expects to receive CCMs
99// from each of the other MEPs in its CC database at this rate.
100//
101// 0: CCM transmission disabled
102//
103// 1: 3.33 ms
104//
105// 2: 10 ms
106//
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000107// Associated Vlans
mpagenko71eb3202021-08-19 07:41:22 +0000108// This attribute is a list of up to 12 VLAN IDs with which this MA is associated. Once a set of
109// VLANs is defined, the ONU should deny operations to other dot1ag MAs or dot1ag default MD level
110// entries that conflict with the set membership. The all-zeros value indicates that this MA is not
111// associated with any VLANs. Assuming that the attribute is not 0, the first entry is understood
112// to be the primary VLAN. Except forwarded linktrace messages (LTMs), CFM messages emitted by MPs
113// in this MA are tagged with the primary VLAN ID. (R,-W) (mandatory) (2-bytes/entry *
114// 12-entries-=-24-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000115//
116// Mhf Creation
mpagenko71eb3202021-08-19 07:41:22 +0000117// This attribute determines whether the bridge creates an MHF, under circumstances defined in
118// clause 22.2.3 of [IEEE 802.1ag]. This attribute is an enumeration with the following values:
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000119//
mpagenko71eb3202021-08-19 07:41:22 +0000120// 1 None. No MHFs are created on this bridge for this MA.
121//
122// 2 Default (IEEE 802.1ag term). The bridge can create MHFs on this VID on any port through which
123// the VID can pass.
124//
125// 3 Explicit. The bridge can create MHFs on this VID on any port through which the VID can pass,
126// but only if an MEP exists at some lower maintenance level.
127//
128// 4 Defer. This value causes the ONU to use the setting of the parent MD. This is recommended to
129// be the default value.
130//
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000131// (R,-W, setbycreate) (mandatory) (1-byte)
132//
133type Dot1AgMaintenanceAssociation struct {
134 ManagedEntityDefinition
135 Attributes AttributeValueMap
136}
137
138func init() {
139 dot1agmaintenanceassociationBME = &ManagedEntityDefinition{
140 Name: "Dot1AgMaintenanceAssociation",
141 ClassID: 300,
142 MessageTypes: mapset.NewSetWith(
143 Create,
144 Delete,
145 Get,
146 Set,
147 ),
148 AllowedAttributeMask: 0xfe00,
149 AttributeDefinitions: AttributeDefinitionMap{
150 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
151 1: Uint16Field("MdPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
152 2: ByteField("ShortMaNameFormat", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
mpagenko71eb3202021-08-19 07:41:22 +0000153 3: MultiByteField("ShortMaName1", OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3),
154 4: MultiByteField("ShortMaName2", OctetsAttributeType, 0x1000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 4),
155 5: ByteField("ContinuityCheckMessageCcmInterval", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
156 6: Uint16Field("AssociatedVlans", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
157 7: ByteField("MhfCreation", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000158 },
159 Access: CreatedByOlt,
160 Support: UnknownSupport,
161 }
162}
163
164// NewDot1AgMaintenanceAssociation (class ID 300) creates the basic
165// Managed Entity definition that is used to validate an ME of this type that
166// is received from or transmitted to the OMCC.
167func NewDot1AgMaintenanceAssociation(params ...ParamData) (*ManagedEntity, OmciErrors) {
168 return NewManagedEntity(*dot1agmaintenanceassociationBME, params...)
169}