blob: 24e245dd6b32f64f69339b3b708b464df6be7387 [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 */
Chip Boling34ebcb62021-02-02 12:13:58 -060017/*
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
Chip Boling610117d2021-09-09 11:24:34 -050030const MacBridgePortConfigurationDataClassID = ClassID(47) // 0x002f
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var macbridgeportconfigurationdataBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// MacBridgePortConfigurationData (Class ID: #47 / 0x002f)
Chip Boling6e27b352020-02-14 09:10:01 -060035// 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
Chip Boling610117d2021-09-09 11:24:34 -050043// This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory)
44// (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060045//
46// Bridge Id Pointer
Chip Boling610117d2021-09-09 11:24:34 -050047// This attribute points to an instance of the MAC bridge service profile. (R,-W, setbycreate)
48// (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060049//
50// Port Num
Chip Boling610117d2021-09-09 11:24:34 -050051// 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)
Chip Boling6e27b352020-02-14 09:10:01 -060053//
54// Tp Type
Chip Boling610117d2021-09-09 11:24:34 -050055// 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//
Chip Boling6e27b352020-02-14 09:10:01 -060084// (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//
Chip Boling610117d2021-09-09 11:24:34 -050090// 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//
Chip Boling6e27b352020-02-14 09:10:01 -060094// Port Priority
Chip Boling610117d2021-09-09 11:24:34 -050095// 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)
Chip Boling6e27b352020-02-14 09:10:01 -060097//
98// Port Path Cost
Chip Boling610117d2021-09-09 11:24:34 -050099// 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)
Chip Boling6e27b352020-02-14 09:10:01 -0600101//
102// Port Spanning Tree Ind
Chip Boling610117d2021-09-09 11:24:34 -0500103// 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)
Chip Boling6e27b352020-02-14 09:10:01 -0600105//
106// Deprecated 1
Chip Boling610117d2021-09-09 11:24:34 -0500107// 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)
Chip Boling6e27b352020-02-14 09:10:01 -0600109//
110// Deprecated 2
Chip Boling610117d2021-09-09 11:24:34 -0500111// 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)
Chip Boling6e27b352020-02-14 09:10:01 -0600113//
114// Port Mac Address
Chip Boling610117d2021-09-09 11:24:34 -0500115// If the TP associated with this port has a MAC address, this attribute specifies it. (R)
116// (optional) (6-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600117//
118// Outbound Td Pointer
Chip Boling610117d2021-09-09 11:24:34 -0500119// This attribute points to a traffic descriptor that limits the traffic rate leaving the MAC
120// bridge. (R,-W) (optional) (2-byte)
Chip Boling6e27b352020-02-14 09:10:01 -0600121//
122// Inbound Td Pointer
Chip Boling610117d2021-09-09 11:24:34 -0500123// This attribute points to a traffic descriptor that limits the traffic rate entering the MAC
124// bridge. (R,-W) (optional) (2-byte)
Chip Boling6e27b352020-02-14 09:10:01 -0600125//
126// Mac Learning Depth
Chip Boling610117d2021-09-09 11:24:34 -0500127// 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//
Chip Boling6e27b352020-02-14 09:10:01 -0600131// 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//
Chip Boling610117d2021-09-09 11:24:34 -0500134// Lasp Id Pointer
135// This attribute points to an instance of the LASP ME. (R,W, setbycreate) (optional) (2 bytes)
136//
Chip Boling6e27b352020-02-14 09:10:01 -0600137type MacBridgePortConfigurationData struct {
138 ManagedEntityDefinition
139 Attributes AttributeValueMap
140}
141
142func init() {
143 macbridgeportconfigurationdataBME = &ManagedEntityDefinition{
144 Name: "MacBridgePortConfigurationData",
145 ClassID: 47,
146 MessageTypes: mapset.NewSetWith(
147 Create,
148 Delete,
149 Get,
150 Set,
151 ),
Chip Boling610117d2021-09-09 11:24:34 -0500152 AllowedAttributeMask: 0xfffc,
Chip Boling6e27b352020-02-14 09:10:01 -0600153 AttributeDefinitions: AttributeDefinitionMap{
154 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
155 1: Uint16Field("BridgeIdPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
156 2: ByteField("PortNum", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
157 3: ByteField("TpType", EnumerationAttributeType, 0x2000, 1, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
158 4: Uint16Field("TpPointer", PointerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
159 5: Uint16Field("PortPriority", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
160 6: Uint16Field("PortPathCost", UnsignedIntegerAttributeType, 0x0400, 1, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
161 7: ByteField("PortSpanningTreeInd", EnumerationAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
162 8: ByteField("Deprecated1", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, true, 8),
163 9: ByteField("Deprecated2", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, true, 9),
164 10: MultiByteField("PortMacAddress", OctetsAttributeType, 0x0040, 6, toOctets("AAAAAAAA"), mapset.NewSetWith(Read), false, true, false, 10),
165 11: Uint16Field("OutboundTdPointer", PointerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
166 12: Uint16Field("InboundTdPointer", PointerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
167 13: ByteField("MacLearningDepth", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13),
Chip Boling610117d2021-09-09 11:24:34 -0500168 14: Uint16Field("LaspIdPointer", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 14),
Chip Boling6e27b352020-02-14 09:10:01 -0600169 },
170 Access: CreatedByOlt,
171 Support: UnknownSupport,
Chip Boling34ebcb62021-02-02 12:13:58 -0600172 Alarms: AlarmMap{
173 0: "Port blocking",
174 },
Chip Boling6e27b352020-02-14 09:10:01 -0600175 }
176}
177
178// NewMacBridgePortConfigurationData (class ID 47) creates the basic
179// Managed Entity definition that is used to validate an ME of this type that
180// is received from or transmitted to the OMCC.
181func NewMacBridgePortConfigurationData(params ...ParamData) (*ManagedEntity, OmciErrors) {
182 return NewManagedEntity(*macbridgeportconfigurationdataBME, params...)
183}