blob: 340b98340b77c0ba46a21a33cc6c841dea65fe4a [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
8 * Unless required by applicable law or agreed to in writing, software
9 * distributed under the License is distributed on an "AS IS" BASIS,
10 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 * See the License for the specific language governing permissions and
12 * limitations under the License.
13 */
14/*
15 * NOTE: This file was generated, manual edits will be overwritten!
16 *
17 * Generated by 'goCodeGenerator.py':
18 * https://github.com/cboling/OMCI-parser/README.md
19 */
20
21package generated
22
23import "github.com/deckarep/golang-set"
24
25// VlanTaggingFilterDataClassID is the 16-bit ID for the OMCI
26// Managed entity VLAN tagging filter data
27const VlanTaggingFilterDataClassID ClassID = ClassID(84)
28
29var vlantaggingfilterdataBME *ManagedEntityDefinition
30
31// VlanTaggingFilterData (class ID #84)
32// This ME organizes data associated with VLAN tagging. Instances of this ME are created and
33// deleted by the OLT.
34//
35// Relationships
36// An instance of this ME is associated with an instance of a MAC bridge port configuration data
37// ME. By definition, tag filtering occurs closer to the MAC bridge than the tagging operation.
38// Schematically, the ordering of the functions is as given in Figure 9.3.11-1://// Figure 9.3.11-1
39//
40// Attributes
41// Managed Entity Id
42// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
43// identical ID, this ME is implicitly linked to an instance of the MAC bridge port configuration
44// data ME. (R, setbycreate) (mandatory) (2-bytes)
45//
46// Vlan Filter List
47// VLAN filter list: This attribute is a list of provisioned tag control information (TCI) values
48// for the bridge port. A TCI, comprising user priority, canonical format indicator (CFI) and
49// virtual local area network identifier (VID), is represented by 2-bytes. This attribute supports
50// up to 12 VLAN entries. The first N are valid, where N is given by the number of entries
51// attribute. (R,-W, setbycreate) (mandatory) (24-bytes)
52//
53// Forward Operation
54// Table 9.3.11-1 and the actions listed are discussed in detail in the following.
55//
56// Number Of Entries
57// Number of entries: This attribute specifies the number of valid entries in the VLAN filter list.
58// (R,-W, setbycreate) (mandatory) (1-byte)
59//
60type VlanTaggingFilterData struct {
61 ManagedEntityDefinition
62 Attributes AttributeValueMap
63}
64
65func init() {
66 vlantaggingfilterdataBME = &ManagedEntityDefinition{
67 Name: "VlanTaggingFilterData",
68 ClassID: 84,
69 MessageTypes: mapset.NewSetWith(
70 Create,
71 Delete,
72 Get,
73 Set,
74 ),
75 AllowedAttributeMask: 0xe000,
76 AttributeDefinitions: AttributeDefinitionMap{
77 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
78 1: MultiByteField("VlanFilterList", OctetsAttributeType, 0x8000, 24, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
79 2: ByteField("ForwardOperation", EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
80 3: ByteField("NumberOfEntries", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
81 },
82 Access: CreatedByOlt,
83 Support: UnknownSupport,
84 }
85}
86
87// NewVlanTaggingFilterData (class ID 84) creates the basic
88// Managed Entity definition that is used to validate an ME of this type that
89// is received from or transmitted to the OMCC.
90func NewVlanTaggingFilterData(params ...ParamData) (*ManagedEntity, OmciErrors) {
91 return NewManagedEntity(*vlantaggingfilterdataBME, params...)
92}