mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
| 3 | * Copyright 2020-present Open Networking Foundation |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 4 | * |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [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 |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 8 | * |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 10 | * |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [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 | */ |
| 17 | /* |
| 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 | // XdslChannelUpstreamStatusDataClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity xDSL channel upstream status data |
| 30 | const XdslChannelUpstreamStatusDataClassID = ClassID(103) // 0x0067 |
| 31 | |
| 32 | var xdslchannelupstreamstatusdataBME *ManagedEntityDefinition |
| 33 | |
| 34 | // XdslChannelUpstreamStatusData (Class ID: #103 / 0x0067) |
| 35 | // This ME contains upstream channel status data for an xDSL UNI. The ONU automatically creates or |
| 36 | // deletes instances of this ME upon the creation or deletion of a PPTP xDSL UNI part 1. |
| 37 | // |
| 38 | // Relationships |
| 39 | // One or more instances of this ME are associated with an instance of an xDSL UNI. |
| 40 | // |
| 41 | // Attributes |
| 42 | // Managed Entity Id |
| 43 | // This attribute uniquely identifies each instance of this ME. The two MSBs of the first byte are |
| 44 | // the bearer channel ID. Excluding the first 2-bits of the first byte, the remaining part of the |
| 45 | // ME ID is identical to that of this ME's parent PPTP xDSL UNI part 1. (R) (mandatory) (2-bytes) |
| 46 | // |
| 47 | // Actual Interleaving Delay |
| 48 | // This attribute is the actual one-way interleaving delay introduced by the PMS-TC between the |
| 49 | // alpha and beta reference points, excluding the L1 and L2 states. In the L1 and L2 states, this |
| 50 | // attribute contains the interleaving delay in the previous L0 state. For ADSL, this attribute is |
| 51 | // derived from the S and D attributes as cap(S*D)/4-ms, where S is the number of symbols per |
| 52 | // codeword, D is the interleaving depth and cap() denotes rounding to the next higher integer. For |
| 53 | // [ITU-T G.993.2], this attribute is computed according to the formula in clause 9.7 of [ITUT |
| 54 | // G.993.2]. The actual interleaving delay is coded in milliseconds, rounded to the nearest |
| 55 | // millisecond. (R) (mandatory) (1-byte) |
| 56 | // |
| 57 | // Actual Data Rate |
| 58 | // This parameter reports the actual net data rate of the bearer channel, excluding the L1 and L2 |
| 59 | // states. In the L1 or L2 state, the parameter contains the net data rate in the previous L0 |
| 60 | // state. The data rate is coded in bits per second. (R) (mandatory) (4-bytes) |
| 61 | // |
| 62 | // Previous Data Rate |
| 63 | // This parameter reports the previous net data rate of the bearer channel just before the latest |
| 64 | // rate change event occurred, excluding transitions between the L0 state and the L1 or L2 state. A |
| 65 | // rate change can occur at a power management state transition, e.g., at full or short |
| 66 | // initialization, fast retrain or power down, or at a dynamic rate adaptation. The rate is coded |
| 67 | // in bits per second. (R) (mandatory) (4-bytes) |
| 68 | // |
| 69 | // Actual Impulse Noise Protection |
| 70 | // The ACTINP attribute reports the actual INP on the bearer channel in the L0 state. In the L1 or |
| 71 | // L2 state, the attribute contains the INP in the previous L0 state. The value is coded in |
| 72 | // fractions of DMT symbols with a granularity of 0.1 symbols. The range is from 0 (0.0 symbols) to |
| 73 | // 254 (25.4 symbols). The special value 255 indicates an ACTINP higher than 25.4. (R) (mandatory |
| 74 | // for ITU-T G.993.2 VDSL2, optional for other xDSL Recommendations that support it) (1-byte) |
| 75 | // |
| 76 | // Impulse Noise Protection Reporting Mode |
| 77 | // The INPREPORT attribute reports the method used to compute the ACTINP. If set to 0, the ACTINP |
| 78 | // is computed according to the INP_no_erasure formula (clause 9.6 of [ITUT G.993.2]). If set to 1, |
| 79 | // ACTINP is the value estimated by the xTU receiver. (R) (mandatory for ITU-T G.993.2 VDSL2) |
| 80 | // (1-byte) |
| 81 | // |
| 82 | // Actual Size Of Reed_Solomon Codeword |
| 83 | // Actual size of Reed-Solomon codeword: The NFEC attribute reports the actual Reed-Solomon |
| 84 | // codeword size used in the latency path in which the bearer channel is transported. Its value is |
| 85 | // coded in bytes in the range 0..255. (R) (mandatory for ITU-T G.993.2 VDSL2, optional for others) |
| 86 | // (1-byte) |
| 87 | // |
| 88 | // Actual Number Of Reed_Solomon Redundancy Bytes |
| 89 | // Actual number of Reed-Solomon redundancy bytes: The RFEC attribute reports the actual number of |
| 90 | // Reed-Solomon redundancy bytes per codeword used in the latency path in which the bearer channel |
| 91 | // is transported. Its value is coded in bytes in the range 0..16. The value 0 indicates no Reed- |
| 92 | // Solomon coding. (R) (mandatory for ITUT-G.993.2 VDSL2, optional for others) (1-byte) |
| 93 | // |
| 94 | // Actual Number Of Bits Per Symbol |
| 95 | // The LSYMB attribute reports the actual number of bits per symbol assigned to the latency path in |
| 96 | // which the bearer channel is transported, excluding trellis overhead. Its value is coded in bits |
| 97 | // in the range 0..65535. (R) (mandatory for ITUT-G.993.2 VDSL2, optional for others) (2-bytes) |
| 98 | // |
| 99 | // Actual Interleaving Depth |
| 100 | // The INTLVDEPTH attribute reports the actual depth of the interleaver used in the latency path in |
| 101 | // which the bearer channel is transported. Its value ranges from 1..4096 in steps of 1. The value |
| 102 | // 1 indicates no interleaving. (R) (mandatory for ITU-T G.993.2 VDSL2, optional for others) |
| 103 | // (2-bytes) |
| 104 | // |
| 105 | // Actual Interleaving Block Length |
| 106 | // The INTLVBLOCK attribute reports the actual block length of the interleaver used in the latency |
| 107 | // part in which the bearer channel is transported. Its value ranges from 4..255 in steps of 1. (R) |
| 108 | // (mandatory forITU-T G.993.2 VDSL2, optional for others) (1-byte) |
| 109 | // |
| 110 | // Actual Latency Path |
| 111 | // The LPATH attribute reports the index of the actual latency path in which the bearer channel is |
| 112 | // transported. Valid values are 0..3. In [ITUT-G.992.1], the fast path is mapped to latency index |
| 113 | // 0; the interleaved path to index 1. (R) (mandatory for ITU-T G.993.2 VDSL2, optional for others) |
| 114 | // (1-byte) |
| 115 | // |
| 116 | type XdslChannelUpstreamStatusData struct { |
| 117 | ManagedEntityDefinition |
| 118 | Attributes AttributeValueMap |
| 119 | } |
| 120 | |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 121 | // Attribute name constants |
| 122 | |
| 123 | const XdslChannelUpstreamStatusData_ActualInterleavingDelay = "ActualInterleavingDelay" |
| 124 | const XdslChannelUpstreamStatusData_ActualDataRate = "ActualDataRate" |
| 125 | const XdslChannelUpstreamStatusData_PreviousDataRate = "PreviousDataRate" |
| 126 | const XdslChannelUpstreamStatusData_ActualImpulseNoiseProtection = "ActualImpulseNoiseProtection" |
| 127 | const XdslChannelUpstreamStatusData_ImpulseNoiseProtectionReportingMode = "ImpulseNoiseProtectionReportingMode" |
| 128 | const XdslChannelUpstreamStatusData_ActualSizeOfReedSolomonCodeword = "ActualSizeOfReedSolomonCodeword" |
| 129 | const XdslChannelUpstreamStatusData_ActualNumberOfReedSolomonRedundancyBytes = "ActualNumberOfReedSolomonRedundancyBytes" |
| 130 | const XdslChannelUpstreamStatusData_ActualNumberOfBitsPerSymbol = "ActualNumberOfBitsPerSymbol" |
| 131 | const XdslChannelUpstreamStatusData_ActualInterleavingDepth = "ActualInterleavingDepth" |
| 132 | const XdslChannelUpstreamStatusData_ActualInterleavingBlockLength = "ActualInterleavingBlockLength" |
| 133 | const XdslChannelUpstreamStatusData_ActualLatencyPath = "ActualLatencyPath" |
| 134 | |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 135 | func init() { |
| 136 | xdslchannelupstreamstatusdataBME = &ManagedEntityDefinition{ |
| 137 | Name: "XdslChannelUpstreamStatusData", |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 138 | ClassID: XdslChannelUpstreamStatusDataClassID, |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 139 | MessageTypes: mapset.NewSetWith( |
| 140 | Get, |
| 141 | ), |
| 142 | AllowedAttributeMask: 0xffe0, |
| 143 | AttributeDefinitions: AttributeDefinitionMap{ |
Holger Hildebrandt | 3ac49bd | 2022-02-07 17:46:43 +0000 | [diff] [blame] | 144 | 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 145 | 1: ByteField(XdslChannelUpstreamStatusData_ActualInterleavingDelay, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1), |
| 146 | 2: Uint32Field(XdslChannelUpstreamStatusData_ActualDataRate, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2), |
| 147 | 3: Uint32Field(XdslChannelUpstreamStatusData_PreviousDataRate, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3), |
| 148 | 4: ByteField(XdslChannelUpstreamStatusData_ActualImpulseNoiseProtection, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4), |
| 149 | 5: ByteField(XdslChannelUpstreamStatusData_ImpulseNoiseProtectionReportingMode, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5), |
| 150 | 6: ByteField(XdslChannelUpstreamStatusData_ActualSizeOfReedSolomonCodeword, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6), |
| 151 | 7: ByteField(XdslChannelUpstreamStatusData_ActualNumberOfReedSolomonRedundancyBytes, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7), |
| 152 | 8: Uint16Field(XdslChannelUpstreamStatusData_ActualNumberOfBitsPerSymbol, UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8), |
| 153 | 9: Uint16Field(XdslChannelUpstreamStatusData_ActualInterleavingDepth, UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9), |
| 154 | 10: ByteField(XdslChannelUpstreamStatusData_ActualInterleavingBlockLength, UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10), |
| 155 | 11: ByteField(XdslChannelUpstreamStatusData_ActualLatencyPath, UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11), |
mpagenko | 836a1fd | 2021-11-01 16:12:42 +0000 | [diff] [blame] | 156 | }, |
| 157 | Access: CreatedByOnu, |
| 158 | Support: UnknownSupport, |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | // NewXdslChannelUpstreamStatusData (class ID 103) creates the basic |
| 163 | // Managed Entity definition that is used to validate an ME of this type that |
| 164 | // is received from or transmitted to the OMCC. |
| 165 | func NewXdslChannelUpstreamStatusData(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 166 | return NewManagedEntity(*xdslchannelupstreamstatusdataBME, params...) |
| 167 | } |