blob: 9372126b8fec8ff2a53b9cbff27d39b448d4c2f4 [file] [log] [blame]
Takahiro Suzuki241c10e2020-12-17 20:17:57 +09001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
4
5 * 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
8
9 * http://www.apache.org/licenses/LICENSE-2.0
10
11 * 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// 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}