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 | */ |
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 | // XdslChannelDownstreamStatusDataClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity xDSL channel downstream status data |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const XdslChannelDownstreamStatusDataClassID = ClassID(102) // 0x0066 |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var xdslchanneldownstreamstatusdataBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // XdslChannelDownstreamStatusData (Class ID: #102 / 0x0066) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // This ME contains downstream channel status data for an xDSL UNI. The ONU automatically creates |
| 36 | // or deletes instances of this ME upon the creation or deletion of a PPTP xDSL UNI part 1. |
| 37 | // |
| 38 | // NOTE - [ITU-T G.997.1] specifies that bit rate attributes have a granularity of 1000-bit/s. If |
| 39 | // ITU-T G.997.1 compliance is required, the ONU should only report values with this granularity. |
| 40 | // |
| 41 | // Relationships |
| 42 | // One or more instances of this ME are associated with an instance of an xDSL UNI. |
| 43 | // |
| 44 | // Attributes |
| 45 | // Managed Entity Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 46 | // This attribute uniquely identifies each instance of this ME. The two MSBs of the first byte are |
| 47 | // the bearer channel ID. Excluding the first 2-bits of the first byte, the remaining part of the |
| 48 | // ME ID is identical to that of this ME's parent PPTP xDSL UNI part 1. (R) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 49 | // |
| 50 | // Actual Interleaving Delay |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 51 | // This attribute is the actual one-way interleaving delay introduced by the PMS-TC between the |
| 52 | // alpha and beta reference points, excluding delay in the L1 and L2 states. In the L1 and L2 |
| 53 | // states, the attribute contains the interleaving delay in the previous L0 state. For ADSL, this |
| 54 | // attribute is derived from the S and D attributes as cap(S*D)/4 ms, where S is the number of |
| 55 | // symbols per codeword, D is the interleaving depth and cap() denotes rounding to the next higher |
| 56 | // integer. For [ITU-T G.993.2], this attribute is computed according to the formula in clause 9.7 |
| 57 | // of [ITUT-G.993.2]. The actual interleaving delay is coded in milliseconds, rounded to the |
| 58 | // nearest millisecond. (R) (mandatory) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 59 | // |
| 60 | // Actual Data Rate |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 61 | // This parameter reports the actual net data rate of the bearer channel, excluding the rate in the |
| 62 | // L1 and L2 states. In the L1 or L2 state, the parameter contains the net data rate in the |
| 63 | // previous L0 state. The data rate is coded in bits per second. (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 64 | // |
| 65 | // Previous Data Rate |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 66 | // This parameter reports the previous net data rate of the bearer channel just before the latest |
| 67 | // rate change event occurred, excluding transitions between the L0 state and the L1 or L2 states. |
| 68 | // A rate change can occur at a power management state transition, e.g., at full or short |
| 69 | // initialization, fast retrain or power down, or at a dynamic rate adaptation. The rate is coded |
| 70 | // in bits per second (R) (mandatory) (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 71 | // |
| 72 | // Actual Impulse Noise Protection |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 73 | // The ACTINP attribute reports the actual INP on the bearer channel in the L0 state. In the L1 or |
| 74 | // L2 state, the attribute contains the INP in the previous L0 state. The value of this attribute |
| 75 | // is a number of DMT symbols, with a granularity of 0.1 symbols. Its range is from 0 (0.0 symbols) |
| 76 | // to 254 (25.4 symbols). The special value 255 indicates an ACTINP higher than 25.4. (R) (optional |
| 77 | // for [ITU-T G.992.1], mandatory for other xDSL Recommendations that support this attribute) |
| 78 | // (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 79 | // |
| 80 | // Actual Size Of Reed_Solomon Codeword |
| 81 | // Actual size of Reed-Solomon codeword: The NFEC attribute reports the actual Reed-Solomon |
| 82 | // codeword size used in the latency path in which the bearer channel is transported. The value is |
| 83 | // coded in bytes, and ranges from 0..255. (R) (mandatory for ITUT-G.993.2 VDSL2, optional for |
| 84 | // others) (1-byte) |
| 85 | // |
| 86 | // Actual Number Of Reed_Solomon Redundancy Bytes |
| 87 | // Actual number of Reed-Solomon redundancy bytes: The RFEC attribute reports the actual number of |
| 88 | // Reed-Solomon redundancy bytes per codeword used in the latency path in which the bearer channel |
| 89 | // is transported. The value is coded in bytes, and ranges from 0..16. The value 0 indicates no |
| 90 | // Reed-Solomon coding. (R) (mandatory for ITUT-G.993.2 VDSL2, optional for others) (1-byte) |
| 91 | // |
| 92 | // Actual Number Of Bits Per Symbol |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 93 | // The LSYMB attribute reports the actual number of bits per symbol assigned to the latency path in |
| 94 | // which the bearer channel is transported, excluding trellis overhead. The value is coded in bits, |
| 95 | // and ranges from 0..65535. (R) (mandatory for [TU-T G.993.2 VDSL2, optional for others) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 96 | // |
| 97 | // Actual Interleaving Depth |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 98 | // The INTLVDEPTH attribute reports the actual depth of the interleaver used in the latency path in |
| 99 | // which the bearer channel is transported. The value ranges from 1..4096 in steps of 1. The value |
| 100 | // 1 indicates no interleaving. (R) (mandatory for ITU-T G.993.2 VDSL2, optional for others) |
| 101 | // (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 102 | // |
| 103 | // Actual Interleaving Block Length |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 104 | // The INTLVBLOCK attribute reports the actual block length of the interleaver used in the latency |
| 105 | // path in which the bearer channel is transported. The value ranges from 4..255 in steps of 1. (R) |
| 106 | // (mandatory for ITU-T G.993.2 VDSL2, undefined for others) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 107 | // |
| 108 | // Actual Latency Path |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 109 | // The LPATH attribute reports the index of the actual latency path in which the bearer channel is |
| 110 | // transported. Valid values are 0..3. In [ITUT-G.992.1], the fast path is mapped to latency index |
| 111 | // 0; the interleaved path to index 1. (R) (mandatory for ITU-T G.993.2 VDSL2, optional for others) |
| 112 | // (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 113 | // |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 114 | // Actual Impulse Noise Protection Against Repetitive Electrical Impulse Noise Actinp_Rein |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 115 | // Actual impulse noise protection against repetitive electrical impulse noise (ACTINP_REIN): If |
| 116 | // retransmission is used in a given transmit direction, this parameter reports the actual INP |
| 117 | // against REIN on the bearer channel. The INP of this attribute is equal to the integer value |
| 118 | // multiplied by 0.1 symbols. Valid values and usage are given in clause 7.5.2.9 of [ITU-T G.997.1] |
| 119 | // (R) (optional) (1-byte) |
| 120 | // |
| 121 | type XdslChannelDownstreamStatusData struct { |
| 122 | ManagedEntityDefinition |
| 123 | Attributes AttributeValueMap |
| 124 | } |
| 125 | |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame] | 126 | // Attribute name constants |
| 127 | |
| 128 | const XdslChannelDownstreamStatusData_ActualInterleavingDelay = "ActualInterleavingDelay" |
| 129 | const XdslChannelDownstreamStatusData_ActualDataRate = "ActualDataRate" |
| 130 | const XdslChannelDownstreamStatusData_PreviousDataRate = "PreviousDataRate" |
| 131 | const XdslChannelDownstreamStatusData_ActualImpulseNoiseProtection = "ActualImpulseNoiseProtection" |
| 132 | const XdslChannelDownstreamStatusData_ActualSizeOfReedSolomonCodeword = "ActualSizeOfReedSolomonCodeword" |
| 133 | const XdslChannelDownstreamStatusData_ActualNumberOfReedSolomonRedundancyBytes = "ActualNumberOfReedSolomonRedundancyBytes" |
| 134 | const XdslChannelDownstreamStatusData_ActualNumberOfBitsPerSymbol = "ActualNumberOfBitsPerSymbol" |
| 135 | const XdslChannelDownstreamStatusData_ActualInterleavingDepth = "ActualInterleavingDepth" |
| 136 | const XdslChannelDownstreamStatusData_ActualInterleavingBlockLength = "ActualInterleavingBlockLength" |
| 137 | const XdslChannelDownstreamStatusData_ActualLatencyPath = "ActualLatencyPath" |
| 138 | const XdslChannelDownstreamStatusData_ActualImpulseNoiseProtectionAgainstRepetitiveElectricalImpulseNoiseActinpRein = "ActualImpulseNoiseProtectionAgainstRepetitiveElectricalImpulseNoiseActinpRein" |
| 139 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 140 | func init() { |
| 141 | xdslchanneldownstreamstatusdataBME = &ManagedEntityDefinition{ |
| 142 | Name: "XdslChannelDownstreamStatusData", |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame] | 143 | ClassID: XdslChannelDownstreamStatusDataClassID, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 144 | MessageTypes: mapset.NewSetWith( |
| 145 | Get, |
| 146 | ), |
| 147 | AllowedAttributeMask: 0xffe0, |
| 148 | AttributeDefinitions: AttributeDefinitionMap{ |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame] | 149 | 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 150 | 1: ByteField(XdslChannelDownstreamStatusData_ActualInterleavingDelay, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1), |
| 151 | 2: Uint32Field(XdslChannelDownstreamStatusData_ActualDataRate, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2), |
| 152 | 3: Uint32Field(XdslChannelDownstreamStatusData_PreviousDataRate, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3), |
| 153 | 4: ByteField(XdslChannelDownstreamStatusData_ActualImpulseNoiseProtection, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4), |
| 154 | 5: ByteField(XdslChannelDownstreamStatusData_ActualSizeOfReedSolomonCodeword, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5), |
| 155 | 6: ByteField(XdslChannelDownstreamStatusData_ActualNumberOfReedSolomonRedundancyBytes, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6), |
| 156 | 7: Uint16Field(XdslChannelDownstreamStatusData_ActualNumberOfBitsPerSymbol, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7), |
| 157 | 8: Uint16Field(XdslChannelDownstreamStatusData_ActualInterleavingDepth, UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8), |
| 158 | 9: ByteField(XdslChannelDownstreamStatusData_ActualInterleavingBlockLength, UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9), |
| 159 | 10: ByteField(XdslChannelDownstreamStatusData_ActualLatencyPath, UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10), |
| 160 | 11: ByteField(XdslChannelDownstreamStatusData_ActualImpulseNoiseProtectionAgainstRepetitiveElectricalImpulseNoiseActinpRein, UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, true, false, 11), |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 161 | }, |
| 162 | Access: CreatedByOnu, |
| 163 | Support: UnknownSupport, |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | // NewXdslChannelDownstreamStatusData (class ID 102) creates the basic |
| 168 | // Managed Entity definition that is used to validate an ME of this type that |
| 169 | // is received from or transmitted to the OMCC. |
| 170 | func NewXdslChannelDownstreamStatusData(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 171 | return NewManagedEntity(*xdslchanneldownstreamstatusdataBME, params...) |
| 172 | } |