blob: b5ccf8779071986bfbad693e0d05ce90e30b0326 [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// Dot1AgMaintenanceAssociationClassID is the 16-bit ID for the OMCI
26// Managed entity Dot1ag maintenance association
27const Dot1AgMaintenanceAssociationClassID ClassID = ClassID(300)
28
29var dot1agmaintenanceassociationBME *ManagedEntityDefinition
30
31// Dot1AgMaintenanceAssociation (class ID #300)
32// This ME models an [IEEE 802.1ag] service defined on a bridge port. An MA is a set of endpoints
33// on opposite sides of a network, all existing at a defined maintenance level. One of the
34// endpoints resides on the local ONU; the others are understood to be configured in a consistent
35// way on external equipment. [ITUT Y.1731] refers to the MA as a maintenance entity group (MEG).
36//
37// An MA is created and deleted by the OLT.
38//
39// Relationships
40// Any number of MAs may be associated with a given MD, or may stand on their own without an MD.
41// One or more MAs may be associated with a MAC bridge or an IEEE 802.1p mapper. An MA exists at
42// one of eight possible maintenance levels.
43//
44// Attributes
45// Managed Entity Id
46// Managed entity ID: This attribute uniquely identifies an instance of this ME. The values 0 and
47// 0xFFFF are reserved. (R, setbycreate) (mandatory) (2-bytes)
48//
49// Md Pointer
50// MD pointer: This pointer specifies the dot1ag maintenance domain with which this MA is
51// associated. A null pointer specifies that the MA is not associated with an MD. (R,-W,
52// setbycreate) (mandatory) (2-bytes)
53//
54// Short Ma Name Format
55// Short MA name format: This attribute specifies one of several possible formats for the short MA
56// name attribute. Value 1, the primary VLAN ID, is recommended to be the default. (R,-W,
57// setbycreate) (mandatory) (1-byte)
58//
59// Short Ma Name 1, Short Ma Name 2
60// Short MA name 1, Short MA name 2: These two attributes may be regarded as an octet string whose
61// value is the left-justified MA name. Because the MA name may or may not be a printable character
62// string, an octet string is the appropriate representation. If the short MA name format specifies
63// a character string, the string is null-terminated; otherwise, its length is determined by the
64// short MA name format. Note that binary comparisons of the short MA name are made in other CFM
65// state machines, so blanks, alphabetic case, etc., are significant. Also, note that the MD name
66// and the MA short name must be packed (with additional bytes) into 48-byte CFM message headers.
67// (R,-W) (mandatory) (25-bytes * 2 attributes)
68//
69// Continuity Check Message Ccm Interval
70// Short intervals should be used judiciously, as they can interfere with the network's ability to
71// handle subscriber traffic. The recommended value is 1-s. (R,-W, setbycreate) (mandatory)
72// (1-byte)
73//
74// Associated Vlans
75// Associated VLANs: This attribute is a list of up to 12 VLAN IDs with which this MA is
76// associated. Once a set of VLANs is defined, the ONU should deny operations to other dot1ag MAs
77// or dot1ag default MD level entries that conflict with the set membership. The all-zeros value
78// indicates that this MA is not associated with any VLANs. Assuming that the attribute is not 0,
79// the first entry is understood to be the primary VLAN. Except forwarded linktrace messages
80// (LTMs), CFM messages emitted by MPs in this MA are tagged with the primary VLAN ID. (R,-W)
81// (mandatory) (2-bytes/entry * 12-entries-=-24-bytes)
82//
83// Mhf Creation
84// (R,-W, setbycreate) (mandatory) (1-byte)
85//
86// Sender Id Permission
87// (R,-W, setbycreate) (mandatory) (1-byte)
88//
89type Dot1AgMaintenanceAssociation struct {
90 ManagedEntityDefinition
91 Attributes AttributeValueMap
92}
93
94func init() {
95 dot1agmaintenanceassociationBME = &ManagedEntityDefinition{
96 Name: "Dot1AgMaintenanceAssociation",
97 ClassID: 300,
98 MessageTypes: mapset.NewSetWith(
99 Create,
100 Delete,
101 Get,
102 Set,
103 ),
104 AllowedAttributeMask: 0xfe00,
105 AttributeDefinitions: AttributeDefinitionMap{
106 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
107 1: Uint16Field("MdPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
108 2: ByteField("ShortMaNameFormat", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
109 3: MultiByteField("ShortMaName1,ShortMaName2", OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3),
110 4: ByteField("ContinuityCheckMessageCcmInterval", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
111 5: MultiByteField("AssociatedVlans", OctetsAttributeType, 0x0800, 24, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read, Write), false, false, false, 5),
112 6: ByteField("MhfCreation", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
113 7: ByteField("SenderIdPermission", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
114 },
115 Access: CreatedByOlt,
116 Support: UnknownSupport,
117 }
118}
119
120// NewDot1AgMaintenanceAssociation (class ID 300) 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 NewDot1AgMaintenanceAssociation(params ...ParamData) (*ManagedEntity, OmciErrors) {
124 return NewManagedEntity(*dot1agmaintenanceassociationBME, params...)
125}