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 | // PhysicalPathTerminationPointCesUniClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Physical path termination point CES UNI |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const PhysicalPathTerminationPointCesUniClassID = ClassID(12) // 0x000c |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var physicalpathterminationpointcesuniBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // PhysicalPathTerminationPointCesUni (Class ID: #12 / 0x000c) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // This ME represents the point at a CES UNI in the ONU where the physical path terminates and |
| 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 CES ports built into its factory configuration; |
| 41 | // |
| 42 | // o when a cardholder is provisioned to expect a circuit pack of a CES type; |
| 43 | // |
| 44 | // o when a cardholder provisioned for plug-and-play is equipped with a circuit pack of a CES type. |
| 45 | // Note that the installation of a plug-and-play card may indicate the presence of CES ports via |
| 46 | // equipment ID as well as its type and indeed may cause the ONU to instantiate a port-mapping |
| 47 | // package that specifies CES ports. |
| 48 | // |
| 49 | // The ONU automatically deletes instances of this ME when a cardholder is neither provisioned to |
| 50 | // expect a CES circuit pack, nor is it equipped with a CES circuit pack. |
| 51 | // |
| 52 | // Relationships |
| 53 | // An instance of this ME is associated with each real or pre-provisioned CES port. It can be |
| 54 | // linked from a GEM IW TP, a pseudowire TP or a logical N * 64 kbit/s CTP. |
| 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 | // 1 to 254 One of the values from Table-9.1.5-1 that is compatible with a CES circuit pack |
| 64 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 65 | // Upon ME instantiation, the ONU sets this attribute to 0. (R,-W) (mandatory) (1-byte) |
| 66 | // |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 67 | // The following coding is used for this attribute- |
| 68 | // |
| 69 | // 0 Autosense |
| 70 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 71 | // Sensed Type |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 72 | // If the value of expected type is not 0, then the value of sensed type equals the value of |
| 73 | // expected type. If expected type-= 0, then the value of sensed type is one of the compatible |
| 74 | // values from Table-9.1.5-1. Upon ME instantiation, the ONU sets this attribute to 0 or to the |
| 75 | // value that reflects the physically present equipment. (R) (mandatory if the ONU supports circuit |
| 76 | // packs with configurable interface types, e.g., C1.5/2/6.3) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 77 | // |
| 78 | // Ces Loopback Configuration |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 79 | // This attribute specifies and reports the loopback configuration of the physical interface. |
| 80 | // |
| 81 | // 0 No loopback |
| 82 | // |
| 83 | // 1 Payload loopback |
| 84 | // |
| 85 | // 2 Line loopback |
| 86 | // |
| 87 | // 3 Operations system-directed (OS-directed) loopback 1 (loopback from/to PON side) |
| 88 | // |
| 89 | // 4 OS-directed loopback 2 (loopback from/to CES UNI side) |
| 90 | // |
| 91 | // 5 OS-directed loopback 3 (loopback of both PON side and CES UNI side) |
| 92 | // |
| 93 | // 6 Manual button-directed loopback [read only (RO)] |
| 94 | // |
| 95 | // 7 Network-side code inband-directed loopback (RO) |
| 96 | // |
| 97 | // 8 SmartJack-directed loopback (RO) |
| 98 | // |
| 99 | // 9 Network-side code inband-directed loopback (armed; RO) |
| 100 | // |
| 101 | // 10 Remote-line loopback via facility data link (FDL) |
| 102 | // |
| 103 | // 11 Remote-line loopback via inband code |
| 104 | // |
| 105 | // 12 Remote-payload loopback |
| 106 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 107 | // Upon ME instantiation, the ONU sets this attribute to 0. (R,-W) (mandatory) (1-byte) |
| 108 | // |
| 109 | // Administrative State |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 110 | // This attribute locks (1) and unlocks (0) the functions performed by this ME. Administrative |
| 111 | // 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] | 112 | // |
| 113 | // Operational State |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 114 | // This attribute indicates whether the ME is capable of performing its function. Valid values are |
| 115 | // enabled (0) and disabled (1). (R) (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 116 | // |
| 117 | // Framing |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 118 | // 6 Basic framing with CRC-4: clause 2.3.3 of [ITU-T G.704] |
| 119 | // |
| 120 | // 7 Basic framing with TS16 multiframe |
| 121 | // |
| 122 | // 8 Basic framing with CRC-4 and TS16 multiframe |
| 123 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 124 | // Upon ME instantiation, the ONU sets this attribute to a value that reflects the vendor's |
| 125 | // default. (R,-W) (optional) (1-byte) |
| 126 | // |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 127 | // This attribute specifies the framing structure. |
| 128 | // |
| 129 | // These code points are for use with DS1 services. Code point 2 may also be used for an unframed |
| 130 | // E1 service. |
| 131 | // |
| 132 | // 0 Extended superframe |
| 133 | // |
| 134 | // 1 Superframe |
| 135 | // |
| 136 | // 2 Unframed |
| 137 | // |
| 138 | // 3 ITUT-G.704 |
| 139 | // |
| 140 | // NOTE - [ITUT G.704] describes both SF and ESF framing for DS1 signals. This code point is |
| 141 | // retained for backward compatibility, but its meaning is undefined. |
| 142 | // |
| 143 | // 4 JT-G.704 |
| 144 | // |
| 145 | // The following code points are for use with E1 services. |
| 146 | // |
| 147 | // 5 Basic framing: clause 2.3.2 of [ITU-T G.704] |
| 148 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 149 | // Encoding |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 150 | // This attribute specifies the line coding scheme. Valid values are as follows. |
| 151 | // |
| 152 | // 0 B8ZS |
| 153 | // |
| 154 | // 1 AMI |
| 155 | // |
| 156 | // 2 HDB3 |
| 157 | // |
| 158 | // 3 B3ZS |
| 159 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 160 | // Upon ME instantiation, the ONU sets this attribute to 0. (R,-W) (mandatory for DS1 and DS3 |
| 161 | // interfaces) (1-byte) |
| 162 | // |
| 163 | // Line Length |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 164 | // This attribute specifies the length of the twisted pair cable from a DS1 physical UNI to the |
| 165 | // DSX-1 cross-connect point or the length of coaxial cable from a DS3 physical UNI to the DSX-3 |
| 166 | // cross-connect point. Valid values are given in Table 9.8.1-1. Upon ME instantiation for a DS1 |
| 167 | // interface, the ONU assigns the value 0 for non-power feed type DS1 and the value 6 for power |
| 168 | // feed type DS1. Upon ME instantiation for a DS3 interface, the ONU sets this attribute to 0x0F. |
| 169 | // (R,-W) (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 170 | // |
| 171 | // Ds1 Mode |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 172 | // This attribute specifies the mode of a DS1. Valid values are as follows. |
| 173 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 174 | // In the event of conflicting values between this attribute and the (also optional) line length |
| 175 | // attribute, the line length attribute is taken to be valid. This permits the separation of line |
| 176 | // build-out (LBO) and power settings from smart jack and FDL behaviour. Upon ME instantiation, the |
| 177 | // ONU sets this attribute to 0. (R,-W) (optional) (1-byte) |
| 178 | // |
| 179 | // Arc |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 180 | // See clause A.1.4.3. (R,-W) (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 181 | // |
| 182 | // Arc Interval |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 183 | // See clause A.1.4.3. (R,-W) (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 184 | // |
| 185 | // Line Type |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 186 | // This attribute specifies the line type used in a DS3 or E3 application or when the sensed type |
| 187 | // of the PPTP is configurable. Valid values are as follows. |
| 188 | // |
| 189 | // 0 Other |
| 190 | // |
| 191 | // 1 ds3 m23 |
| 192 | // |
| 193 | // 2 ds3 syntran |
| 194 | // |
| 195 | // 3 ds3 Cbit parity |
| 196 | // |
| 197 | // 4 ds3 clear channel |
| 198 | // |
| 199 | // 5 e3 framed |
| 200 | // |
| 201 | // 6 e3 plcp |
| 202 | // |
| 203 | // 7 DS1 |
| 204 | // |
| 205 | // 8 E1 |
| 206 | // |
| 207 | // 9 J1 |
| 208 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 209 | // (R,-W) (mandatory for DS3, E3 and multi-configuration interfaces, not applicable to other |
| 210 | // interfaces) (1-byte) |
| 211 | // |
| 212 | type PhysicalPathTerminationPointCesUni struct { |
| 213 | ManagedEntityDefinition |
| 214 | Attributes AttributeValueMap |
| 215 | } |
| 216 | |
| 217 | func init() { |
| 218 | physicalpathterminationpointcesuniBME = &ManagedEntityDefinition{ |
| 219 | Name: "PhysicalPathTerminationPointCesUni", |
| 220 | ClassID: 12, |
| 221 | MessageTypes: mapset.NewSetWith( |
| 222 | Get, |
| 223 | Set, |
| 224 | ), |
| 225 | AllowedAttributeMask: 0xfff0, |
| 226 | AttributeDefinitions: AttributeDefinitionMap{ |
| 227 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 228 | 1: ByteField("ExpectedType", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1), |
| 229 | 2: ByteField("SensedType", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, false, false, 2), |
| 230 | 3: ByteField("CesLoopbackConfiguration", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), true, false, false, 3), |
| 231 | 4: ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4), |
| 232 | 5: ByteField("OperationalState", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), true, true, false, 5), |
| 233 | 6: ByteField("Framing", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, true, false, 6), |
| 234 | 7: ByteField("Encoding", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7), |
| 235 | 8: ByteField("LineLength", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8), |
| 236 | 9: ByteField("Ds1Mode", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9), |
| 237 | 10: ByteField("Arc", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), true, true, false, 10), |
| 238 | 11: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11), |
| 239 | 12: ByteField("LineType", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, false, false, 12), |
| 240 | }, |
| 241 | Access: CreatedByOnu, |
| 242 | Support: UnknownSupport, |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 243 | Alarms: AlarmMap{ |
| 244 | 0: "TF", |
| 245 | 1: "LOS", |
| 246 | 2: "LOF", |
| 247 | 3: "OOF", |
| 248 | 4: "RAI", |
| 249 | 5: "1.5 M BAIS", |
| 250 | 6: "R-INH", |
| 251 | 7: "6M REC", |
| 252 | 8: "6M SEND", |
| 253 | 9: "6M ERR", |
| 254 | 10: "6M BERR", |
| 255 | 11: "34M REC", |
| 256 | 12: "34M AIS", |
| 257 | 13: "2M REC", |
| 258 | 14: "2M AIS", |
| 259 | 15: "1.5M REC", |
| 260 | 16: "1.5 AIS", |
| 261 | 17: "INFO0", |
| 262 | 18: "45M RDI", |
| 263 | 19: "45M AIS", |
| 264 | 20: "AIS-CI", |
| 265 | 21: "DS1 idle", |
| 266 | 22: "RAI-CI", |
| 267 | }, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 268 | } |
| 269 | } |
| 270 | |
| 271 | // NewPhysicalPathTerminationPointCesUni (class ID 12) creates the basic |
| 272 | // Managed Entity definition that is used to validate an ME of this type that |
| 273 | // is received from or transmitted to the OMCC. |
| 274 | func NewPhysicalPathTerminationPointCesUni(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 275 | return NewManagedEntity(*physicalpathterminationpointcesuniBME, params...) |
| 276 | } |