Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 3 | * Copyright 2020-present Open Networking Foundation |
| 4 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 5 | * 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 Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 8 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 10 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 11 | * 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 Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 17 | /* |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 18 | * 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 | |
| 24 | package generated |
| 25 | |
| 26 | import "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 Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const MacBridgePortConfigurationDataClassID = ClassID(47) // 0x002f |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var macbridgeportconfigurationdataBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // MacBridgePortConfigurationData (Class ID: #47 / 0x002f) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 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 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 43 | // This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory) |
| 44 | // (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 45 | // |
| 46 | // Bridge Id Pointer |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 47 | // This attribute points to an instance of the MAC bridge service profile. (R,-W, setbycreate) |
| 48 | // (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 49 | // |
| 50 | // Port Num |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 51 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 53 | // |
| 54 | // Tp Type |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 55 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 84 | // (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 Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 90 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 94 | // Port Priority |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 95 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 97 | // |
| 98 | // Port Path Cost |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 99 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 101 | // |
| 102 | // Port Spanning Tree Ind |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 103 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 105 | // |
| 106 | // Deprecated 1 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 107 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 109 | // |
| 110 | // Deprecated 2 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 111 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 113 | // |
| 114 | // Port Mac Address |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 115 | // If the TP associated with this port has a MAC address, this attribute specifies it. (R) |
| 116 | // (optional) (6-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 117 | // |
| 118 | // Outbound Td Pointer |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 119 | // This attribute points to a traffic descriptor that limits the traffic rate leaving the MAC |
| 120 | // bridge. (R,-W) (optional) (2-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 121 | // |
| 122 | // Inbound Td Pointer |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 123 | // This attribute points to a traffic descriptor that limits the traffic rate entering the MAC |
| 124 | // bridge. (R,-W) (optional) (2-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 125 | // |
| 126 | // Mac Learning Depth |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 127 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 131 | // 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 Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 134 | // Lasp Id Pointer |
| 135 | // This attribute points to an instance of the LASP ME. (R,W, setbycreate) (optional) (2 bytes) |
| 136 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 137 | type MacBridgePortConfigurationData struct { |
| 138 | ManagedEntityDefinition |
| 139 | Attributes AttributeValueMap |
| 140 | } |
| 141 | |
| 142 | func init() { |
| 143 | macbridgeportconfigurationdataBME = &ManagedEntityDefinition{ |
| 144 | Name: "MacBridgePortConfigurationData", |
| 145 | ClassID: 47, |
| 146 | MessageTypes: mapset.NewSetWith( |
| 147 | Create, |
| 148 | Delete, |
| 149 | Get, |
| 150 | Set, |
| 151 | ), |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 152 | AllowedAttributeMask: 0xfffc, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 153 | 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 Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 168 | 14: Uint16Field("LaspIdPointer", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 14), |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 169 | }, |
| 170 | Access: CreatedByOlt, |
| 171 | Support: UnknownSupport, |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 172 | Alarms: AlarmMap{ |
| 173 | 0: "Port blocking", |
| 174 | }, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 175 | } |
| 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. |
| 181 | func NewMacBridgePortConfigurationData(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 182 | return NewManagedEntity(*macbridgeportconfigurationdataBME, params...) |
| 183 | } |