blob: 9372126b8fec8ff2a53b9cbff27d39b448d4c2f4 [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Matteo Scandolof9d43412021-01-12 11:11:34 -08003 * Copyright 2020-present Open Networking Foundation
4
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07005 * 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
Matteo Scandolof9d43412021-01-12 11:11:34 -08008
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07009 * http://www.apache.org/licenses/LICENSE-2.0
Matteo Scandolof9d43412021-01-12 11:11:34 -080010
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070011 * 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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080017 /*
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070018 * 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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080023
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070024package generated
25
26import "github.com/deckarep/golang-set"
27
Matteo Scandolof9d43412021-01-12 11:11:34 -080028// Dot1AgCfmStackClassID is the 16-bit ID for the OMCI
29// Managed entity Dot1ag CFM stack
30const Dot1AgCfmStackClassID ClassID = ClassID(305)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
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
Matteo Scandolof9d43412021-01-12 11:11:34 -080047// IEEE-802.1p mapper that is associated with a MAC bridge.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070048//
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
Matteo Scandolof9d43412021-01-12 11:11:34 -080054// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070056//
57// Layer 2 Type
58// Layer 2 type: This attribute specifies whether the dot1ag CFM stack is associated with a MAC
Matteo Scandolof9d43412021-01-12 11:11:34 -080059// bridge service profile (value 0) or an IEEE 802.1p mapper (value 1). (R) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070060//
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 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -080080 AllowedAttributeMask: 0xe000,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070081 AttributeDefinitions: AttributeDefinitionMap{
Matteo Scandolof9d43412021-01-12 11:11:34 -080082 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),
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070086 },
Matteo Scandolof9d43412021-01-12 11:11:34 -080087 Access: CreatedByOnu,
88 Support: UnknownSupport,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070089 }
90}
91
Matteo Scandolof9d43412021-01-12 11:11:34 -080092// NewDot1AgCfmStack (class ID 305) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070093// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -080094// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070095func NewDot1AgCfmStack(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -080096 return NewManagedEntity(*dot1agcfmstackBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070097}