blob: 17836a44fb92c19103eb5f371464cff6a5f40c97 [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
Elia Battiston9bfe1102022-02-03 10:38:03 +01004 *
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
Elia Battiston9bfe1102022-02-03 10:38:03 +01008 *
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07009 * http://www.apache.org/licenses/LICENSE-2.0
Elia Battiston9bfe1102022-02-03 10:38:03 +010010 *
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 */
Girish Gowdra161d27a2021-05-05 12:01:44 -070017/*
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// VlanTaggingFilterDataClassID is the 16-bit ID for the OMCI
29// Managed entity VLAN tagging filter data
Andrea Campanella10426e22021-10-15 17:58:04 +020030const VlanTaggingFilterDataClassID = ClassID(84) // 0x0054
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
32var vlantaggingfilterdataBME *ManagedEntityDefinition
33
Andrea Campanella10426e22021-10-15 17:58:04 +020034// VlanTaggingFilterData (Class ID: #84 / 0x0054)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070035// 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
Andrea Campanella10426e22021-10-15 17:58:04 +020045// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070048//
49// Vlan Filter List
Andrea Campanella10426e22021-10-15 17:58:04 +020050// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070055//
56// Forward Operation
Andrea Campanella10426e22021-10-15 17:58:04 +020057// 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//
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070066// Table 9.3.11-1 and the actions listed are discussed in detail in the following.
67//
68// Number Of Entries
Andrea Campanella10426e22021-10-15 17:58:04 +020069// This attribute specifies the number of valid entries in the VLAN filter list. (R,-W,
70// setbycreate) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070071//
72type VlanTaggingFilterData struct {
73 ManagedEntityDefinition
74 Attributes AttributeValueMap
75}
76
Elia Battiston9bfe1102022-02-03 10:38:03 +010077// Attribute name constants
78
79const VlanTaggingFilterData_VlanFilterList = "VlanFilterList"
80const VlanTaggingFilterData_ForwardOperation = "ForwardOperation"
81const VlanTaggingFilterData_NumberOfEntries = "NumberOfEntries"
82
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070083func init() {
84 vlantaggingfilterdataBME = &ManagedEntityDefinition{
85 Name: "VlanTaggingFilterData",
Elia Battiston9bfe1102022-02-03 10:38:03 +010086 ClassID: VlanTaggingFilterDataClassID,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070087 MessageTypes: mapset.NewSetWith(
88 Create,
89 Delete,
90 Get,
91 Set,
92 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -080093 AllowedAttributeMask: 0xe000,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070094 AttributeDefinitions: AttributeDefinitionMap{
Elia Battiston9bfe1102022-02-03 10:38:03 +010095 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),
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070099 },
Matteo Scandolof9d43412021-01-12 11:11:34 -0800100 Access: CreatedByOlt,
101 Support: UnknownSupport,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700102 }
103}
104
Matteo Scandolof9d43412021-01-12 11:11:34 -0800105// NewVlanTaggingFilterData (class ID 84) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700106// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -0800107// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700108func NewVlanTaggingFilterData(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800109 return NewManagedEntity(*vlantaggingfilterdataBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700110}