blob: 0172ef92205bbde861930342c8ffe1a933a0a0b1 [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Andrea Campanella7167ebb2020-02-24 09:56:38 +01003 * Copyright 2020-present Open Networking Foundation
Chip Boling8cdd6392022-01-27 08:43:37 -06004 *
Chip Boling6e27b352020-02-14 09:10:01 -06005 * 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 Boling8cdd6392022-01-27 08:43:37 -06008 *
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Chip Boling8cdd6392022-01-27 08:43:37 -060010 *
Chip Boling6e27b352020-02-14 09:10:01 -060011 * 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. Bainbridgeadf422d2021-04-09 16:06:41 +000017/*
Chip Boling6e27b352020-02-14 09:10:01 -060018 * 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
24package generated
25
26import "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 Boling610117d2021-09-09 11:24:34 -050030const XdslLineInventoryAndStatusDataPart2ClassID = ClassID(101) // 0x0065
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var xdsllineinventoryandstatusdatapart2BME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// XdslLineInventoryAndStatusDataPart2 (Class ID: #101 / 0x0065)
Chip Boling6e27b352020-02-14 09:10:01 -060035// 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 Boling610117d2021-09-09 11:24:34 -050047// 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 Boling6e27b352020-02-14 09:10:01 -060049//
50// Xdsl Transmission System
Chip Boling610117d2021-09-09 11:24:34 -050051// 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 Boling6e27b352020-02-14 09:10:01 -060054// 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 Boling610117d2021-09-09 11:24:34 -050058// 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 Boling6e27b352020-02-14 09:10:01 -060073// (R) (mandatory) (1-byte)
74//
75// Downstream Line Attenuation
Chip Boling610117d2021-09-09 11:24:34 -050076// 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 Boling6e27b352020-02-14 09:10:01 -060082// 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 Boling610117d2021-09-09 11:24:34 -050093// 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 Boling6e27b352020-02-14 09:10:01 -060099// Downstream Signal Attenuation
Chip Boling610117d2021-09-09 11:24:34 -0500100// 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 Boling6e27b352020-02-14 09:10:01 -0600111// 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 Boling610117d2021-09-09 11:24:34 -0500117// 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 Boling6e27b352020-02-14 09:10:01 -0600128// 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 Boling610117d2021-09-09 11:24:34 -0500134// 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 Boling6e27b352020-02-14 09:10:01 -0600138//
139// Upstream Snr Margin
Chip Boling610117d2021-09-09 11:24:34 -0500140// 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 Boling6e27b352020-02-14 09:10:01 -0600144//
145// Downstream Maximum Attainable Data Rate
Chip Boling610117d2021-09-09 11:24:34 -0500146// 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 Boling6e27b352020-02-14 09:10:01 -0600148//
149// Upstream Maximum Attainable Data Rate
Chip Boling610117d2021-09-09 11:24:34 -0500150// 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 Boling6e27b352020-02-14 09:10:01 -0600152//
153// Downstream Actual Power Spectrum Density
Chip Boling610117d2021-09-09 11:24:34 -0500154// 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 Boling6e27b352020-02-14 09:10:01 -0600159//
160// Upstream Actual Power Spectrum Density
Chip Boling610117d2021-09-09 11:24:34 -0500161// 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 Boling6e27b352020-02-14 09:10:01 -0600166//
167// Downstream Actual Aggregate Transmit Power
Chip Boling610117d2021-09-09 11:24:34 -0500168// 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 Boling6e27b352020-02-14 09:10:01 -0600173// 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 Boling610117d2021-09-09 11:24:34 -0500180// 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 Boling6e27b352020-02-14 09:10:01 -0600185// Initialization _ Last State Transmitted Downstream
Chip Boling610117d2021-09-09 11:24:34 -0500186// 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 Boling6e27b352020-02-14 09:10:01 -0600198// (R) (mandatory) (1-byte)
199//
200// Initialization _ Last State Transmitted Upstream
Chip Boling610117d2021-09-09 11:24:34 -0500201// 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 Boling6e27b352020-02-14 09:10:01 -0600213// (R) (mandatory) (1-byte)
214//
215type XdslLineInventoryAndStatusDataPart2 struct {
216 ManagedEntityDefinition
217 Attributes AttributeValueMap
218}
219
Chip Boling8cdd6392022-01-27 08:43:37 -0600220// Attribute name constants
221
222const XdslLineInventoryAndStatusDataPart2_XdslTransmissionSystem = "XdslTransmissionSystem"
223const XdslLineInventoryAndStatusDataPart2_LinePowerManagementState = "LinePowerManagementState"
224const XdslLineInventoryAndStatusDataPart2_DownstreamLineAttenuation = "DownstreamLineAttenuation"
225const XdslLineInventoryAndStatusDataPart2_UpstreamLineAttenuation = "UpstreamLineAttenuation"
226const XdslLineInventoryAndStatusDataPart2_DownstreamSignalAttenuation = "DownstreamSignalAttenuation"
227const XdslLineInventoryAndStatusDataPart2_UpstreamSignalAttenuation = "UpstreamSignalAttenuation"
228const XdslLineInventoryAndStatusDataPart2_DownstreamSnrRatioMargin = "DownstreamSnrRatioMargin"
229const XdslLineInventoryAndStatusDataPart2_UpstreamSnrMargin = "UpstreamSnrMargin"
230const XdslLineInventoryAndStatusDataPart2_DownstreamMaximumAttainableDataRate = "DownstreamMaximumAttainableDataRate"
231const XdslLineInventoryAndStatusDataPart2_UpstreamMaximumAttainableDataRate = "UpstreamMaximumAttainableDataRate"
232const XdslLineInventoryAndStatusDataPart2_DownstreamActualPowerSpectrumDensity = "DownstreamActualPowerSpectrumDensity"
233const XdslLineInventoryAndStatusDataPart2_UpstreamActualPowerSpectrumDensity = "UpstreamActualPowerSpectrumDensity"
234const XdslLineInventoryAndStatusDataPart2_DownstreamActualAggregateTransmitPower = "DownstreamActualAggregateTransmitPower"
235const XdslLineInventoryAndStatusDataPart2_UpstreamActualAggregateTransmitPower = "UpstreamActualAggregateTransmitPower"
236const XdslLineInventoryAndStatusDataPart2_InitializationLastStateTransmittedDownstream = "InitializationLastStateTransmittedDownstream"
237const XdslLineInventoryAndStatusDataPart2_InitializationLastStateTransmittedUpstream = "InitializationLastStateTransmittedUpstream"
238
Chip Boling6e27b352020-02-14 09:10:01 -0600239func init() {
240 xdsllineinventoryandstatusdatapart2BME = &ManagedEntityDefinition{
241 Name: "XdslLineInventoryAndStatusDataPart2",
Chip Boling8cdd6392022-01-27 08:43:37 -0600242 ClassID: XdslLineInventoryAndStatusDataPart2ClassID,
Chip Boling6e27b352020-02-14 09:10:01 -0600243 MessageTypes: mapset.NewSetWith(
244 Get,
245 ),
246 AllowedAttributeMask: 0xffff,
247 AttributeDefinitions: AttributeDefinitionMap{
Chip Boling8cdd6392022-01-27 08:43:37 -0600248 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
249 1: MultiByteField(XdslLineInventoryAndStatusDataPart2_XdslTransmissionSystem, OctetsAttributeType, 0x8000, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 1),
250 2: ByteField(XdslLineInventoryAndStatusDataPart2_LinePowerManagementState, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
251 3: Uint16Field(XdslLineInventoryAndStatusDataPart2_DownstreamLineAttenuation, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
252 4: Uint16Field(XdslLineInventoryAndStatusDataPart2_UpstreamLineAttenuation, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
253 5: Uint16Field(XdslLineInventoryAndStatusDataPart2_DownstreamSignalAttenuation, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
254 6: Uint16Field(XdslLineInventoryAndStatusDataPart2_UpstreamSignalAttenuation, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
255 7: Uint16Field(XdslLineInventoryAndStatusDataPart2_DownstreamSnrRatioMargin, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
256 8: Uint16Field(XdslLineInventoryAndStatusDataPart2_UpstreamSnrMargin, UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
257 9: Uint32Field(XdslLineInventoryAndStatusDataPart2_DownstreamMaximumAttainableDataRate, UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
258 10: Uint32Field(XdslLineInventoryAndStatusDataPart2_UpstreamMaximumAttainableDataRate, UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
259 11: Uint16Field(XdslLineInventoryAndStatusDataPart2_DownstreamActualPowerSpectrumDensity, UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
260 12: Uint16Field(XdslLineInventoryAndStatusDataPart2_UpstreamActualPowerSpectrumDensity, UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
261 13: Uint16Field(XdslLineInventoryAndStatusDataPart2_DownstreamActualAggregateTransmitPower, UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
262 14: Uint16Field(XdslLineInventoryAndStatusDataPart2_UpstreamActualAggregateTransmitPower, UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
263 15: ByteField(XdslLineInventoryAndStatusDataPart2_InitializationLastStateTransmittedDownstream, UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
264 16: ByteField(XdslLineInventoryAndStatusDataPart2_InitializationLastStateTransmittedUpstream, UnsignedIntegerAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
Chip Boling6e27b352020-02-14 09:10:01 -0600265 },
266 Access: CreatedByOnu,
267 Support: UnknownSupport,
268 }
269}
270
271// NewXdslLineInventoryAndStatusDataPart2 (class ID 101) creates the basic
272// Managed Entity definition that is used to validate an ME of this type that
273// is received from or transmitted to the OMCC.
274func NewXdslLineInventoryAndStatusDataPart2(params ...ParamData) (*ManagedEntity, OmciErrors) {
275 return NewManagedEntity(*xdsllineinventoryandstatusdatapart2BME, params...)
276}