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