Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
| 3 | * Copyright 2020-present Open Networking Foundation |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 4 | * |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 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 |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 8 | * |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 10 | * |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 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 | */ |
David K. Bainbridge | d80007b | 2021-04-12 12:22:29 +0000 | [diff] [blame] | 17 | /* |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 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 | |
| 24 | package generated |
| 25 | |
| 26 | import "github.com/deckarep/golang-set" |
| 27 | |
| 28 | // VlanTaggingFilterDataClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity VLAN tagging filter data |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 30 | const VlanTaggingFilterDataClassID = ClassID(84) // 0x0054 |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 31 | |
| 32 | var vlantaggingfilterdataBME *ManagedEntityDefinition |
| 33 | |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 34 | // VlanTaggingFilterData (Class ID: #84 / 0x0054) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 35 | // This ME organizes data associated with VLAN tagging. Instances of this ME are created and |
| 36 | // deleted by the OLT. |
| 37 | // |
| 38 | // Relationships |
| 39 | // An instance of this ME is associated with an instance of a MAC bridge port configuration data |
| 40 | // ME. By definition, tag filtering occurs closer to the MAC bridge than the tagging operation. |
| 41 | // Schematically, the ordering of the functions is as given in Figure 9.3.11-1://// Figure 9.3.11-1 |
| 42 | // |
| 43 | // Attributes |
| 44 | // Managed Entity Id |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 45 | // This attribute uniquely identifies each instance of this ME. Through an identical ID, this ME is |
| 46 | // implicitly linked to an instance of the MAC bridge port configuration data ME. (R, setbycreate) |
| 47 | // (mandatory) (2-bytes) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 48 | // |
| 49 | // Vlan Filter List |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 50 | // This attribute is a list of provisioned tag control information (TCI) values for the bridge |
| 51 | // port. A TCI, comprising user priority, canonical format indicator (CFI) and virtual local area |
| 52 | // network identifier (VID), is represented by 2-bytes. This attribute supports up to 12 VLAN |
| 53 | // entries. The first N are valid, where N is given by the number of entries attribute. (R,-W, |
| 54 | // setbycreate) (mandatory) (24-bytes) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 55 | // |
| 56 | // Forward Operation |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 57 | // When a frame passes through the MAC bridge port, it is processed according to the operation |
| 58 | // specified by this attribute, in accordance with Table-9.3.111. Figure 9.3.11-3 illustrates the |
| 59 | // treatment of frames according to the provisioned action possibilities. Tagged and untagged |
| 60 | // frames are treated separately, but both in accordance with Figure 9.3.11-3. While all forwarding |
| 61 | // operations are plausible, only actions 0x10 and 0x12 are necessary to construct a VLAN mapper |
| 62 | // and an 802.1p mapper, respectively. (R,-W, setbycreate) (mandatory) (1-byte) |
| 63 | // |
| 64 | // Table 9.3.11-1 contains duplicate entries due to simplification of the original set of actions. |
| 65 | // |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 66 | // Table 9.3.11-1 and the actions listed are discussed in detail in the following. |
| 67 | // |
| 68 | // Number Of Entries |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 69 | // This attribute specifies the number of valid entries in the VLAN filter list. (R,-W, |
| 70 | // setbycreate) (mandatory) (1-byte) |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 71 | // |
| 72 | type VlanTaggingFilterData struct { |
| 73 | ManagedEntityDefinition |
| 74 | Attributes AttributeValueMap |
| 75 | } |
| 76 | |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 77 | // Attribute name constants |
| 78 | |
| 79 | const VlanTaggingFilterData_VlanFilterList = "VlanFilterList" |
| 80 | const VlanTaggingFilterData_ForwardOperation = "ForwardOperation" |
| 81 | const VlanTaggingFilterData_NumberOfEntries = "NumberOfEntries" |
| 82 | |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 83 | func init() { |
| 84 | vlantaggingfilterdataBME = &ManagedEntityDefinition{ |
| 85 | Name: "VlanTaggingFilterData", |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 86 | ClassID: VlanTaggingFilterDataClassID, |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 87 | MessageTypes: mapset.NewSetWith( |
| 88 | Create, |
| 89 | Delete, |
| 90 | Get, |
| 91 | Set, |
| 92 | ), |
| 93 | AllowedAttributeMask: 0xe000, |
| 94 | AttributeDefinitions: AttributeDefinitionMap{ |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 95 | 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 96 | 1: MultiByteField(VlanTaggingFilterData_VlanFilterList, OctetsAttributeType, 0x8000, 24, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1), |
| 97 | 2: ByteField(VlanTaggingFilterData_ForwardOperation, EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2), |
| 98 | 3: ByteField(VlanTaggingFilterData_NumberOfEntries, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3), |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 99 | }, |
| 100 | Access: CreatedByOlt, |
| 101 | Support: UnknownSupport, |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | // NewVlanTaggingFilterData (class ID 84) creates the basic |
| 106 | // Managed Entity definition that is used to validate an ME of this type that |
| 107 | // is received from or transmitted to the OMCC. |
| 108 | func NewVlanTaggingFilterData(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 109 | return NewManagedEntity(*vlantaggingfilterdataBME, params...) |
| 110 | } |