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 |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame] | 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 |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame] | 8 | * |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [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 | // PhysicalPathTerminationPointEthernetUniClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Physical path termination point Ethernet UNI |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const PhysicalPathTerminationPointEthernetUniClassID = ClassID(11) // 0x000b |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var physicalpathterminationpointethernetuniBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // PhysicalPathTerminationPointEthernetUni (Class ID: #11 / 0x000b) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // This ME represents the point at an Ethernet UNI where the physical path terminates and Ethernet |
| 36 | // physical level functions are performed. |
| 37 | // |
| 38 | // The ONU automatically creates an instance of this ME per port: |
| 39 | // |
| 40 | // o when the ONU has Ethernet ports built into its factory configuration; |
| 41 | // |
| 42 | // o when a cardholder is provisioned to expect a circuit pack of the Ethernet type; |
| 43 | // |
| 44 | // o when a cardholder provisioned for plug-and-play is equipped with a circuit pack of the |
| 45 | // Ethernet type. Note that the installation of a plug-and-play card may indicate the presence of |
| 46 | // Ethernet ports via equipment ID as well as its type, and indeed may cause the ONU to instantiate |
| 47 | // a port-mapping package that specifies Ethernet ports. |
| 48 | // |
| 49 | // The ONU automatically deletes instances of this ME when a cardholder is neither provisioned to |
| 50 | // expect an Ethernet circuit pack, nor is it equipped with an Ethernet circuit pack. |
| 51 | // |
| 52 | // Relationships |
| 53 | // An instance of this ME is associated with each instance of a pre-provisioned or real Ethernet |
| 54 | // port. |
| 55 | // |
| 56 | // Attributes |
| 57 | // Managed Entity Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 58 | // This attribute uniquely identifies each instance of this ME. This 2 byte number indicates the |
| 59 | // physical position of the UNI. The first byte is the slot ID (defined in clause 9.1.5). The |
| 60 | // second byte is the port ID, with the range 1..255. (R) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 61 | // |
| 62 | // Expected Type |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 63 | // This attribute supports pre-provisioning. It is coded as follows: |
| 64 | // |
| 65 | // 0 Autosense |
| 66 | // |
| 67 | // 1 to 254 One of the values from Table-9.1.5-1 that is compatible with an Ethernet circuit pack |
| 68 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 69 | // Upon ME instantiation, the ONU sets this attribute to 0. (R,-W) (mandatory) (1-byte) |
| 70 | // |
| 71 | // Sensed Type |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 72 | // When a circuit pack is present, this attribute represents its type as one of the values from |
| 73 | // Table-9.1.5-1. If the value of the expected type is not 0, then the value of the sensed type |
| 74 | // should be the same as the value of the expected type. Upon ME instantiation, the ONU sets this |
| 75 | // attribute to 0. See also the note in the following AVC table. |
| 76 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 77 | // (R) (mandatory if the ONU supports circuit packs with configurable interface types, e.g., 10/100 |
| 78 | // BASE-T card) (1-byte) |
| 79 | // |
| 80 | // Auto Detection Configuration |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 81 | // This attribute sets the following Ethernet port configuration. |
| 82 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 83 | // Upon ME instantiation, the ONU sets this attribute to 0. (R,-W) (mandatory for interfaces with |
| 84 | // autodetection options) (1-byte) |
| 85 | // |
| 86 | // Ethernet Loopback Configuration |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 87 | // This attribute sets the following Ethernet loopback configuration. |
| 88 | // |
| 89 | // 0 No loopback |
| 90 | // |
| 91 | // 3 Loop 3, loopback of downstream traffic after PHY transceiver. Loop-3 is depicted in Figure |
| 92 | // 9.5.1-1. |
| 93 | // |
| 94 | // Note that normal bridge behaviour may defeat the loopback signal unless broadcast MAC addresses |
| 95 | // are used. Although it does not reach the physical interface, [IEEE 802.1ag] loopback is |
| 96 | // preferred. |
| 97 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 98 | // Upon ME instantiation, the ONU sets this attribute to 0. (R,-W) (mandatory) (1-byte) |
| 99 | // |
| 100 | // Administrative State |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 101 | // This attribute locks (1) and unlocks (0) the functions performed by this ME. Administrative |
| 102 | // state is further described in clause A.1.6. (R,-W) (mandatory) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 103 | // |
| 104 | // Operational State |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 105 | // This attribute indicates whether the ME is capable of performing its function. Valid values are |
| 106 | // enabled (0) and disabled (1). (R) (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 107 | // |
| 108 | // Configuration Ind |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 109 | // This attribute indicates the configuration status of the Ethernet UNI. |
| 110 | // |
| 111 | // 0x01 10BASE-T full duplex |
| 112 | // |
| 113 | // 0x02 100BASE-T full duplex |
| 114 | // |
| 115 | // 0x03 Gigabit Ethernet full duplex |
| 116 | // |
| 117 | // 0x04 10Gb/s Ethernet full duplex |
| 118 | // |
| 119 | // 0x05 2.5Gb/s Ethernet full duplex |
| 120 | // |
| 121 | // 0x06 5Gb/s Ethernet full duplex |
| 122 | // |
| 123 | // 0x07 25Gb/s Ethernet full duplex |
| 124 | // |
| 125 | // 0x08 40Gb/s Ethernet full duplex |
| 126 | // |
| 127 | // 0x11 10BASE-T half duplex |
| 128 | // |
| 129 | // 0x12 100BASE-T half duplex |
| 130 | // |
| 131 | // 0x13 Gigabit Ethernet half duplex |
| 132 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 133 | // The value 0 indicates that the configuration status is unknown (e.g., Ethernet link is not |
| 134 | // established or the circuit pack is not yet installed). Upon ME instantiation, the ONU sets this |
| 135 | // attribute to 0. (R) (mandatory) (1-byte) |
| 136 | // |
| 137 | // Max Frame Size |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 138 | // This attribute denotes the maximum frame size allowed across this interface. Upon ME |
| 139 | // instantiation, the ONU sets the attribute to 1518. (R,-W) (mandatory for G-PON, optional for |
| 140 | // ITU-T G.986 systems) (2 bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 141 | // |
| 142 | // Dte Or Dce Ind |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 143 | // This attribute specifies the following Ethernet interface wiring. |
| 144 | // |
| 145 | // 0 DCE or MDI-X (default). |
| 146 | // |
| 147 | // 1 DTE or MDI. |
| 148 | // |
| 149 | // 2 Automatic selection |
| 150 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 151 | // (R,-W) (mandatory) (1-byte) |
| 152 | // |
| 153 | // Pause Time |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 154 | // This attribute allows the PPTP to ask the subscriber terminal to temporarily suspend sending |
| 155 | // data. Units are in pause quanta (1 pause quantum is 512 bit times of the particular |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 156 | // implementation). Values: 0..0xFFFF. Upon ME instantiation, the ONU sets this attribute to 0. |
| 157 | // (R,-W) (optional) (2-bytes) |
| 158 | // |
| 159 | // Bridged Or Ip Ind |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 160 | // This attribute specifies whether the Ethernet interface is bridged or derived from an IP router |
| 161 | // function. |
| 162 | // |
| 163 | // 0 Bridged |
| 164 | // |
| 165 | // 1 IP router |
| 166 | // |
| 167 | // 2 Depends on the parent circuit pack. 2 means that the circuit pack's bridged or IP ind |
| 168 | // attribute is either 0 or 1. |
| 169 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 170 | // Upon ME instantiation, the ONU sets this attribute to 2. (R,-W) (optional) (1-byte) |
| 171 | // |
| 172 | // Arc |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 173 | // See clause A.1.4.3. (R,-W) (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 174 | // |
| 175 | // Arc Interval |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 176 | // See clause A.1.4.3. (R,-W) (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 177 | // |
| 178 | // Pppoe Filter |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 179 | // This attribute controls filtering of PPPoE packets on this Ethernet port. The value 0 allows |
| 180 | // packets of all types. The value 1 discards everything but PPPoE packets. The default value is 0. |
| 181 | // (R,-W) (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 182 | // |
| 183 | // Power Control |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 184 | // This attribute controls whether power is provided to an external equipment over the Ethernet |
| 185 | // PPTP. The value 1 enables power over the Ethernet port. The default value 0 disables power feed. |
| 186 | // (R,-W) (optional) (1-byte) |
| 187 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 188 | // NOTE - This attribute is the equivalent of the acPSEAdminControl variable defined in clause |
| 189 | // 30.9.1.2.1 of [IEEE 802.3]. Other variables related to PoE appear in the PoE control ME. |
| 190 | // |
| 191 | type PhysicalPathTerminationPointEthernetUni struct { |
| 192 | ManagedEntityDefinition |
| 193 | Attributes AttributeValueMap |
| 194 | } |
| 195 | |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame] | 196 | // Attribute name constants |
| 197 | |
| 198 | const PhysicalPathTerminationPointEthernetUni_ExpectedType = "ExpectedType" |
| 199 | const PhysicalPathTerminationPointEthernetUni_SensedType = "SensedType" |
| 200 | const PhysicalPathTerminationPointEthernetUni_AutoDetectionConfiguration = "AutoDetectionConfiguration" |
| 201 | const PhysicalPathTerminationPointEthernetUni_EthernetLoopbackConfiguration = "EthernetLoopbackConfiguration" |
| 202 | const PhysicalPathTerminationPointEthernetUni_AdministrativeState = "AdministrativeState" |
| 203 | const PhysicalPathTerminationPointEthernetUni_OperationalState = "OperationalState" |
| 204 | const PhysicalPathTerminationPointEthernetUni_ConfigurationInd = "ConfigurationInd" |
| 205 | const PhysicalPathTerminationPointEthernetUni_MaxFrameSize = "MaxFrameSize" |
| 206 | const PhysicalPathTerminationPointEthernetUni_DteOrDceInd = "DteOrDceInd" |
| 207 | const PhysicalPathTerminationPointEthernetUni_PauseTime = "PauseTime" |
| 208 | const PhysicalPathTerminationPointEthernetUni_BridgedOrIpInd = "BridgedOrIpInd" |
| 209 | const PhysicalPathTerminationPointEthernetUni_Arc = "Arc" |
| 210 | const PhysicalPathTerminationPointEthernetUni_ArcInterval = "ArcInterval" |
| 211 | const PhysicalPathTerminationPointEthernetUni_PppoeFilter = "PppoeFilter" |
| 212 | const PhysicalPathTerminationPointEthernetUni_PowerControl = "PowerControl" |
| 213 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 214 | func init() { |
| 215 | physicalpathterminationpointethernetuniBME = &ManagedEntityDefinition{ |
| 216 | Name: "PhysicalPathTerminationPointEthernetUni", |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame] | 217 | ClassID: PhysicalPathTerminationPointEthernetUniClassID, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 218 | MessageTypes: mapset.NewSetWith( |
| 219 | Get, |
| 220 | Set, |
| 221 | ), |
| 222 | AllowedAttributeMask: 0xfffe, |
| 223 | AttributeDefinitions: AttributeDefinitionMap{ |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame] | 224 | 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 225 | 1: ByteField(PhysicalPathTerminationPointEthernetUni_ExpectedType, EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1), |
| 226 | 2: ByteField(PhysicalPathTerminationPointEthernetUni_SensedType, EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, false, false, 2), |
| 227 | 3: ByteField(PhysicalPathTerminationPointEthernetUni_AutoDetectionConfiguration, EnumerationAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3), |
| 228 | 4: ByteField(PhysicalPathTerminationPointEthernetUni_EthernetLoopbackConfiguration, EnumerationAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4), |
| 229 | 5: ByteField(PhysicalPathTerminationPointEthernetUni_AdministrativeState, EnumerationAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5), |
| 230 | 6: ByteField(PhysicalPathTerminationPointEthernetUni_OperationalState, EnumerationAttributeType, 0x0400, 0, mapset.NewSetWith(Read), true, true, false, 6), |
| 231 | 7: ByteField(PhysicalPathTerminationPointEthernetUni_ConfigurationInd, EnumerationAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7), |
| 232 | 8: Uint16Field(PhysicalPathTerminationPointEthernetUni_MaxFrameSize, UnsignedIntegerAttributeType, 0x0100, 1518, mapset.NewSetWith(Read, Write), false, false, false, 8), |
| 233 | 9: ByteField(PhysicalPathTerminationPointEthernetUni_DteOrDceInd, EnumerationAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, false, false, 9), |
| 234 | 10: Uint16Field(PhysicalPathTerminationPointEthernetUni_PauseTime, UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, true, false, 10), |
| 235 | 11: ByteField(PhysicalPathTerminationPointEthernetUni_BridgedOrIpInd, EnumerationAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11), |
| 236 | 12: ByteField(PhysicalPathTerminationPointEthernetUni_Arc, EnumerationAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), true, true, false, 12), |
| 237 | 13: ByteField(PhysicalPathTerminationPointEthernetUni_ArcInterval, UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13), |
| 238 | 14: ByteField(PhysicalPathTerminationPointEthernetUni_PppoeFilter, EnumerationAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14), |
| 239 | 15: ByteField(PhysicalPathTerminationPointEthernetUni_PowerControl, EnumerationAttributeType, 0x0002, 0, mapset.NewSetWith(Read, Write), false, true, false, 15), |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 240 | }, |
| 241 | Access: CreatedByOnu, |
| 242 | Support: UnknownSupport, |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 243 | Alarms: AlarmMap{ |
| 244 | 0: "LAN-LOS", |
| 245 | }, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 246 | } |
| 247 | } |
| 248 | |
| 249 | // NewPhysicalPathTerminationPointEthernetUni (class ID 11) creates the basic |
| 250 | // Managed Entity definition that is used to validate an ME of this type that |
| 251 | // is received from or transmitted to the OMCC. |
| 252 | func NewPhysicalPathTerminationPointEthernetUni(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 253 | return NewManagedEntity(*physicalpathterminationpointethernetuniBME, params...) |
| 254 | } |