blob: 9e3f80087d64c3080a004676ce41e80ca4ac2625 [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// Dot1AgDefaultMdLevelClassID is the 16-bit ID for the OMCI
29// Managed entity Dot1ag default MD level
30const Dot1AgDefaultMdLevelClassID ClassID = ClassID(301)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
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
Matteo Scandolof9d43412021-01-12 11:11:34 -080057// IEEE-802.1p mappers, but not both, depending on its provisioning model. For precision, the
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070058// reference is disambiguated by the value of the layer 2 type pointer attribute. (R) (mandatory)
Matteo Scandolof9d43412021-01-12 11:11:34 -080059// (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070060//
61// Layer 2 Type
62// Layer 2 type: This attribute specifies whether the dot1ag default MD level ME is associated with
Matteo Scandolof9d43412021-01-12 11:11:34 -080063// a MAC bridge service profile (value 0) or an IEEE 802.1p mapper (value-1). (R) (mandatory)
64// (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070065//
66// Catchall Level
67// Catchall level: This attribute ranges from 0..7 and specifies the MD level of MHFs created when
Matteo Scandolof9d43412021-01-12 11:11:34 -080068// no specific match is found. (R,-W) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070069//
70// Catchall Mhf Creation
Matteo Scandolof9d43412021-01-12 11:11:34 -080071// (R,-W) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070072//
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
Matteo Scandolof9d43412021-01-12 11:11:34 -080077// 5, defer). (R,-W) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070078//
79// Default Md Level Table
Matteo Scandolof9d43412021-01-12 11:11:34 -080080// (R,-W) (mandatory) (29-bytes * N entries)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070081//
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 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -080096 AllowedAttributeMask: 0xf800,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070097 AttributeDefinitions: AttributeDefinitionMap{
Matteo Scandolof9d43412021-01-12 11:11:34 -080098 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),
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700104 },
Matteo Scandolof9d43412021-01-12 11:11:34 -0800105 Access: CreatedByOnu,
106 Support: UnknownSupport,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700107 }
108}
109
Matteo Scandolof9d43412021-01-12 11:11:34 -0800110// NewDot1AgDefaultMdLevel (class ID 301) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700111// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -0800112// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700113func NewDot1AgDefaultMdLevel(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800114 return NewManagedEntity(*dot1agdefaultmdlevelBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700115}