blob: 91edcc83f8a760bf843b834509312ac27ed37ed4 [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// MacBridgePortConfigurationDataClassID is the 16-bit ID for the OMCI
26// Managed entity MAC bridge port configuration data
27const MacBridgePortConfigurationDataClassID ClassID = ClassID(47)
28
29var macbridgeportconfigurationdataBME *ManagedEntityDefinition
30
31// MacBridgePortConfigurationData (class ID #47)
32// This ME models a port on a MAC bridge. Instances of this ME are created and deleted by the OLT.
33//
34// Relationships
35// An instance of this ME is linked to an instance of the MAC bridge service profile. Additional
36// bridge port control capabilities are provided by implicitly linked instances of some or all of://// o MAC bridge port filter table data;//// o MAC bridge port filter pre-assign table;//// o VLAN tagging filter data;//// o Dot1 rate limiter.//// Real-time status of the bridge port is provided by implicitly linked instances of://// o MAC bridge port designation data;//// o MAC bridge port bridge table data;//// o Multicast subscriber monitor.//// Bridge port PM collection is provided by implicitly linked instances of://// o MAC bridge port PM history data;//// o Ethernet frame PM history data upstream and downstream;//// o Ethernet frame extended PM (preferred).
37//
38// Attributes
39// Managed Entity Id
40// Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
41// (mandatory) (2-bytes)
42//
43// Bridge Id Pointer
44// Bridge ID pointer: This attribute points to an instance of the MAC bridge service profile.
45// (R,-W, setbycreate) (mandatory) (2-bytes)
46//
47// Port Num
48// Port num: This attribute is the bridge port number. It must be unique among all ports associated
49// with a particular MAC bridge service profile. (R,-W, setbycreate) (mandatory) (1-byte)
50//
51// Tp Type
52// (R,-W, setbycreate) (mandatory) (1-byte)
53//
54// Tp Pointer
55// NOTE 1 - When the TP type is very high-speed digital subscriber line (VDSL) or xDSL, the two
56// MSBs may be used to indicate a bearer channel.
57//
58// Port Priority
59// Port priority: This attribute denotes the priority of the port for use in (rapid) spanning tree
60// algorithms. The range is 0..255. (R,-W, setbycreate) (optional) (2-bytes)
61//
62// Port Path Cost
63// Port path cost: This attribute specifies the contribution of the port to the path cost towards
64// the spanning tree root bridge. The range is 1..65535. (R,-W, setbycreate) (mandatory) (2-bytes)
65//
66// Port Spanning Tree Ind
67// Port spanning tree ind: The Boolean value true enables (R)STP LAN topology change detection at
68// this port. The value false disables topology change detection. (R,-W, setbycreate) (mandatory)
69// (1-byte)
70//
71// Deprecated 1
72// Deprecated 1: This attribute is not used. If present, it should be ignored by both the ONU and
73// the OLT, except as necessary to comply with OMCI message definitions. (R,-W, setbycreate)
74// (optional) (1-byte)
75//
76// Deprecated 2
77// Deprecated 2: This attribute is not used. If present, it should be ignored by both the ONU and
78// the OLT, except as necessary to comply with OMCI message definitions. (R,-W, setbycreate)
79// (1-byte) (optional)
80//
81// Port Mac Address
82// Port MAC address: If the TP associated with this port has a MAC address, this attribute
83// specifies it. (R) (optional) (6-bytes)
84//
85// Outbound Td Pointer
86// Outbound TD pointer: This attribute points to a traffic descriptor that limits the traffic rate
87// leaving the MAC bridge. (R,-W) (optional) (2-byte)
88//
89// Inbound Td Pointer
90// Inbound TD pointer: This attribute points to a traffic descriptor that limits the traffic rate
91// entering the MAC bridge. (R,-W) (optional) (2-byte)
92//
93// Mac Learning Depth
94// NOTE 2 - If this attribute is not zero, its value overrides the value set in the MAC learning
95// depth attribute of the MAC bridge service profile.
96//
97type MacBridgePortConfigurationData struct {
98 ManagedEntityDefinition
99 Attributes AttributeValueMap
100}
101
102func init() {
103 macbridgeportconfigurationdataBME = &ManagedEntityDefinition{
104 Name: "MacBridgePortConfigurationData",
105 ClassID: 47,
106 MessageTypes: mapset.NewSetWith(
107 Create,
108 Delete,
109 Get,
110 Set,
111 ),
112 AllowedAttributeMask: 0xfff8,
113 AttributeDefinitions: AttributeDefinitionMap{
114 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
115 1: Uint16Field("BridgeIdPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
116 2: ByteField("PortNum", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
117 3: ByteField("TpType", EnumerationAttributeType, 0x2000, 1, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
118 4: Uint16Field("TpPointer", PointerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
119 5: Uint16Field("PortPriority", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
120 6: Uint16Field("PortPathCost", UnsignedIntegerAttributeType, 0x0400, 1, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
121 7: ByteField("PortSpanningTreeInd", EnumerationAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
122 8: ByteField("Deprecated1", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, true, 8),
123 9: ByteField("Deprecated2", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, true, 9),
124 10: MultiByteField("PortMacAddress", OctetsAttributeType, 0x0040, 6, toOctets("AAAAAAAA"), mapset.NewSetWith(Read), false, true, false, 10),
125 11: Uint16Field("OutboundTdPointer", PointerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
126 12: Uint16Field("InboundTdPointer", PointerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
127 13: ByteField("MacLearningDepth", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13),
128 },
129 Access: CreatedByOlt,
130 Support: UnknownSupport,
131 }
132}
133
134// NewMacBridgePortConfigurationData (class ID 47) creates the basic
135// Managed Entity definition that is used to validate an ME of this type that
136// is received from or transmitted to the OMCC.
137func NewMacBridgePortConfigurationData(params ...ParamData) (*ManagedEntity, OmciErrors) {
138 return NewManagedEntity(*macbridgeportconfigurationdataBME, params...)
139}