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 | // PhysicalPathTerminationPointReUniClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Physical path termination point RE UNI |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const PhysicalPathTerminationPointReUniClassID = ClassID(314) // 0x013a |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var physicalpathterminationpointreuniBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // PhysicalPathTerminationPointReUni (Class ID: #314 / 0x013a) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // This ME represents an S'/R' interface in a mid-span PON RE that supports OEO regeneration in at |
| 36 | // least one direction, where physical paths terminate and physical path level functions are |
| 37 | // performed (transmit or receive). |
| 38 | // |
| 39 | // Such an RE automatically creates an instance of this ME for each S'/R' interface port as |
| 40 | // follows. |
| 41 | // |
| 42 | // o When the RE has mid-span PON RE UNI interface ports built into its factory configuration. |
| 43 | // |
| 44 | // o When a cardholder is provisioned to expect a circuit pack of the mid-span PON RE UNI type. |
| 45 | // |
| 46 | // o When a cardholder provisioned for plug-and-play is equipped with a circuit pack of the midspan |
| 47 | // PON RE UNI type. Note that the installation of a plug-and-play card may indicate the presence of |
| 48 | // a mid-span PON RE UNI port via equipment ID as well as its type attribute, and indeed may cause |
| 49 | // the management ONU to instantiate a port-mapping package to specify the ports precisely. |
| 50 | // |
| 51 | // The management ONU automatically deletes instances of this ME when a cardholder is neither |
| 52 | // provisioned to expect a mid-span PON RE UNI circuit pack, nor is it equipped with a mid-span PON |
| 53 | // RE UNI circuit pack. |
| 54 | // |
| 55 | // As illustrated in Figure 8.2.10-3, a PPTP RE UNI may share the physical port with an RE upstream |
| 56 | // amplifier. The ONU declares a shared configuration through the port-mapping package combined |
| 57 | // port table, whose structure defines one ME as the master. It is recommended that the PPTP RE UNI |
| 58 | // be the master, with the RE upstream amplifier as a secondary ME. |
| 59 | // |
| 60 | // The administrative state, operational state and ARC attributes of the master ME override similar |
| 61 | // attributes in secondary MEs associated with the same port. In the secondary ME, these attributes |
| 62 | // are present, but cause no action when written and have undefined values when read. The RE |
| 63 | // upstream amplifier should use its provisionable upstream alarm thresholds and should declare |
| 64 | // upstream alarms as necessary; other isomorphic alarms should be declared by the PPTP RE UNI. The |
| 65 | // test action should be addressed to the master ME. |
| 66 | // |
| 67 | // Relationships |
| 68 | // An instance of this ME is associated with each instance of a mid-span PON RE S'/R' physical |
| 69 | // interface of an RE that includes OEO regeneration in either direction, and it may also be |
| 70 | // associated with an RE upstream amplifier. |
| 71 | // |
| 72 | // Attributes |
| 73 | // Managed Entity Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 74 | // This attribute uniquely identifies each instance of this ME. This 2-byte number indicates the |
| 75 | // physical position of the UNI. The first byte is the slot ID (defined in clause 9.1.5). The |
| 76 | // second byte is the port ID, with the range 1..255. (R) (mandatory) (2-bytes) |
| 77 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 78 | // NOTE 1 - This ME ID may be identical to that of an RE upstream amplifier if it shares the same |
| 79 | // physical slot and port. |
| 80 | // |
| 81 | // Administrative State |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 82 | // This attribute locks (1) and unlocks (0) the functions performed by this ME. Administrative |
| 83 | // state is further described in clause A.1.6. (R,-W) (mandatory) (1-byte) |
| 84 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 85 | // NOTE 2 - Administrative lock of a PPTP RE UNI results in loss of signal to any downstream ONUs. |
| 86 | // |
| 87 | // Operational State |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 88 | // This attribute indicates whether the ME is capable of performing its function. Valid values are |
| 89 | // enabled (0) and disabled (1). (R) (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 90 | // |
| 91 | // Arc |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 92 | // See clause A.1.4.3. (R,-W) (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 93 | // |
| 94 | // Arc Interval |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 95 | // See clause A.1.4.3. (R,-W) (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 96 | // |
| 97 | // Re Ani_G Pointer |
| 98 | // RE ANI-G pointer: This attribute points to an RE ANI-G instance. (R,-W) (mandatory) (2-bytes) |
| 99 | // |
| 100 | // Total Optical Receive Signal Level Table |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 101 | // This table attribute reports a series of measurements of time averaged received upstream optical |
| 102 | // signal power. The measurement circuit should have a temporal response similar to a simple 1-pole |
| 103 | // low pass filter, with an effective time constant of the order of a GTC frame time. Each table |
| 104 | // entry has a 2-byte frame counter field (most significant end), and a 2-byte power measurement |
| 105 | // field. The frame counter field contains the least significant 16-bits of the superframe counter |
| 106 | // received closest to the time of the measurement. The power measurement field is a 2s complement |
| 107 | // integer referred to 1-mW (i.e., dBm), with 0.002-dB granularity. (Coding -32768 to +32767, where |
| 108 | // 0x00 = 0-dBm, 0x03e8 = +2-dBm, etc.) The RE equipment should add entries to this table as |
| 109 | // frequently as is reasonable. The RE should clear the table once it is read by the OLT. (R) |
| 110 | // (optional) (4-* N-bytes, where N is the number of measurements present.) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 111 | // |
| 112 | // Per Burst Receive Signal Level Table |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 113 | // This table attribute reports the most recent measurement of received burst upstream optical |
| 114 | // signal power. Each table entry has a 2-byte ONU-ID field (most significant end), and a 2-byte |
| 115 | // power measurement field. The power measurement field is a 2s complement integer referred to 1-mW |
| 116 | // (i.e.,-dBm), with 0.002-dB granularity. (Coding -32768 to +32767, where 0x00 = 0-dBm, 0x03e8 = |
| 117 | // +2-dBm, etc.) (R) (optional) (4-* N-bytes, where N is the number of distinct ONUs connected to |
| 118 | // the S'/R' interface.) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 119 | // |
| 120 | // Lower Receive Optical Threshold |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 121 | // This attribute specifies the optical level that the RE uses to declare the burst mode low |
| 122 | // received optical power alarm. Valid values are -127-dBm (coded as 254) to 0-dBm (coded as 0) in |
| 123 | // 0.5-dB increments. The default value 0xFF selects the RE's internal policy. (R,-W) (optional) |
| 124 | // (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 125 | // |
| 126 | // Upper Receive Optical Threshold |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 127 | // This attribute specifies the optical level that the RE uses to declare the burst mode high |
| 128 | // optical power alarm. Valid values are -127-dBm (coded as 254) to 0-dBm (coded as 0) in 0.5-dB |
| 129 | // increments. The default value 0xFF selects the RE's internal policy. (R,-W) (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 130 | // |
| 131 | // Transmit Optical Level |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 132 | // This attribute reports the current measurement of the downstream mean optical launch power. Its |
| 133 | // value is a 2s complement integer referred to 1-mW (i.e., dBm), with 0.002-dB granularity. (R) |
| 134 | // (optional) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 135 | // |
| 136 | // Lower Transmit Power Threshold |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 137 | // This attribute specifies the downstream minimum mean optical launch power at the S'/R' interface |
| 138 | // that the RE uses to declare the low transmit optical power alarm. Its value is a 2s complement |
| 139 | // integer referred to 1-mW (i.e., dBm), with 0.5-dB granularity. The default value 0x7F selects |
| 140 | // the RE's internal policy. (R,-W) (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 141 | // |
| 142 | // Upper Transmit Power Threshold |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 143 | // This attribute specifies the downstream maximum mean optical launch power at the S'/R' interface |
| 144 | // that the RE uses to declare the high transmit optical power alarm. Its value is a 2s complement |
| 145 | // integer referred to 1-mW (i.e., dBm), with 0.5-dB granularity. The default value 0x7F selects |
| 146 | // the RE's internal policy. (R,-W) (optional) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 147 | // |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 148 | // Additional Preamble |
| 149 | // This attribute indicates the number of bytes of PLOu preamble that are unavoidably consumed |
| 150 | // while passing the RE. (R) (mandatory) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 151 | // |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 152 | // Additional Guard Time |
| 153 | // This attribute indicates the number of bytes of extra guard time that are needed to ensure |
| 154 | // correct operation with the RE. (R) (mandatory) (1-byte) |
| 155 | // |
| 156 | // Connected Onus Table |
| 157 | // s attribute is used to pass ONU ID information of the connected ONUs per RE UNI. The get, get |
| 158 | // next sequence must be used with this attribute since its size is unspecified. Upon ME |
| 159 | // instantiation, this attribute is an empty list. |
| 160 | // |
| 161 | // Each entry contains: |
| 162 | // |
| 163 | // - ONU ID (2-bytes) |
| 164 | // |
| 165 | // (R) (optional) (2N bytes, where N is the number of-ONUs) |
| 166 | // |
| 167 | // Clear Onu Table |
| 168 | // the attribute is used to notify RE to clear the entire Connected ONUs table by OLT. The OLT must |
| 169 | // insure that the ONU IDs have been retrieved before clearing the table, or loss of data may |
| 170 | // occur. |
| 171 | // |
| 172 | // When the value of the byte is set to 1, the RE clears the entire Connected ONUs table and resets |
| 173 | // the byte to 0. |
| 174 | // |
| 175 | // (W) (optional) (1 byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 176 | // |
| 177 | type PhysicalPathTerminationPointReUni struct { |
| 178 | ManagedEntityDefinition |
| 179 | Attributes AttributeValueMap |
| 180 | } |
| 181 | |
| 182 | func init() { |
| 183 | physicalpathterminationpointreuniBME = &ManagedEntityDefinition{ |
| 184 | Name: "PhysicalPathTerminationPointReUni", |
| 185 | ClassID: 314, |
| 186 | MessageTypes: mapset.NewSetWith( |
| 187 | Get, |
| 188 | GetNext, |
| 189 | Set, |
| 190 | ), |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 191 | AllowedAttributeMask: 0xffff, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 192 | AttributeDefinitions: AttributeDefinitionMap{ |
| 193 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 194 | 1: ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1), |
| 195 | 2: ByteField("OperationalState", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, true, false, 2), |
| 196 | 3: ByteField("Arc", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), true, true, false, 3), |
| 197 | 4: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4), |
| 198 | 5: Uint16Field("ReAniGPointer", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5), |
| 199 | 6: TableField("TotalOpticalReceiveSignalLevelTable", TableAttributeType, 0x0400, TableInfo{nil, 4}, mapset.NewSetWith(Read), false, true, false, 6), |
| 200 | 7: TableField("PerBurstReceiveSignalLevelTable", TableAttributeType, 0x0200, TableInfo{nil, 4}, mapset.NewSetWith(Read), false, true, false, 7), |
| 201 | 8: ByteField("LowerReceiveOpticalThreshold", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8), |
| 202 | 9: ByteField("UpperReceiveOpticalThreshold", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9), |
| 203 | 10: Uint16Field("TransmitOpticalLevel", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10), |
| 204 | 11: ByteField("LowerTransmitPowerThreshold", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11), |
| 205 | 12: ByteField("UpperTransmitPowerThreshold", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12), |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 206 | 13: ByteField("AdditionalPreamble", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13), |
| 207 | 14: ByteField("AdditionalGuardTime", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14), |
| 208 | 15: TableField("ConnectedOnusTable", TableAttributeType, 0x0002, TableInfo{nil, 2}, mapset.NewSetWith(Read), false, true, false, 15), |
| 209 | 16: TableField("ClearOnuTable", TableAttributeType, 0x0001, TableInfo{nil, 1}, mapset.NewSetWith(Write), false, true, false, 16), |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 210 | }, |
| 211 | Access: CreatedByOnu, |
| 212 | Support: UnknownSupport, |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 213 | Alarms: AlarmMap{ |
| 214 | 0: "Low received optical power", |
| 215 | 1: "High received optical power", |
| 216 | 2: "Low transmit optical power", |
| 217 | 3: "High transmit optical power", |
| 218 | 4: "High laser bias current", |
| 219 | 5: "S'/R' LOS", |
| 220 | }, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 221 | } |
| 222 | } |
| 223 | |
| 224 | // NewPhysicalPathTerminationPointReUni (class ID 314) creates the basic |
| 225 | // Managed Entity definition that is used to validate an ME of this type that |
| 226 | // is received from or transmitted to the OMCC. |
| 227 | func NewPhysicalPathTerminationPointReUni(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 228 | return NewManagedEntity(*physicalpathterminationpointreuniBME, params...) |
| 229 | } |