blob: e2badbb1d362ed448f2d0cdafd74920d86080122 [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
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00004 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00005 * 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
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00008 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +000011 * 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 */
Himani Chawlaac1f5ad2021-02-04 21:21:54 +053017/*
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// MacBridgePortConfigurationDataClassID is the 16-bit ID for the OMCI
29// Managed entity MAC bridge port configuration data
mpagenko836a1fd2021-11-01 16:12:42 +000030const MacBridgePortConfigurationDataClassID = ClassID(47) // 0x002f
Holger Hildebrandtfa074992020-03-27 15:42:06 +000031
32var macbridgeportconfigurationdataBME *ManagedEntityDefinition
33
mpagenko836a1fd2021-11-01 16:12:42 +000034// MacBridgePortConfigurationData (Class ID: #47 / 0x002f)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000035// 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
mpagenko836a1fd2021-11-01 16:12:42 +000043// This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory)
44// (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000045//
46// Bridge Id Pointer
mpagenko836a1fd2021-11-01 16:12:42 +000047// This attribute points to an instance of the MAC bridge service profile. (R,-W, setbycreate)
48// (mandatory) (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000049//
50// Port Num
mpagenko836a1fd2021-11-01 16:12:42 +000051// This attribute is the bridge port number. It must be unique among all ports associated with a
52// particular MAC bridge service profile. (R,-W, setbycreate) (mandatory) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000053//
54// Tp Type
mpagenko836a1fd2021-11-01 16:12:42 +000055// This attribute identifies the type of TP associated with this MAC bridge port. Valid values are
56// as follows.
57//
58// 1 Physical path termination point Ethernet UNI
59//
60// 2 Interworking virtual circuit connection (VCC) termination point
61//
62// 3 IEEE 802.1p mapper service profile
63//
64// 4 IP host config data or IPv6 host config data
65//
66// 5 GEM interworking termination point
67//
68// 6 Multicast GEM interworking termination point
69//
70// 7 Physical path termination point xDSL UNI part 1
71//
72// 8 Physical path termination point VDSL UNI
73//
74// 9 Ethernet flow termination point
75//
76// 10 Reserved
77//
78// 11 Virtual Ethernet interface point
79//
80// 12 Physical path termination point MoCA UNI
81//
82// 13 Ethernet in the first mile (EFM) bonding group
83//
Holger Hildebrandtfa074992020-03-27 15:42:06 +000084// (R,-W, setbycreate) (mandatory) (1-byte)
85//
86// Tp Pointer
87// NOTE 1 - When the TP type is very high-speed digital subscriber line (VDSL) or xDSL, the two
88// MSBs may be used to indicate a bearer channel.
89//
mpagenko836a1fd2021-11-01 16:12:42 +000090// This attribute points to the TP associated with this MAC bridge port. The TP type attribute
91// indicates the type of the TP; this attribute contains its instance identifier (ME ID). (R,-W,
92// setbycreate) (mandatory) (2-bytes)
93//
Holger Hildebrandtfa074992020-03-27 15:42:06 +000094// Port Priority
mpagenko836a1fd2021-11-01 16:12:42 +000095// This attribute denotes the priority of the port for use in (rapid) spanning tree algorithms. The
96// range is 0..255. (R,-W, setbycreate) (optional) (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000097//
98// Port Path Cost
mpagenko836a1fd2021-11-01 16:12:42 +000099// This attribute specifies the contribution of the port to the path cost towards the spanning tree
100// root bridge. The range is 1..65535. (R,-W, setbycreate) (mandatory) (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000101//
102// Port Spanning Tree Ind
mpagenko836a1fd2021-11-01 16:12:42 +0000103// The Boolean value true enables (R)STP LAN topology change detection at this port. The value
104// false disables topology change detection. (R,-W, setbycreate) (mandatory) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000105//
106// Deprecated 1
mpagenko836a1fd2021-11-01 16:12:42 +0000107// This attribute is not used. If present, it should be ignored by both the ONU and the OLT, except
108// as necessary to comply with OMCI message definitions. (R,-W, setbycreate) (optional) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000109//
110// Deprecated 2
mpagenko836a1fd2021-11-01 16:12:42 +0000111// This attribute is not used. If present, it should be ignored by both the ONU and the OLT, except
112// as necessary to comply with OMCI message definitions. (R,-W, setbycreate) (1-byte) (optional)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000113//
114// Port Mac Address
mpagenko836a1fd2021-11-01 16:12:42 +0000115// If the TP associated with this port has a MAC address, this attribute specifies it. (R)
116// (optional) (6-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000117//
118// Outbound Td Pointer
mpagenko836a1fd2021-11-01 16:12:42 +0000119// This attribute points to a traffic descriptor that limits the traffic rate leaving the MAC
120// bridge. (R,-W) (optional) (2-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000121//
122// Inbound Td Pointer
mpagenko836a1fd2021-11-01 16:12:42 +0000123// This attribute points to a traffic descriptor that limits the traffic rate entering the MAC
124// bridge. (R,-W) (optional) (2-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000125//
126// Mac Learning Depth
mpagenko836a1fd2021-11-01 16:12:42 +0000127// This attribute specifies the maximum number of MAC addresses to be learned by this MAC bridge
128// port. The default value 0 specifies that there is no administratively imposed limit. (R,-W,
129// setbycreate) (optional) (1-byte)
130//
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000131// NOTE 2 - If this attribute is not zero, its value overrides the value set in the MAC learning
132// depth attribute of the MAC bridge service profile.
133//
mpagenko836a1fd2021-11-01 16:12:42 +0000134// Lasp Id Pointer
135// This attribute points to an instance of the LASP ME. (R,W, setbycreate) (optional) (2 bytes)
136//
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000137type MacBridgePortConfigurationData struct {
138 ManagedEntityDefinition
139 Attributes AttributeValueMap
140}
141
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000142// Attribute name constants
143
144const MacBridgePortConfigurationData_BridgeIdPointer = "BridgeIdPointer"
145const MacBridgePortConfigurationData_PortNum = "PortNum"
146const MacBridgePortConfigurationData_TpType = "TpType"
147const MacBridgePortConfigurationData_TpPointer = "TpPointer"
148const MacBridgePortConfigurationData_PortPriority = "PortPriority"
149const MacBridgePortConfigurationData_PortPathCost = "PortPathCost"
150const MacBridgePortConfigurationData_PortSpanningTreeInd = "PortSpanningTreeInd"
151const MacBridgePortConfigurationData_Deprecated1 = "Deprecated1"
152const MacBridgePortConfigurationData_Deprecated2 = "Deprecated2"
153const MacBridgePortConfigurationData_PortMacAddress = "PortMacAddress"
154const MacBridgePortConfigurationData_OutboundTdPointer = "OutboundTdPointer"
155const MacBridgePortConfigurationData_InboundTdPointer = "InboundTdPointer"
156const MacBridgePortConfigurationData_MacLearningDepth = "MacLearningDepth"
157const MacBridgePortConfigurationData_LaspIdPointer = "LaspIdPointer"
158
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000159func init() {
160 macbridgeportconfigurationdataBME = &ManagedEntityDefinition{
161 Name: "MacBridgePortConfigurationData",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000162 ClassID: MacBridgePortConfigurationDataClassID,
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000163 MessageTypes: mapset.NewSetWith(
164 Create,
165 Delete,
166 Get,
167 Set,
168 ),
mpagenko836a1fd2021-11-01 16:12:42 +0000169 AllowedAttributeMask: 0xfffc,
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000170 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000171 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
172 1: Uint16Field(MacBridgePortConfigurationData_BridgeIdPointer, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
173 2: ByteField(MacBridgePortConfigurationData_PortNum, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
174 3: ByteField(MacBridgePortConfigurationData_TpType, EnumerationAttributeType, 0x2000, 1, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
175 4: Uint16Field(MacBridgePortConfigurationData_TpPointer, PointerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
176 5: Uint16Field(MacBridgePortConfigurationData_PortPriority, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
177 6: Uint16Field(MacBridgePortConfigurationData_PortPathCost, UnsignedIntegerAttributeType, 0x0400, 1, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
178 7: ByteField(MacBridgePortConfigurationData_PortSpanningTreeInd, EnumerationAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
179 8: ByteField(MacBridgePortConfigurationData_Deprecated1, UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, true, 8),
180 9: ByteField(MacBridgePortConfigurationData_Deprecated2, UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, true, 9),
181 10: MultiByteField(MacBridgePortConfigurationData_PortMacAddress, OctetsAttributeType, 0x0040, 6, toOctets("AAAAAAAA"), mapset.NewSetWith(Read), false, true, false, 10),
182 11: Uint16Field(MacBridgePortConfigurationData_OutboundTdPointer, PointerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
183 12: Uint16Field(MacBridgePortConfigurationData_InboundTdPointer, PointerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
184 13: ByteField(MacBridgePortConfigurationData_MacLearningDepth, UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13),
185 14: Uint16Field(MacBridgePortConfigurationData_LaspIdPointer, UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 14),
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000186 },
187 Access: CreatedByOlt,
188 Support: UnknownSupport,
Himani Chawlaac1f5ad2021-02-04 21:21:54 +0530189 Alarms: AlarmMap{
190 0: "Port blocking",
191 },
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000192 }
193}
194
195// NewMacBridgePortConfigurationData (class ID 47) creates the basic
196// Managed Entity definition that is used to validate an ME of this type that
197// is received from or transmitted to the OMCC.
198func NewMacBridgePortConfigurationData(params ...ParamData) (*ManagedEntity, OmciErrors) {
199 return NewManagedEntity(*macbridgeportconfigurationdataBME, params...)
200}