blob: 60eb0072c0edde57f5b5d3daf5159277b75a517e [file] [log] [blame]
mpagenko836a1fd2021-11-01 16:12:42 +00001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00004 *
mpagenko836a1fd2021-11-01 16:12:42 +00005 * 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
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00008 *
mpagenko836a1fd2021-11-01 16:12:42 +00009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
mpagenko836a1fd2021-11-01 16:12:42 +000011 * 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 */
17/*
18 * 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// Dot1AgMepClassID is the 16-bit ID for the OMCI
29// Managed entity Dot1ag MEP
30const Dot1AgMepClassID = ClassID(302) // 0x012e
31
32var dot1agmepBME *ManagedEntityDefinition
33
34// Dot1AgMep (Class ID: #302 / 0x012e)
35// This ME models an MEP as defined primarily in [IEEE 802.1ag] and secondarily in [ITUT Y.1731].
36// It is created and deleted by the OLT. An MEP exists at one of eight possible maintenance levels,
37// and resides at the boundary of a MD. It inherits a name, and optionally a set of associated
38// VLANs, from its associated MA.
39//
40// Relationships
41// One or more MEPs may be associated with a MAC bridge port or an IEEE 802.1p mapper in the
42// absence of a MAC bridge. An MEP is also associated with zero or more VLANs and an MA.
43//
44// Attributes
45// Managed Entity Id
46// This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory)
47// (2-bytes)
48//
49// Layer 2 Entity Pointer
50// Depending on the value of the layer 2 type attribute, this pointer specifies the MAC bridge port
51// configuration data ME or the IEEE 802.1p mapper service profile ME with which this MEP is
52// associated. (R,-W, setbycreate) (mandatory) (2-bytes)
53//
54// Layer 2 Type
55// This attribute specifies whether the MA is associated with a MAC bridge port (value 0) or an
56// IEEE 802.1p mapper (value 1). (R,-W, setbycreate) (mandatory) (1-byte)
57//
58// Ma Pointer
59// This pointer specifies the maintenance association with which this MEP is associated. (R,-W,
60// setbycreate) (mandatory) (2-bytes)
61//
62// Mep Id
63// This attribute specifies the MEP's own identity in the MA. For a given MA, the MEP ID must be
64// unique throughout the network defined by the MD. The MEP ID is defined in the range 1..8191. The
65// value 0 indicates that no MEP ID is (yet) configured. (R,-W, setbycreate) (mandatory) (2-bytes)
66//
67// Mep Control
68// This attribute specifies some of the overall behavioural aspects of the MEP. It is interpreted
69// as follows.
70//
71// (R,-W, setbycreate) (mandatory) (1-byte)
72//
73// Primary Vlan
74// This attribute is a 12-bit VLAN ID. The value 0 indicates that the MEP inherits its primary VLAN
75// from its parent MA. CFM messages, except forwarded LTMs, are tagged with the primary VLAN ID. If
76// explicitly specified, the value of this attribute must be one of the VLANs associated with the
77// parent MA. (R,-W, setbycreate) (mandatory) (2-bytes)
78//
79// Administrative State
80// This attribute locks (1) and unlocks (0) the functions performed by this ME. Administrative
81// state is further described in clause A.1.6. (R,-W, setbycreate) (mandatory) (1-byte)
82//
83// Ccm And Ltm Priority
84// Ranging from 0..7, this attribute permits CCM and LTM frames to be explicitly prioritized, which
85// may be needed if flows are separated, e.g., by 802.1p priority. The priority specified in this
86// attribute is also used in linktrace reply (LTR) frames originated by this MEP. The value 0xFF
87// selects the IEEE 802.1ag default, whereby CCM and LTM frames are transmitted with the highest
88// Ethernet priority available. (R,-W, setbycreate) (mandatory) (1-byte)
89//
90// Egress Identifier
91// This attribute comprises 8-bytes to be included in LTMs. They allow received LTRs to be directed
92// to the correct originator. The attribute includes the originator MAC address and a locally
93// defined identifier. If this field is 0, the ONU uses the MEP's MAC address, with 0 as the
94// locally defined identifier. (R,-W, setbycreate) (mandatory) (8-bytes)
95//
96// Peer Mep Ids
97// This attribute lists the expected peer MEPs for CCMs, 2-bytes per MEP ID. [IEEE 802.1ag] allows
98// for multipoint networks, and therefore a list of peer MEPs. This attribute allows for up to 12
99// peers for a given MEP, though GPON applications are expected to need only a single peer. Missing
100// or unexpected messages trigger alarm declaration after a soak interval. Unused peer MEP slots
101// should be set to 0. (R,-W) (mandatory) (24-bytes)
102//
103// Eth Ais Control
104// This attribute controls the generation of Ethernet alarm indication signal (AIS) frames when
105// they are enabled through the MEP control attribute. It is interpreted as follows:
106//
107// (R,-W, setbycreate) (mandatory if ETH AIS is enabled) (1-byte)
108//
109// Fault Alarm Threshold
110// This attribute specifies the lowest priority alarm that is allowed to generate a fault alarm.
111// The value 0 specifies that the ONU uses its internal default. It is defined as follows.
112//
113// 1 All defects generate alarms after suitable soaking, including AIS and RDICCM.
114//
115// 2 Alarm generated only by one of: MACstatus, RemoteCCM, ErrorCCM, XconCCM. This value is
116// recommended as the default in [IEEE 802.1ag].
117//
118// 3 Alarm generated only by one of: RemoteCCM, ErrorCCM, XconCCM.
119//
120// 4 Alarm generated only by one of: ErrorCCM, XconCCM.
121//
122// 5 Alarm generated only by: XconCCM.
123//
124// 6 No alarms are to be reported. This setting may be useful during configuration of services
125// across the network when spurious alarms could otherwise be generated.
126//
127// (R,-W, setbycreate) (optional) (1-byte)
128//
129// Alarm Declaration Soak Time
130// This attribute defines the defect soak time that must elapse before the MEP declares an alarm.
131// It is expressed in 10-ms units with a range of 250 to 1000, i.e., 2.5-s to 10-s. The default is
132// recommended to be 2.5 seconds. (R,-W) (mandatory) (2-bytes)
133//
134// Alarm Clear Soak Time
135// This attribute defines the defect-free soak time that must elapse before the MEP clears an
136// alarm. It is expressed in intervals of 10-ms with a range of 250 to 1-000, i.e., 2.5-s to 10-s.
137// The default is recommended to be 10-s. (R,-W) (mandatory) (2-bytes)
138//
139type Dot1AgMep struct {
140 ManagedEntityDefinition
141 Attributes AttributeValueMap
142}
143
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000144// Attribute name constants
145
146const Dot1AgMep_Layer2EntityPointer = "Layer2EntityPointer"
147const Dot1AgMep_Layer2Type = "Layer2Type"
148const Dot1AgMep_MaPointer = "MaPointer"
149const Dot1AgMep_MepId = "MepId"
150const Dot1AgMep_MepControl = "MepControl"
151const Dot1AgMep_PrimaryVlan = "PrimaryVlan"
152const Dot1AgMep_AdministrativeState = "AdministrativeState"
153const Dot1AgMep_CcmAndLtmPriority = "CcmAndLtmPriority"
154const Dot1AgMep_EgressIdentifier = "EgressIdentifier"
155const Dot1AgMep_PeerMepIds = "PeerMepIds"
156const Dot1AgMep_EthAisControl = "EthAisControl"
157const Dot1AgMep_FaultAlarmThreshold = "FaultAlarmThreshold"
158const Dot1AgMep_AlarmDeclarationSoakTime = "AlarmDeclarationSoakTime"
159const Dot1AgMep_AlarmClearSoakTime = "AlarmClearSoakTime"
160
mpagenko836a1fd2021-11-01 16:12:42 +0000161func init() {
162 dot1agmepBME = &ManagedEntityDefinition{
163 Name: "Dot1AgMep",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000164 ClassID: Dot1AgMepClassID,
mpagenko836a1fd2021-11-01 16:12:42 +0000165 MessageTypes: mapset.NewSetWith(
166 Create,
167 Delete,
168 Get,
169 Set,
170 ),
171 AllowedAttributeMask: 0xfffc,
172 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000173 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
174 1: Uint16Field(Dot1AgMep_Layer2EntityPointer, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
175 2: ByteField(Dot1AgMep_Layer2Type, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
176 3: Uint16Field(Dot1AgMep_MaPointer, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
177 4: Uint16Field(Dot1AgMep_MepId, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
178 5: ByteField(Dot1AgMep_MepControl, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
179 6: Uint16Field(Dot1AgMep_PrimaryVlan, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
180 7: ByteField(Dot1AgMep_AdministrativeState, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
181 8: ByteField(Dot1AgMep_CcmAndLtmPriority, UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
182 9: Uint64Field(Dot1AgMep_EgressIdentifier, UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9),
183 10: MultiByteField(Dot1AgMep_PeerMepIds, OctetsAttributeType, 0x0040, 24, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read, Write), false, false, false, 10),
184 11: ByteField(Dot1AgMep_EthAisControl, UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 11),
185 12: ByteField(Dot1AgMep_FaultAlarmThreshold, UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 12),
186 13: Uint16Field(Dot1AgMep_AlarmDeclarationSoakTime, UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, false, false, 13),
187 14: Uint16Field(Dot1AgMep_AlarmClearSoakTime, UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, false, false, 14),
mpagenko836a1fd2021-11-01 16:12:42 +0000188 },
189 Access: CreatedByOlt,
190 Support: UnknownSupport,
191 Alarms: AlarmMap{
192 0: "RDI CCM",
193 1: "MAC status",
194 2: "Remote CCM",
195 3: "Error CCM",
196 4: "Xcon CCM",
197 5: "Unexpected period",
198 6: "AIS",
199 },
200 }
201}
202
203// NewDot1AgMep (class ID 302) creates the basic
204// Managed Entity definition that is used to validate an ME of this type that
205// is received from or transmitted to the OMCC.
206func NewDot1AgMep(params ...ParamData) (*ManagedEntity, OmciErrors) {
207 return NewManagedEntity(*dot1agmepBME, params...)
208}