blob: 17836a44fb92c19103eb5f371464cff6a5f40c97 [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Andrea Campanella7167ebb2020-02-24 09:56:38 +01003 * Copyright 2020-present Open Networking Foundation
Chip Boling8cdd6392022-01-27 08:43:37 -06004 *
Chip Boling6e27b352020-02-14 09:10:01 -06005 * 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
Chip Boling8cdd6392022-01-27 08:43:37 -06008 *
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Chip Boling8cdd6392022-01-27 08:43:37 -060010 *
Chip Boling6e27b352020-02-14 09:10:01 -060011 * 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. Bainbridgeadf422d2021-04-09 16:06:41 +000017/*
Chip Boling6e27b352020-02-14 09:10:01 -060018 * 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
Chip Boling610117d2021-09-09 11:24:34 -050030const VlanTaggingFilterDataClassID = ClassID(84) // 0x0054
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var vlantaggingfilterdataBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// VlanTaggingFilterData (Class ID: #84 / 0x0054)
Chip Boling6e27b352020-02-14 09:10:01 -060035// 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
Chip Boling610117d2021-09-09 11:24:34 -050045// 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)
Chip Boling6e27b352020-02-14 09:10:01 -060048//
49// Vlan Filter List
Chip Boling610117d2021-09-09 11:24:34 -050050// 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)
Chip Boling6e27b352020-02-14 09:10:01 -060055//
56// Forward Operation
Chip Boling610117d2021-09-09 11:24:34 -050057// 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//
Chip Boling6e27b352020-02-14 09:10:01 -060066// Table 9.3.11-1 and the actions listed are discussed in detail in the following.
67//
68// Number Of Entries
Chip Boling610117d2021-09-09 11:24:34 -050069// This attribute specifies the number of valid entries in the VLAN filter list. (R,-W,
70// setbycreate) (mandatory) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -060071//
72type VlanTaggingFilterData struct {
73 ManagedEntityDefinition
74 Attributes AttributeValueMap
75}
76
Chip Boling8cdd6392022-01-27 08:43:37 -060077// Attribute name constants
78
79const VlanTaggingFilterData_VlanFilterList = "VlanFilterList"
80const VlanTaggingFilterData_ForwardOperation = "ForwardOperation"
81const VlanTaggingFilterData_NumberOfEntries = "NumberOfEntries"
82
Chip Boling6e27b352020-02-14 09:10:01 -060083func init() {
84 vlantaggingfilterdataBME = &ManagedEntityDefinition{
85 Name: "VlanTaggingFilterData",
Chip Boling8cdd6392022-01-27 08:43:37 -060086 ClassID: VlanTaggingFilterDataClassID,
Chip Boling6e27b352020-02-14 09:10:01 -060087 MessageTypes: mapset.NewSetWith(
88 Create,
89 Delete,
90 Get,
91 Set,
92 ),
93 AllowedAttributeMask: 0xe000,
94 AttributeDefinitions: AttributeDefinitionMap{
Chip Boling8cdd6392022-01-27 08:43:37 -060095 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),
Chip Boling6e27b352020-02-14 09:10:01 -060099 },
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.
108func NewVlanTaggingFilterData(params ...ParamData) (*ManagedEntity, OmciErrors) {
109 return NewManagedEntity(*vlantaggingfilterdataBME, params...)
110}