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 | */ |
David K. Bainbridge | adf422d | 2021-04-09 16:06:41 +0000 | [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 | // XdslLineInventoryAndStatusDataPart2ClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity xDSL line inventory and status data part 2 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 30 | const XdslLineInventoryAndStatusDataPart2ClassID = ClassID(101) // 0x0065 |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var xdsllineinventoryandstatusdatapart2BME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 34 | // XdslLineInventoryAndStatusDataPart2 (Class ID: #101 / 0x0065) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // This ME contains part 2 of the line inventory and status data for an xDSL UNI. The ONU |
| 36 | // automatically creates or deletes an instance of this ME upon the creation or deletion of a PPTP |
| 37 | // xDSL UNI part 1. |
| 38 | // |
| 39 | // NOTE 1 - [ITU-T G.997.1] specifies that bit rate attributes have granularity of 1000-bit/s. If |
| 40 | // ITUT-G.997.1 compliance is required, the ONU should only report values with this granularity. |
| 41 | // |
| 42 | // Relationships |
| 43 | // An instance of this ME is associated with an xDSL UNI. |
| 44 | // |
| 45 | // Attributes |
| 46 | // Managed Entity Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 47 | // This attribute uniquely identifies each instance of this ME. Through an identical ID, this ME is |
| 48 | // implicitly linked to an instance of the PPTP xDSL UNI part 1. (R) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 49 | // |
| 50 | // Xdsl Transmission System |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 51 | // This parameter defines the transmission system in use. It is a bit map, defined in Table |
| 52 | // 9.7.12-1. (R) (mandatory) (7-bytes) |
| 53 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 54 | // NOTE 2 - This attribute is only 7-bytes long. An eighth byte identifying VDSL2 capabilities in |
| 55 | // use is defined in the VDSL2 line inventory and status data part 1 ME. |
| 56 | // |
| 57 | // Line Power Management State |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 58 | // The line has four possible power management states. |
| 59 | // |
| 60 | // 0 L0: Synchronized - This line state occurs when the line has full transmission (i.e., |
| 61 | // showtime). |
| 62 | // |
| 63 | // 1 L1: Power down data transmission - This line state occurs when there is transmission on the |
| 64 | // line, but the net data rate is reduced (e.g., only for OAM and higher layer connection and |
| 65 | // session control). This state applies to [ITU-T G.992.2] only. |
| 66 | // |
| 67 | // 2 L2: Power down data transmission - This line state occurs when there is transmission on the |
| 68 | // line, but the net data rate is reduced (e.g., only for OAM and higher layer connection and |
| 69 | // session control). This state applies to [ITU-T G.992.3] and [ITUT-G.992.4] only. |
| 70 | // |
| 71 | // 3 L3: No power - This line state occurs when no power is transmitted on the line at all. |
| 72 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 73 | // (R) (mandatory) (1-byte) |
| 74 | // |
| 75 | // Downstream Line Attenuation |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 76 | // The LATNds attribute is the squared magnitude of the channel characteristics function H(f) |
| 77 | // averaged over this band, and measured during loop diagnostic mode and initialization. The exact |
| 78 | // definition is included in the relevant xDSL Recommendation. The attribute value ranges from 0 |
| 79 | // (0.0-dB) to 1270 (127.0-dB) dB. The special value 0xFFFF indicates that line attenuation is out |
| 80 | // of range. (R) (mandatory) (2-bytes) |
| 81 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 82 | // NOTE 3 - [ITU-T G.993.2] specifies a per-band array to represent this attribute. The array is |
| 83 | // defined in the VDSL2 line inventory and status data part 3 ME. In an ITU-T G.993.2 context, the |
| 84 | // downstream line attenuation attribute should be set to 0 here, and populated in the VDSL2 line |
| 85 | // inventory and status data part 3 ME instead. |
| 86 | // |
| 87 | // Upstream Line Attenuation |
| 88 | // NOTE 4 - [ITU-T G.993.2] specifies a per-band array to represent this attribute. The array is |
| 89 | // defined in the VDSL2 line inventory and status data part 3 ME. In an ITU-T G.993.2 context, the |
| 90 | // upstream line attenuation attribute should be set to 0 here, and populated in the VDSL2 line |
| 91 | // inventory and status data part 3 ME instead. |
| 92 | // |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 93 | // The LATNus attribute is the squared magnitude of the channel characteristics function H(f) |
| 94 | // averaged over this band, and measured during loop diagnostic mode and initialization. The exact |
| 95 | // definition is included in the relevant xDSL Recommendation. The attribute value ranges from 0 |
| 96 | // (0.0-dB) to 1270 (127.0-dB). The special value 0xFFFF indicates that line attenuation is out of |
| 97 | // range. (R) (mandatory) (2-bytes) |
| 98 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 99 | // Downstream Signal Attenuation |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 100 | // The SATNds attribute is the measured difference in the total power transmitted in this band by |
| 101 | // the xTUC and the total power received in this band by the xTUR during loop diagnostic mode, |
| 102 | // initialization and showtime. The exact definition is included in the relevant xDSL |
| 103 | // Recommendation. The attribute value ranges from 0 (0.0-dB) to 1270 (127.0-dB). The special value |
| 104 | // 0xFFFF indicates that signal attenuation is out of range. (R) (mandatory) (2-bytes) |
| 105 | // |
| 106 | // NOTE 5 - During showtime, only a subset of the subcarriers may be transmitted by the xTU-C, as |
| 107 | // compared to loop diagnostic mode and initialization. Therefore, the downstream signal |
| 108 | // attenuation value during showtime may be significantly lower than the downstream signal |
| 109 | // attenuation value during loop diagnostic mode and initialization. |
| 110 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 111 | // NOTE 6 - [ITU-T G.993.2] specifies a per-band array to represent this attribute. The array is |
| 112 | // defined in the VDSL2 line inventory and status data part 3 ME. In an ITU-T G.993.2 context, the |
| 113 | // downstream signal attenuation attribute should be set to 0 here, and populated in the VDSL2 line |
| 114 | // inventory and status data part 3 ME instead. |
| 115 | // |
| 116 | // Upstream Signal Attenuation |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 117 | // The SATNus attribute is the measured difference in decibels in the total power transmitted in |
| 118 | // this band by the xTUR and the total power received in this band by the xTUC during loop |
| 119 | // diagnostic mode, initialization and showtime. The exact definition is included in the relevant |
| 120 | // xDSL Recommendation. The attribute value ranges from 0 (0.0 dB) to 1270 (127.0-dB). The special |
| 121 | // value 0xFFFF indicates that signal attenuation is out of range. (R) (mandatory) (2-bytes) |
| 122 | // |
| 123 | // NOTE 7 - During showtime, only a subset of the subcarriers may be transmitted by the xTU-R, as |
| 124 | // compared to loop diagnostic mode and initialization. Therefore, the upstream signal attenuation |
| 125 | // value during showtime may be significantly lower than the upstream signal attenuation value |
| 126 | // during loop diagnostic mode and initialization. |
| 127 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 128 | // NOTE 8 - [ITU-T G.993.2] specifies a per-band array to represent this attribute. The array is |
| 129 | // defined in the VDSL2 line inventory and status data part 3 ME. In an ITU-T G.993.2 context, the |
| 130 | // upstream signal attenuation attribute should be set to 0 here, and populated in the VDSL2 line |
| 131 | // inventory and status data part 3 ME instead. |
| 132 | // |
| 133 | // Downstream Snr Ratio Margin |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 134 | // The downstream SNR margin SNRMds is the maximum increase of noise power received at the xTUR, |
| 135 | // such that the BER requirements can still be met for all downstream bearer channels. The |
| 136 | // attribute value ranges from 0 (-64.0 dB) to 1270 (+63.0-dB). The special value 0xFFFF indicates |
| 137 | // that the attribute is out of range (R) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 138 | // |
| 139 | // Upstream Snr Margin |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 140 | // The upstream SNR margin SNRMus is the maximum increase of noise power received at the xTUC, such |
| 141 | // that the BER requirements can still be met for all upstream bearer channels. The attribute value |
| 142 | // ranges from 0 (-64.0 dB) to 1270 (+63.0 dB). The special value 0xFFFF indicates that the |
| 143 | // attribute is out of range. (R) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 144 | // |
| 145 | // Downstream Maximum Attainable Data Rate |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 146 | // The ATTNDRds attribute indicates the maximum downstream net data rate currently attainable. The |
| 147 | // rate is coded in bits per second. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 148 | // |
| 149 | // Upstream Maximum Attainable Data Rate |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 150 | // The ATTNDRus attribute indicates the maximum upstream net data rate currently attainable. The |
| 151 | // rate is coded in bits per second. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 152 | // |
| 153 | // Downstream Actual Power Spectrum Density |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 154 | // The ACTPSDds attribute is the average downstream transmit power spectrum density over the |
| 155 | // subcarriers in use (subcarriers to which downstream user data are allocated) delivered by the |
| 156 | // xTUC at the UC reference point, at the instant of measurement. The attribute value ranges from 0 |
| 157 | // (-90.0-dBm/Hz) to 900 (0.0-dBm/Hz). The special value (0xFFFF) indicates that the parameter is |
| 158 | // out of range. (R) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 159 | // |
| 160 | // Upstream Actual Power Spectrum Density |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 161 | // The ACTPSDus attribute is the average upstream transmit power spectrum density over the |
| 162 | // subcarriers in use (subcarriers to which upstream user data are allocated) delivered by the xTUR |
| 163 | // at the UR reference point, at the instant of measurement. The attribute value ranges from 0 |
| 164 | // (-90.0-dBm/Hz) to 900 (0.0-dBm/Hz). The special value 0xFFFF indicates that the attribute is out |
| 165 | // of range. (R) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 166 | // |
| 167 | // Downstream Actual Aggregate Transmit Power |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 168 | // The ACTATPds attribute is the total amount of transmit power delivered by the xTUC at the UC |
| 169 | // reference point, at the instant of measurement. The attribute value ranges from 0 (-31.0-dBm) to |
| 170 | // 620 (+31.0-dBm). The special value (0xFFFF) indicates that the parameter is out of range. (R) |
| 171 | // (mandatory) (2-bytes) |
| 172 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 173 | // NOTE 9 - The downstream nominal aggregate transmit power may be taken as a best estimate of the |
| 174 | // parameter. |
| 175 | // |
| 176 | // Upstream Actual Aggregate Transmit Power |
| 177 | // NOTE 10 - The upstream nominal aggregate transmit power may be taken as a best estimate of the |
| 178 | // parameter. |
| 179 | // |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 180 | // The ACTATPus attribute is the total amount of transmit power delivered by the xTUR at the UR |
| 181 | // reference point, at the instant of measurement. The attribute value ranges from 0 (-31.0-dBm) to |
| 182 | // 620 (+31.0-dBm). The special value (0xFFFF) indicates that the parameter is out of range. (R) |
| 183 | // (mandatory) (2-bytes) |
| 184 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 185 | // Initialization _ Last State Transmitted Downstream |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 186 | // Initialization - last state transmitted downstream: This attribute represents the last |
| 187 | // successful transmitted initialization state in the downstream direction in the last full |
| 188 | // initialization performed on the line. Initialization states are defined in the individual xDSL |
| 189 | // Recommendations and are counted from 0 (if [ITUT-G.994.1] is used) or 1 (if [ITUT-G.994.1] is |
| 190 | // not used) up to showtime. This parameter must be interpreted along with the xDSL transmission |
| 191 | // system capabilities. |
| 192 | // |
| 193 | // This parameter is available only when, after a failed full initialization, line diagnostic |
| 194 | // procedures are activated on the line. Line diagnostic procedures can be activated by the |
| 195 | // operator of the system (through the loop diagnostics mode forced attribute of the xDSL line |
| 196 | // configuration profile part 3) or autonomously by the xTU-C or xTU-R. |
| 197 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 198 | // (R) (mandatory) (1-byte) |
| 199 | // |
| 200 | // Initialization _ Last State Transmitted Upstream |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 201 | // Initialization - last state transmitted upstream: This attribute represents the last successful |
| 202 | // transmitted initialization state in the upstream direction in the last full initialization |
| 203 | // performed on the line. Initialization states are defined in the individual xDSL Recommendations |
| 204 | // and are counted from 0 (if [ITUT-G.994.1] is used) or 1 (if [ITUT-G.994.1] is not used) up to |
| 205 | // showtime. This parameter must be interpreted along with the xDSL transmission system |
| 206 | // capabilities. |
| 207 | // |
| 208 | // This parameter is available only when, after a failed full initialization, line diagnostic |
| 209 | // procedures are activated on the line. Line diagnostic procedures can be activated by the |
| 210 | // operator of the system (through the loop diagnostics mode forced attribute of the xDSL line |
| 211 | // configuration profile part 3) or autonomously by the xTU-C or xTU-R. |
| 212 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 213 | // (R) (mandatory) (1-byte) |
| 214 | // |
| 215 | type XdslLineInventoryAndStatusDataPart2 struct { |
| 216 | ManagedEntityDefinition |
| 217 | Attributes AttributeValueMap |
| 218 | } |
| 219 | |
| 220 | func init() { |
| 221 | xdsllineinventoryandstatusdatapart2BME = &ManagedEntityDefinition{ |
| 222 | Name: "XdslLineInventoryAndStatusDataPart2", |
| 223 | ClassID: 101, |
| 224 | MessageTypes: mapset.NewSetWith( |
| 225 | Get, |
| 226 | ), |
| 227 | AllowedAttributeMask: 0xffff, |
| 228 | AttributeDefinitions: AttributeDefinitionMap{ |
| 229 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 230 | 1: MultiByteField("XdslTransmissionSystem", OctetsAttributeType, 0x8000, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 1), |
| 231 | 2: ByteField("LinePowerManagementState", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2), |
| 232 | 3: Uint16Field("DownstreamLineAttenuation", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3), |
| 233 | 4: Uint16Field("UpstreamLineAttenuation", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4), |
| 234 | 5: Uint16Field("DownstreamSignalAttenuation", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5), |
| 235 | 6: Uint16Field("UpstreamSignalAttenuation", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6), |
| 236 | 7: Uint16Field("DownstreamSnrRatioMargin", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7), |
| 237 | 8: Uint16Field("UpstreamSnrMargin", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8), |
| 238 | 9: Uint32Field("DownstreamMaximumAttainableDataRate", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9), |
| 239 | 10: Uint32Field("UpstreamMaximumAttainableDataRate", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10), |
| 240 | 11: Uint16Field("DownstreamActualPowerSpectrumDensity", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11), |
| 241 | 12: Uint16Field("UpstreamActualPowerSpectrumDensity", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12), |
| 242 | 13: Uint16Field("DownstreamActualAggregateTransmitPower", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13), |
| 243 | 14: Uint16Field("UpstreamActualAggregateTransmitPower", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14), |
| 244 | 15: ByteField("InitializationLastStateTransmittedDownstream", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15), |
| 245 | 16: ByteField("InitializationLastStateTransmittedUpstream", UnsignedIntegerAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16), |
| 246 | }, |
| 247 | Access: CreatedByOnu, |
| 248 | Support: UnknownSupport, |
| 249 | } |
| 250 | } |
| 251 | |
| 252 | // NewXdslLineInventoryAndStatusDataPart2 (class ID 101) creates the basic |
| 253 | // Managed Entity definition that is used to validate an ME of this type that |
| 254 | // is received from or transmitted to the OMCC. |
| 255 | func NewXdslLineInventoryAndStatusDataPart2(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 256 | return NewManagedEntity(*xdsllineinventoryandstatusdatapart2BME, params...) |
| 257 | } |