blob: 299ba5b19a78139abd578a21113d2216bd869aee [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Matteo Scandolof9d43412021-01-12 11:11:34 -08003 * Copyright 2020-present Open Networking Foundation
4
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07005 * 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
Matteo Scandolof9d43412021-01-12 11:11:34 -08008
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07009 * http://www.apache.org/licenses/LICENSE-2.0
Matteo Scandolof9d43412021-01-12 11:11:34 -080010
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070011 * 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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080017 /*
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070018 * 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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080023
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070024package generated
25
26import "github.com/deckarep/golang-set"
27
Matteo Scandolof9d43412021-01-12 11:11:34 -080028// Dot1AgMaintenanceAssociationClassID is the 16-bit ID for the OMCI
29// Managed entity Dot1ag maintenance association
30const Dot1AgMaintenanceAssociationClassID ClassID = ClassID(300)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
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
49// Managed entity ID: This attribute uniquely identifies an instance of this ME. The values 0 and
Matteo Scandolof9d43412021-01-12 11:11:34 -080050// 0xFFFF are reserved. (R, setbycreate) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070051//
52// Md Pointer
53// MD pointer: This pointer specifies the dot1ag maintenance domain with which this MA is
Matteo Scandolof9d43412021-01-12 11:11:34 -080054// associated. A null pointer specifies that the MA is not associated with an MD. (R,-W,
55// setbycreate) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070056//
57// Short Ma Name Format
58// Short MA name format: This attribute specifies one of several possible formats for the short MA
Matteo Scandolof9d43412021-01-12 11:11:34 -080059// name attribute. Value 1, the primary VLAN ID, is recommended to be the default. (R,-W,
60// setbycreate) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070061//
62// Short Ma Name 1, Short Ma Name 2
63// Short MA name 1, Short MA name 2: These two attributes may be regarded as an octet string whose
64// value is the left-justified MA name. Because the MA name may or may not be a printable character
65// string, an octet string is the appropriate representation. If the short MA name format specifies
66// a character string, the string is null-terminated; otherwise, its length is determined by the
67// short MA name format. Note that binary comparisons of the short MA name are made in other CFM
68// state machines, so blanks, alphabetic case, etc., are significant. Also, note that the MD name
Matteo Scandolof9d43412021-01-12 11:11:34 -080069// and the MA short name must be packed (with additional bytes) into 48-byte CFM message headers.
70// (R,-W) (mandatory) (25-bytes * 2 attributes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070071//
72// Continuity Check Message Ccm Interval
73// Short intervals should be used judiciously, as they can interfere with the network's ability to
Matteo Scandolof9d43412021-01-12 11:11:34 -080074// handle subscriber traffic. The recommended value is 1-s. (R,-W, setbycreate) (mandatory)
75// (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070076//
77// Associated Vlans
78// Associated VLANs: This attribute is a list of up to 12 VLAN IDs with which this MA is
79// associated. Once a set of VLANs is defined, the ONU should deny operations to other dot1ag MAs
80// or dot1ag default MD level entries that conflict with the set membership. The all-zeros value
81// indicates that this MA is not associated with any VLANs. Assuming that the attribute is not 0,
82// the first entry is understood to be the primary VLAN. Except forwarded linktrace messages
Matteo Scandolof9d43412021-01-12 11:11:34 -080083// (LTMs), CFM messages emitted by MPs in this MA are tagged with the primary VLAN ID. (R,-W)
84// (mandatory) (2-bytes/entry * 12-entries-=-24-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070085//
86// Mhf Creation
Matteo Scandolof9d43412021-01-12 11:11:34 -080087// (R,-W, setbycreate) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070088//
89// Sender Id Permission
Matteo Scandolof9d43412021-01-12 11:11:34 -080090// (R,-W, setbycreate) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070091//
92type Dot1AgMaintenanceAssociation struct {
93 ManagedEntityDefinition
94 Attributes AttributeValueMap
95}
96
97func init() {
98 dot1agmaintenanceassociationBME = &ManagedEntityDefinition{
99 Name: "Dot1AgMaintenanceAssociation",
100 ClassID: 300,
101 MessageTypes: mapset.NewSetWith(
102 Create,
103 Delete,
104 Get,
105 Set,
106 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -0800107 AllowedAttributeMask: 0xfe00,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700108 AttributeDefinitions: AttributeDefinitionMap{
Matteo Scandolof9d43412021-01-12 11:11:34 -0800109 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
110 1: Uint16Field("MdPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
111 2: ByteField("ShortMaNameFormat", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
112 3: MultiByteField("ShortMaName1,ShortMaName2", OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3),
113 4: ByteField("ContinuityCheckMessageCcmInterval", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
114 5: MultiByteField("AssociatedVlans", OctetsAttributeType, 0x0800, 24, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read, Write), false, false, false, 5),
115 6: ByteField("MhfCreation", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
116 7: ByteField("SenderIdPermission", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700117 },
Matteo Scandolof9d43412021-01-12 11:11:34 -0800118 Access: CreatedByOlt,
119 Support: UnknownSupport,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700120 }
121}
122
Matteo Scandolof9d43412021-01-12 11:11:34 -0800123// NewDot1AgMaintenanceAssociation (class ID 300) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700124// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -0800125// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700126func NewDot1AgMaintenanceAssociation(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800127 return NewManagedEntity(*dot1agmaintenanceassociationBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700128}