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 | // Vdsl2LineInventoryAndStatusDataPart3ClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity VDSL2 line inventory and status data part 3 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const Vdsl2LineInventoryAndStatusDataPart3ClassID = ClassID(170) // 0x00aa |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var vdsl2lineinventoryandstatusdatapart3BME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // Vdsl2LineInventoryAndStatusDataPart3 (Class ID: #170 / 0x00aa) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // This ME extends the other xDSL line inventory and status data MEs with attributes specific to |
| 36 | // VDSL2. This ME contains per-band attributes for both directions. These same attributes are |
| 37 | // defined in the xDSL line inventory and status data part 2 ME, but only for a single band. [ITUT |
| 38 | // G.993.2] allows for VDSL2 to have as many as five bands upstream and as many as five bands |
| 39 | // downstream. |
| 40 | // |
| 41 | // Relationships |
| 42 | // This is one of the status data MEs associated with an xDSL UNI. It is required only if VDSL2 is |
| 43 | // supported by the PPTP. The ONU automatically creates or deletes an instance of this ME upon |
| 44 | // creation or deletion of a PPTP xDSL UNI part 1 that supports these attributes. |
| 45 | // |
| 46 | // Attributes |
| 47 | // Managed Entity Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 48 | // This attribute uniquely identifies each instance of this ME. Through an identical ID, this ME is |
| 49 | // implicitly linked to an instance of the PPTP xDSL UNI part 1 ME. (R) (mandatory) (2-bytes) |
| 50 | // |
| 51 | // Upstream Bands Count |
| 52 | // This attribute reports the number of upstream bands. It can be used to filter the upstream |
| 53 | // attributes. All upstream attributes are arrays of per-band entries, of which the first upstream |
| 54 | // bands count are populated. The contents of the arrays for unused frequency bands are |
| 55 | // unspecified. The original attributes were allocated for as many as four upstream bands, US0, 1, |
| 56 | // 2, 3; optional extended attributes have been added to accommodate the possibility that five |
| 57 | // upstream bands may be needed. (R) (mandatory) (1-byte) |
| 58 | // |
| 59 | // Downstream Bands Count |
| 60 | // This attribute reports the number of downstream bands. It can be used to filter the downstream |
| 61 | // attributes. All downstream attributes are arrays of per-band entries, of which the first |
| 62 | // downstream bands count are populated. The contents of the arrays for unused frequency bands are |
| 63 | // unspecified. The original attributes were allocated for as many as three downstream bands, DS1, |
| 64 | // 2, 3; optional extended attributes have been added to accommodate the possibility that five |
| 65 | // downstream bands may be needed. (R) (mandatory) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 66 | // |
| 67 | // Downstream Line Attenuation Per Band |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 68 | // The LATNds attribute is defined per usable band. It is the squared magnitude of the channel |
| 69 | // characteristics function, H(f), averaged over this band, and measured during loop diagnostic |
| 70 | // mode and initialization. The exact definition is included in the relevant xDSL Recommendation. |
| 71 | // The upstream line attenuation per band ranges from 0 (0.0-dB) to 1270 (+127.0-dB). The special |
| 72 | // value 0xFFFF indicates that the line attenuation per band is out of the range to be represented. |
| 73 | // (R) (mandatory) (3-bands * 2-bytes-=-6-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 74 | // |
| 75 | // Upstream Line Attenuation Per Band |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 76 | // The LATNus attribute is defined per usable band. It is the squared magnitude of the channel |
| 77 | // characteristics function H(f) averaged over this band, and measured during loop diagnostic mode |
| 78 | // and initialization. The exact definition is included in the relevant xDSL Recommendation. The |
| 79 | // upstream line attenuation per band ranges from 0 (0.0-dB) to 1270 (+127.0-dB). The special value |
| 80 | // 0xFFFF indicates that line attenuation per band is out of range to be represented. (R) |
| 81 | // (mandatory) (4-bands * 2-bytes-=-8-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 82 | // |
| 83 | // Downstream Signal Attenuation Per Band |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 84 | // The SATNds attribute is defined per usable band. It is the measured difference in the total |
| 85 | // power transmitted in this band by the xTUC and the total power received by the xTUR during loop |
| 86 | // diagnostic mode, initialization and showtime. The exact definition is included in the relevant |
| 87 | // xDSL Recommendation. The downstream signal attenuation per band ranges from 0 (0.0-dB) to 1270 |
| 88 | // (+127.0-dB). The special value 0xFFFF indicates that the signal attenuation per band is out of |
| 89 | // the range to be represented. (R) (mandatory) (3 bands * 2-bytes-=-6-bytes) |
| 90 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 91 | // NOTE 1 - During showtime, only a subset of the subcarriers may be transmitted by the xTU-C, as |
| 92 | // compared to loop diagnostic mode and initialization. Therefore, the downstream signal |
| 93 | // attenuation value during showtime may be significantly lower than the downstream signal |
| 94 | // attenuation value during loop diagnostic mode and initialization. |
| 95 | // |
| 96 | // Upstream Signal Attenuation Per Band |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 97 | // The SATNus attribute is defined per usable band. It is the measured difference in decibels in |
| 98 | // the total power transmitted in this band by the xTUR and the total power received in this band |
| 99 | // by the xTUC during loop diagnostic mode, initialization and showtime. The exact definition is |
| 100 | // included in the relevant xDSL Recommendation. The upstream signal attenuation per band ranges |
| 101 | // from 0 (0.0-dB) to 1270 (+127.0-dB). The special value 0xFFFF indicates the signal attenuation |
| 102 | // per band is out of range to be represented. (R) (mandatory) (4 bands * 2-bytes-= 8-bytes) |
| 103 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 104 | // NOTE 2 - During showtime, only a subset of the subcarriers may be transmitted by the xTU-R, as |
| 105 | // compared to loop diagnostic mode and initialization. Therefore, the upstream signal attenuation |
| 106 | // value during showtime may be significantly lower than the upstream signal attenuation value |
| 107 | // during loop diagnostic mode and initialization. |
| 108 | // |
| 109 | // Downstream Snr Margin Per Band |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 110 | // The SNRMpbds attribute is defined per usable band. The downstream SNR margin per band is the |
| 111 | // maximum increase of noise power received at the xTU-R, such that the BER requirements are met |
| 112 | // for all downstream bearer channels. Each array value ranges from 0 (-64.0-dB) to 1270 |
| 113 | // (+63.0-dB). The special value 0xFFFF indicates that the attribute is out of range to be |
| 114 | // represented. (R) (mandatory) (3 bands * 2-bytes-=-6-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 115 | // |
| 116 | // Upstream Snr Margin Per Band |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 117 | // The SNRMpbus attribute is defined per usable band. The upstream SNR margin per band is the |
| 118 | // maximum increase of noise power received at the xTU-C, such that the BER requirements are met |
| 119 | // for all upstream bearer channels. Each array value ranges from 0 (-64.0-dB) to 1270 (+63.0-dB). |
| 120 | // The special value 0xFFFF indicates that the attribute is out of range to be represented. (R) |
| 121 | // (mandatory) (4 bands * 2-bytes-= 8-bytes) |
| 122 | // |
| 123 | // Downstream Line Attenuation Extension |
| 124 | // This attribute extends LATNds when more than three downstream bands are used. It is defined in |
| 125 | // the same way as the downstream line attenuation per band attribute. (R) (optional) (2 bands * |
| 126 | // 2-bytes-= 4-bytes) |
| 127 | // |
| 128 | // Upstream Line Attenuation Extension |
| 129 | // This attribute extends LATNus when more than four upstream bands are used. It is defined in the |
| 130 | // same way as the upstream line attenuation per band attribute. (R) (optional) (1 band * |
| 131 | // 2-bytes-=-2-bytes) |
| 132 | // |
| 133 | // Downstream Signal Attenuation Extension |
| 134 | // This attribute extends SATNds when more than three downstream bands are used. It is defined in |
| 135 | // the same way as the downstream signal attenuation per band attribute. (R) (optional) (2 bands * |
| 136 | // 2-bytes-= 4-bytes) |
| 137 | // |
| 138 | // Upstream Signal Attenuation Extension |
| 139 | // This attribute extends SATNus when more than four upstream bands are used. It is defined in the |
| 140 | // same way as the upstream signal attenuation per band attribute. (R) (optional) (1 band * |
| 141 | // 2-bytes-= 2-bytes) |
| 142 | // |
| 143 | // Downstream Snr Margin Extension |
| 144 | // This attribute extends SNRMpbds when more than three downstream bands are used. It is defined in |
| 145 | // the same way as the downstream SNR margin per band attribute. (R) (optional) (2 bands * |
| 146 | // 2-bytes-= 4-bytes) |
| 147 | // |
| 148 | // Upstream Snr Margin Extension |
| 149 | // This attribute extends SNRMpbus when more than four upstream bands are used. It is defined in |
| 150 | // the same way as the upstream SNR margin per band attribute. (R) (optional) (1-band * 2-bytes-= |
| 151 | // 2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 152 | // |
| 153 | type Vdsl2LineInventoryAndStatusDataPart3 struct { |
| 154 | ManagedEntityDefinition |
| 155 | Attributes AttributeValueMap |
| 156 | } |
| 157 | |
| 158 | func init() { |
| 159 | vdsl2lineinventoryandstatusdatapart3BME = &ManagedEntityDefinition{ |
| 160 | Name: "Vdsl2LineInventoryAndStatusDataPart3", |
| 161 | ClassID: 170, |
| 162 | MessageTypes: mapset.NewSetWith( |
| 163 | Get, |
| 164 | ), |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 165 | AllowedAttributeMask: 0xfffc, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 166 | AttributeDefinitions: AttributeDefinitionMap{ |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 167 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 168 | 1: ByteField("UpstreamBandsCount", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1), |
| 169 | 2: ByteField("DownstreamBandsCount", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2), |
| 170 | 3: MultiByteField("DownstreamLineAttenuationPerBand", OctetsAttributeType, 0x2000, 3, toOctets("AAAA"), mapset.NewSetWith(Read), false, false, false, 3), |
| 171 | 4: Uint32Field("UpstreamLineAttenuationPerBand", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4), |
| 172 | 5: MultiByteField("DownstreamSignalAttenuationPerBand", OctetsAttributeType, 0x0800, 3, toOctets("AAAA"), mapset.NewSetWith(Read), false, false, false, 5), |
| 173 | 6: Uint32Field("UpstreamSignalAttenuationPerBand", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6), |
| 174 | 7: MultiByteField("DownstreamSnrMarginPerBand", OctetsAttributeType, 0x0200, 3, toOctets("AAAA"), mapset.NewSetWith(Read), false, false, false, 7), |
| 175 | 8: Uint32Field("UpstreamSnrMarginPerBand", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8), |
| 176 | 9: Uint16Field("DownstreamLineAttenuationExtension", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, true, false, 9), |
| 177 | 10: ByteField("UpstreamLineAttenuationExtension", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10), |
| 178 | 11: Uint16Field("DownstreamSignalAttenuationExtension", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, true, false, 11), |
| 179 | 12: ByteField("UpstreamSignalAttenuationExtension", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, true, false, 12), |
| 180 | 13: Uint16Field("DownstreamSnrMarginExtension", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, true, false, 13), |
| 181 | 14: ByteField("UpstreamSnrMarginExtension", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, true, false, 14), |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 182 | }, |
| 183 | Access: CreatedByOnu, |
| 184 | Support: UnknownSupport, |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | // NewVdsl2LineInventoryAndStatusDataPart3 (class ID 170) creates the basic |
| 189 | // Managed Entity definition that is used to validate an ME of this type that |
| 190 | // is received from or transmitted to the OMCC. |
| 191 | func NewVdsl2LineInventoryAndStatusDataPart3(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 192 | return NewManagedEntity(*vdsl2lineinventoryandstatusdatapart3BME, params...) |
| 193 | } |