blob: 882a1b1d1452fdcc9851d1b9b9960609e00db88b [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Andrea Campanella7167ebb2020-02-24 09:56:38 +01003 * Copyright 2020-present Open Networking Foundation
4
Chip Boling6e27b352020-02-14 09:10:01 -06005 * 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
Andrea Campanella7167ebb2020-02-24 09:56:38 +01008
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Andrea Campanella7167ebb2020-02-24 09:56:38 +010010
Chip Boling6e27b352020-02-14 09:10:01 -060011 * 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 */
David K. Bainbridgeadf422d2021-04-09 16:06:41 +000017/*
Chip Boling6e27b352020-02-14 09:10:01 -060018 * 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// Dot1AgCfmStackClassID is the 16-bit ID for the OMCI
29// Managed entity Dot1ag CFM stack
30const Dot1AgCfmStackClassID ClassID = ClassID(305)
31
32var dot1agcfmstackBME *ManagedEntityDefinition
33
34// Dot1AgCfmStack (class ID #305)
35// This ME reports the maintenance status of a bridge port at any given time. An ONU that supports
36// [IEEE 802.1ag] functionality automatically creates an instance of the dot1ag CFM stack ME for
37// each MAC bridge or IEEE 802.1p mapper, depending on its provisioning model.
38//
39// The dot1ag CFM stack also lists any VLANs and bridge ports against which configuration errors
40// are currently identified. The ONU should reject operations that create configuration errors.
41// However, these errors can arise because of operations on other MEs that are not necessarily
42// possible to detect during CFM configuration.
43//
44// Relationships
45// An ONU that supports [IEEE 802.1ag] creates one instance of this ME for each MAC bridge or IEEE
46// 802.1p mapper, depending on its provisioning model. It should not create an instance for an
47// IEEE-802.1p mapper that is associated with a MAC bridge.
48//
49// Attributes
50// Managed Entity Id
51// Managed entity ID: This attribute uniquely identifies an instance of this ME. Through an
52// identical ID, this ME is implicitly linked to an instance of the MAC bridge service profile ME
53// or an IEEE 802.1p mapper ME. It is expected that an ONU will implement CFM on bridges or on
54// IEEE-802.1p mappers, but not both. For precision, the reference is disambiguated by the value of
55// the layer 2 type pointer attribute. (R) (mandatory) (2-bytes)
56//
57// Layer 2 Type
58// Layer 2 type: This attribute specifies whether the dot1ag CFM stack is associated with a MAC
59// bridge service profile (value 0) or an IEEE 802.1p mapper (value 1). (R) (mandatory) (1-byte)
60//
61// Mp Status Table
62// (R) (mandatory) (18N bytes)
63//
64// Configuration Error List Table
65// (R) (mandatory) (5N bytes)
66//
67type Dot1AgCfmStack struct {
68 ManagedEntityDefinition
69 Attributes AttributeValueMap
70}
71
72func init() {
73 dot1agcfmstackBME = &ManagedEntityDefinition{
74 Name: "Dot1AgCfmStack",
75 ClassID: 305,
76 MessageTypes: mapset.NewSetWith(
77 Get,
78 GetNext,
79 ),
80 AllowedAttributeMask: 0xe000,
81 AttributeDefinitions: AttributeDefinitionMap{
82 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
83 1: ByteField("Layer2Type", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
84 2: TableField("MpStatusTable", TableAttributeType, 0x4000, TableInfo{nil, 18}, mapset.NewSetWith(Read), false, false, false, 2),
85 3: TableField("ConfigurationErrorListTable", TableAttributeType, 0x2000, TableInfo{nil, 5}, mapset.NewSetWith(Read), true, false, false, 3),
86 },
87 Access: CreatedByOnu,
88 Support: UnknownSupport,
89 }
90}
91
92// NewDot1AgCfmStack (class ID 305) creates the basic
93// Managed Entity definition that is used to validate an ME of this type that
94// is received from or transmitted to the OMCC.
95func NewDot1AgCfmStack(params ...ParamData) (*ManagedEntity, OmciErrors) {
96 return NewManagedEntity(*dot1agcfmstackBME, params...)
97}