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