blob: 28d2443cd8057722aac67190da3d7cf5ac0b5f2a [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 */
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
77func init() {
78 vlantaggingfilterdataBME = &ManagedEntityDefinition{
79 Name: "VlanTaggingFilterData",
80 ClassID: 84,
81 MessageTypes: mapset.NewSetWith(
82 Create,
83 Delete,
84 Get,
85 Set,
86 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -080087 AllowedAttributeMask: 0xe000,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070088 AttributeDefinitions: AttributeDefinitionMap{
Matteo Scandolof9d43412021-01-12 11:11:34 -080089 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
90 1: MultiByteField("VlanFilterList", OctetsAttributeType, 0x8000, 24, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
91 2: ByteField("ForwardOperation", EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
92 3: ByteField("NumberOfEntries", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070093 },
Matteo Scandolof9d43412021-01-12 11:11:34 -080094 Access: CreatedByOlt,
95 Support: UnknownSupport,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070096 }
97}
98
Matteo Scandolof9d43412021-01-12 11:11:34 -080099// NewVlanTaggingFilterData (class ID 84) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700100// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -0800101// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700102func NewVlanTaggingFilterData(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800103 return NewManagedEntity(*vlantaggingfilterdataBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700104}