blob: 5676e9ecfca123c1938fd33e79a261e565adcd7c [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
4
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
Andrea Campanella7167ebb2020-02-24 09:56:38 +01008
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Andrea Campanella7167ebb2020-02-24 09:56:38 +010010
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 */
Andrea Campanella7167ebb2020-02-24 09:56:38 +010017 /*
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
30const XdslLineInventoryAndStatusDataPart2ClassID ClassID = ClassID(101)
31
32var xdsllineinventoryandstatusdatapart2BME *ManagedEntityDefinition
33
34// XdslLineInventoryAndStatusDataPart2 (class ID #101)
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
47// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
48// identical ID, this ME is implicitly linked to an instance of the PPTP xDSL UNI part 1. (R)
49// (mandatory) (2-bytes)
50//
51// Xdsl Transmission System
52// NOTE 2 - This attribute is only 7-bytes long. An eighth byte identifying VDSL2 capabilities in
53// use is defined in the VDSL2 line inventory and status data part 1 ME.
54//
55// Line Power Management State
56// (R) (mandatory) (1-byte)
57//
58// Downstream Line Attenuation
59// NOTE 3 - [ITU-T G.993.2] specifies a per-band array to represent this attribute. The array is
60// defined in the VDSL2 line inventory and status data part 3 ME. In an ITU-T G.993.2 context, the
61// downstream line attenuation attribute should be set to 0 here, and populated in the VDSL2 line
62// inventory and status data part 3 ME instead.
63//
64// Upstream Line Attenuation
65// NOTE 4 - [ITU-T G.993.2] specifies a per-band array to represent this attribute. The array is
66// defined in the VDSL2 line inventory and status data part 3 ME. In an ITU-T G.993.2 context, the
67// upstream line attenuation attribute should be set to 0 here, and populated in the VDSL2 line
68// inventory and status data part 3 ME instead.
69//
70// Downstream Signal Attenuation
71// NOTE 6 - [ITU-T G.993.2] specifies a per-band array to represent this attribute. The array is
72// defined in the VDSL2 line inventory and status data part 3 ME. In an ITU-T G.993.2 context, the
73// downstream signal attenuation attribute should be set to 0 here, and populated in the VDSL2 line
74// inventory and status data part 3 ME instead.
75//
76// Upstream Signal Attenuation
77// NOTE 8 - [ITU-T G.993.2] specifies a per-band array to represent this attribute. The array is
78// defined in the VDSL2 line inventory and status data part 3 ME. In an ITU-T G.993.2 context, the
79// upstream signal attenuation attribute should be set to 0 here, and populated in the VDSL2 line
80// inventory and status data part 3 ME instead.
81//
82// Downstream Snr Ratio Margin
83// Downstream SNR ratio margin: The downstream SNR margin SNRMds is the maximum increase of noise
84// power received at the xTUR, such that the BER requirements can still be met for all downstream
85// bearer channels. The attribute value ranges from 0 (-64.0 dB) to 1270 (+63.0-dB). The special
86// value 0xFFFF indicates that the attribute is out of range (R) (mandatory) (2-bytes)
87//
88// Upstream Snr Margin
89// Upstream SNR margin: The upstream SNR margin SNRMus is the maximum increase of noise power
90// received at the xTUC, such that the BER requirements can still be met for all upstream bearer
91// channels. The attribute value ranges from 0 (-64.0 dB) to 1270 (+63.0 dB). The special value
92// 0xFFFF indicates that the attribute is out of range. (R) (mandatory) (2-bytes)
93//
94// Downstream Maximum Attainable Data Rate
95// Downstream maximum attainable data rate: The ATTNDRds attribute indicates the maximum downstream
96// net data rate currently attainable. The rate is coded in bits per second. (R) (mandatory)
97// (4-bytes)
98//
99// Upstream Maximum Attainable Data Rate
100// Upstream maximum attainable data rate: The ATTNDRus attribute indicates the maximum upstream net
101// data rate currently attainable. The rate is coded in bits per second. (R) (mandatory) (4-bytes)
102//
103// Downstream Actual Power Spectrum Density
104// Downstream actual power spectrum density: The ACTPSDds attribute is the average downstream
105// transmit power spectrum density over the subcarriers in use (subcarriers to which downstream
106// user data are allocated) delivered by the xTUC at the UC reference point, at the instant of
107// measurement. The attribute value ranges from 0 (-90.0-dBm/Hz) to 900 (0.0-dBm/Hz). The special
108// value (0xFFFF) indicates that the parameter is out of range. (R) (mandatory) (2-bytes)
109//
110// Upstream Actual Power Spectrum Density
111// Upstream actual power spectrum density: The ACTPSDus attribute is the average upstream transmit
112// power spectrum density over the subcarriers in use (subcarriers to which upstream user data are
113// allocated) delivered by the xTUR at the UR reference point, at the instant of measurement. The
114// attribute value ranges from 0 (-90.0-dBm/Hz) to 900 (0.0-dBm/Hz). The special value 0xFFFF
115// indicates that the attribute is out of range. (R) (mandatory) (2-bytes)
116//
117// Downstream Actual Aggregate Transmit Power
118// NOTE 9 - The downstream nominal aggregate transmit power may be taken as a best estimate of the
119// parameter.
120//
121// Upstream Actual Aggregate Transmit Power
122// NOTE 10 - The upstream nominal aggregate transmit power may be taken as a best estimate of the
123// parameter.
124//
125// Initialization _ Last State Transmitted Downstream
126// (R) (mandatory) (1-byte)
127//
128// Initialization _ Last State Transmitted Upstream
129// (R) (mandatory) (1-byte)
130//
131type XdslLineInventoryAndStatusDataPart2 struct {
132 ManagedEntityDefinition
133 Attributes AttributeValueMap
134}
135
136func init() {
137 xdsllineinventoryandstatusdatapart2BME = &ManagedEntityDefinition{
138 Name: "XdslLineInventoryAndStatusDataPart2",
139 ClassID: 101,
140 MessageTypes: mapset.NewSetWith(
141 Get,
142 ),
143 AllowedAttributeMask: 0xffff,
144 AttributeDefinitions: AttributeDefinitionMap{
145 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
146 1: MultiByteField("XdslTransmissionSystem", OctetsAttributeType, 0x8000, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 1),
147 2: ByteField("LinePowerManagementState", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
148 3: Uint16Field("DownstreamLineAttenuation", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
149 4: Uint16Field("UpstreamLineAttenuation", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
150 5: Uint16Field("DownstreamSignalAttenuation", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
151 6: Uint16Field("UpstreamSignalAttenuation", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
152 7: Uint16Field("DownstreamSnrRatioMargin", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
153 8: Uint16Field("UpstreamSnrMargin", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
154 9: Uint32Field("DownstreamMaximumAttainableDataRate", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
155 10: Uint32Field("UpstreamMaximumAttainableDataRate", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
156 11: Uint16Field("DownstreamActualPowerSpectrumDensity", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
157 12: Uint16Field("UpstreamActualPowerSpectrumDensity", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
158 13: Uint16Field("DownstreamActualAggregateTransmitPower", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
159 14: Uint16Field("UpstreamActualAggregateTransmitPower", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
160 15: ByteField("InitializationLastStateTransmittedDownstream", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
161 16: ByteField("InitializationLastStateTransmittedUpstream", UnsignedIntegerAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
162 },
163 Access: CreatedByOnu,
164 Support: UnknownSupport,
165 }
166}
167
168// NewXdslLineInventoryAndStatusDataPart2 (class ID 101) creates the basic
169// Managed Entity definition that is used to validate an ME of this type that
170// is received from or transmitted to the OMCC.
171func NewXdslLineInventoryAndStatusDataPart2(params ...ParamData) (*ManagedEntity, OmciErrors) {
172 return NewManagedEntity(*xdsllineinventoryandstatusdatapart2BME, params...)
173}