blob: a2045c007c1b46c07f7e8f6053bb55901d411191 [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// Dot1AgDefaultMdLevelClassID is the 16-bit ID for the OMCI
26// Managed entity Dot1ag default MD level
27const Dot1AgDefaultMdLevelClassID ClassID = ClassID(301)
28
29var dot1agdefaultmdlevelBME *ManagedEntityDefinition
30
31// Dot1AgDefaultMdLevel (class ID #301)
32// The collection of the functionality called a maintenance half-function (MHF) is not explicitly
33// modelled as a ME by either [IEEE 802.1ag] or the OMCI. The ONU automatically creates MHFs
34// according to parameters specified in a dot1ag MD or a dot1ag MA ME; the dot1ag default MD level
35// ME catches the corner cases not covered by other MEs, specifically VLANs not included by any
36// defined MA.
37//
38// The dot1ag default MD level comprises a configurable table, each entry of which specifies
39// default MHF functionality for some set of VLANs. Once a set of VLANs is defined, operations to
40// different table entries or to dot1ag MAs that conflict with the set membership should be denied.
41// In addition, catch-all attributes are defined to specify MHF functionality when there is no
42// match to either a table entry or an MA.
43//
44// Relationships
45// An ONU that supports [IEEE 802.1ag] automatically creates one instance of this ME for each MAC
46// bridge or IEEE 802.1p mapper, depending on the ONU's provisioning model. It should not create an
47// instance for an 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, depending on its provisioning model. For precision, the
55// reference is disambiguated by the value of the layer 2 type pointer attribute. (R) (mandatory)
56// (2-bytes)
57//
58// Layer 2 Type
59// Layer 2 type: This attribute specifies whether the dot1ag default MD level ME is associated with
60// a MAC bridge service profile (value 0) or an IEEE 802.1p mapper (value-1). (R) (mandatory)
61// (1-byte)
62//
63// Catchall Level
64// Catchall level: This attribute ranges from 0..7 and specifies the MD level of MHFs created when
65// no specific match is found. (R,-W) (mandatory) (1-byte)
66//
67// Catchall Mhf Creation
68// (R,-W) (mandatory) (1-byte)
69//
70// Catchall Sender Id Permission
71// Catchall sender ID permission: This attribute determines the contents of the sender ID TLV
72// included in CFM messages transmitted by MPs when no more specific match is found. This attribute
73// is identical to that defined in the description of the dot1ag MD ME (i.e., excluding code point
74// 5, defer). (R,-W) (mandatory) (1-byte)
75//
76// Default Md Level Table
77// (R,-W) (mandatory) (29-bytes * N entries)
78//
79type Dot1AgDefaultMdLevel struct {
80 ManagedEntityDefinition
81 Attributes AttributeValueMap
82}
83
84func init() {
85 dot1agdefaultmdlevelBME = &ManagedEntityDefinition{
86 Name: "Dot1AgDefaultMdLevel",
87 ClassID: 301,
88 MessageTypes: mapset.NewSetWith(
89 Get,
90 GetNext,
91 Set,
92 ),
93 AllowedAttributeMask: 0xf800,
94 AttributeDefinitions: AttributeDefinitionMap{
95 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
96 1: ByteField("Layer2Type", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
97 2: ByteField("CatchallLevel", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
98 3: ByteField("CatchallMhfCreation", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
99 4: ByteField("CatchallSenderIdPermission", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
100 5: TableField("DefaultMdLevelTable", TableAttributeType, 0x0800, TableInfo{nil, 29}, mapset.NewSetWith(Read, Write), false, false, false, 5),
101 },
102 Access: CreatedByOnu,
103 Support: UnknownSupport,
104 }
105}
106
107// NewDot1AgDefaultMdLevel (class ID 301) creates the basic
108// Managed Entity definition that is used to validate an ME of this type that
109// is received from or transmitted to the OMCC.
110func NewDot1AgDefaultMdLevel(params ...ParamData) (*ManagedEntity, OmciErrors) {
111 return NewManagedEntity(*dot1agdefaultmdlevelBME, params...)
112}