blob: 4b4924ca3aae804e390f29d8d059b3cac9dc3c6b [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 Dot1AgMepClassId ClassID = ClassID(302)
25
26var dot1agmepBME *ManagedEntityDefinition
27
28// Dot1AgMep (class ID #302)
29// This ME models an MEP as defined primarily in [IEEE 802.1ag] and secondarily in [ITUT Y.1731].
30// It is created and deleted by the OLT. An MEP exists at one of eight possible maintenance levels,
31// and resides at the boundary of a MD. It inherits a name, and optionally a set of associated
32// VLANs, from its associated MA.
33//
34// Relationships
35// One or more MEPs may be associated with a MAC bridge port or an IEEE 802.1p mapper in the
36// absence of a MAC bridge. An MEP is also associated with zero or more VLANs and an MA.
37//
38// Attributes
39// Managed Entity Id
40// Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
41// (mandatory) (2 bytes)
42//
43// Layer 2 Entity Pointer
44// Layer 2 entity pointer: Depending on the value of the layer 2 type attribute, this pointer
45// specifies the MAC bridge port configuration data ME or the IEEE 802.1p mapper service profile ME
46// with which this MEP is associated. (R, W, setbycreate) (mandatory) (2 bytes)
47//
48// Layer 2 Type
49// Layer 2 type: This attribute specifies whether the MA is associated with a MAC bridge port
50// (value 0) or an IEEE 802.1p mapper (value 1). (R, W, setbycreate) (mandatory) (1 byte)
51//
52// Ma Pointer
53// MA pointer: This pointer specifies the maintenance association with which this MEP is
54// associated. (R, W, setbycreate) (mandatory) (2 bytes)
55//
56// Mep Id
57// MEP ID: This attribute specifies the MEP's own identity in the MA. For a given MA, the MEP ID
58// must be unique throughout the network defined by the MD. The MEP ID is defined in the range
59// 1..8191. The value 0 indicates that no MEP ID is (yet) configured. (R, W, setbycreate)
60// (mandatory) (2 bytes)
61//
62// Mep Control
63// (R, W, setbycreate) (mandatory) (1 byte)
64//
65// Primary Vlan
66// Primary VLAN: This attribute is a 12 bit VLAN ID. The value 0 indicates that the MEP inherits
67// its primary VLAN from its parent MA. CFM messages, except forwarded LTMs, are tagged with the
68// primary VLAN ID. If explicitly specified, the value of this attribute must be one of the VLANs
69// associated with the parent MA. (R, W, setbycreate) (mandatory) (2 bytes)
70//
71// Administrative State
72// Administrative state: This attribute locks (1) and unlocks (0) the functions performed by this
73// ME. Administrative state is further described in clause A.1.6. (R, W, setbycreate) (mandatory)
74// (1 byte)
75//
76// Ccm And Ltm Priority
77// CCM and LTM priority: Ranging from 0..7, this attribute permits CCM and LTM frames to be
78// explicitly prioritized, which may be needed if flows are separated, e.g., by 802.1p priority.
79// The priority specified in this attribute is also used in linktrace reply (LTR) frames originated
80// by this MEP. The value 0xFF selects the IEEE 802.1ag default, whereby CCM and LTM frames are
81// transmitted with the highest Ethernet priority available. (R, W, setbycreate) (mandatory)
82// (1 byte)
83//
84// Egress Identifier
85// Egress identifier: This attribute comprises 8 bytes to be included in LTMs. They allow received
86// LTRs to be directed to the correct originator. The attribute includes the originator MAC address
87// and a locally defined identifier. If this field is 0, the ONU uses the MEP's MAC address, with 0
88// as the locally defined identifier. (R, W, setbycreate) (mandatory) (8 bytes)
89//
90// Peer Mep Ids
91// Peer MEP IDs: This attribute lists the expected peer MEPs for CCMs, 2 bytes per MEP ID. [IEEE
92// 802.1ag] allows for multipoint networks, and therefore a list of peer MEPs. This attribute
93// allows for up to 12 peers for a given MEP, though GPON applications are expected to need only a
94// single peer. Missing or unexpected messages trigger alarm declaration after a soak interval.
95// Unused peer MEP slots should be set to 0. (R, W) (mandatory) (24 bytes)
96//
97// Eth Ais Control
98// (R, W, setbycreate) (mandatory if ETH AIS is enabled) (1 byte)
99//
100// Fault Alarm Threshold
101// (R, W, setbycreate) (optional) (1 byte)
102//
103// Alarm Declaration Soak Time
104// Alarm declaration soak time: This attribute defines the defect soak time that must elapse before
105// the MEP declares an alarm. It is expressed in 10 ms units with a range of 250 to 1000, i.e.,
106// 2.5 s to 10 s. The default is recommended to be 2.5 seconds. (R, W) (mandatory) (2 bytes)
107//
108// Alarm Clear Soak Time
109// Alarm clear soak time: This attribute defines the defect-free soak time that must elapse before
110// the MEP clears an alarm. It is expressed in intervals of 10 ms with a range of 250 to 1 000,
111// i.e., 2.5 s to 10 s. The default is recommended to be 10 s. (R, W) (mandatory) (2 bytes)
112//
113type Dot1AgMep struct {
114 ManagedEntityDefinition
115 Attributes AttributeValueMap
116}
117
118func init() {
119 dot1agmepBME = &ManagedEntityDefinition{
120 Name: "Dot1AgMep",
121 ClassID: 302,
122 MessageTypes: mapset.NewSetWith(
123 Create,
124 Delete,
125 Get,
126 Set,
127 ),
128 AllowedAttributeMask: 0XFFFC,
129 AttributeDefinitions: AttributeDefinitionMap{
130 0: Uint16Field("ManagedEntityId", 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, false, 0),
131 1: Uint16Field("Layer2EntityPointer", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 1),
132 2: ByteField("Layer2Type", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 2),
133 3: Uint16Field("MaPointer", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 3),
134 4: Uint16Field("MepId", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 4),
135 5: ByteField("MepControl", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 5),
136 6: Uint16Field("PrimaryVlan", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 6),
137 7: ByteField("AdministrativeState", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 7),
138 8: ByteField("CcmAndLtmPriority", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 8),
139 9: Uint64Field("EgressIdentifier", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 9),
140 10: MultiByteField("PeerMepIds", 24, nil, mapset.NewSetWith(Read, Write), false, false, false, false, 10),
141 11: ByteField("EthAisControl", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, false, 11),
142 12: ByteField("FaultAlarmThreshold", 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, true, false, 12),
143 13: Uint16Field("AlarmDeclarationSoakTime", 0, mapset.NewSetWith(Read, Write), false, false, false, false, 13),
144 14: Uint16Field("AlarmClearSoakTime", 0, mapset.NewSetWith(Read, Write), false, false, false, false, 14),
145 },
146 }
147}
148
149// NewDot1AgMep (class ID 302 creates the basic
150// Managed Entity definition that is used to validate an ME of this type that
151// is received from the wire, about to be sent on the wire.
152func NewDot1AgMep(params ...ParamData) (*ManagedEntity, OmciErrors) {
153 return NewManagedEntity(dot1agmepBME, params...)
154}