blob: 28d2443cd8057722aac67190da3d7cf5ac0b5f2a [file] [log] [blame]
Holger Hildebrandtfa074992020-03-27 15:42:06 +00001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
4
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
8
9 * http://www.apache.org/licenses/LICENSE-2.0
10
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. Bainbridged80007b2021-04-12 12:22:29 +000017/*
Holger Hildebrandtfa074992020-03-27 15:42:06 +000018 * 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
24package generated
25
26import "github.com/deckarep/golang-set"
27
28// VlanTaggingFilterDataClassID is the 16-bit ID for the OMCI
29// Managed entity VLAN tagging filter data
mpagenko836a1fd2021-11-01 16:12:42 +000030const VlanTaggingFilterDataClassID = ClassID(84) // 0x0054
Holger Hildebrandtfa074992020-03-27 15:42:06 +000031
32var vlantaggingfilterdataBME *ManagedEntityDefinition
33
mpagenko836a1fd2021-11-01 16:12:42 +000034// VlanTaggingFilterData (Class ID: #84 / 0x0054)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000035// 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
mpagenko836a1fd2021-11-01 16:12:42 +000045// 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 Hildebrandtfa074992020-03-27 15:42:06 +000048//
49// Vlan Filter List
mpagenko836a1fd2021-11-01 16:12:42 +000050// 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 Hildebrandtfa074992020-03-27 15:42:06 +000055//
56// Forward Operation
mpagenko836a1fd2021-11-01 16:12:42 +000057// 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 Hildebrandtfa074992020-03-27 15:42:06 +000066// Table 9.3.11-1 and the actions listed are discussed in detail in the following.
67//
68// Number Of Entries
mpagenko836a1fd2021-11-01 16:12:42 +000069// This attribute specifies the number of valid entries in the VLAN filter list. (R,-W,
70// setbycreate) (mandatory) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000071//
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 ),
87 AllowedAttributeMask: 0xe000,
88 AttributeDefinitions: AttributeDefinitionMap{
89 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),
93 },
94 Access: CreatedByOlt,
95 Support: UnknownSupport,
96 }
97}
98
99// NewVlanTaggingFilterData (class ID 84) creates the basic
100// Managed Entity definition that is used to validate an ME of this type that
101// is received from or transmitted to the OMCC.
102func NewVlanTaggingFilterData(params ...ParamData) (*ManagedEntity, OmciErrors) {
103 return NewManagedEntity(*vlantaggingfilterdataBME, params...)
104}