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