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