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