blob: 1fbc83bd5a36d8537766c28f1b88e4a005ffbd43 [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
8 * Unless required by applicable law or agreed to in writing, software
9 * distributed under the License is distributed on an "AS IS" BASIS,
10 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 * See the License for the specific language governing permissions and
12 * limitations under the License.
13 */
14/*
15 * NOTE: This file was generated, manual edits will be overwritten!
16 *
17 * Generated by 'goCodeGenerator.py':
18 * https://github.com/cboling/OMCI-parser/README.md
19 */
20
21package generated
22
23import "github.com/deckarep/golang-set"
24
25// XdslLineInventoryAndStatusDataPart2ClassID is the 16-bit ID for the OMCI
26// Managed entity xDSL line inventory and status data part 2
27const XdslLineInventoryAndStatusDataPart2ClassID ClassID = ClassID(101)
28
29var xdsllineinventoryandstatusdatapart2BME *ManagedEntityDefinition
30
31// XdslLineInventoryAndStatusDataPart2 (class ID #101)
32// This ME contains part 2 of the line inventory and status data for an xDSL UNI. The ONU
33// automatically creates or deletes an instance of this ME upon the creation or deletion of a PPTP
34// xDSL UNI part 1.
35//
36// NOTE 1 - [ITU-T G.997.1] specifies that bit rate attributes have granularity of 1000-bit/s. If
37// ITUT-G.997.1 compliance is required, the ONU should only report values with this granularity.
38//
39// Relationships
40// An instance of this ME is associated with an xDSL UNI.
41//
42// Attributes
43// Managed Entity Id
44// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
45// identical ID, this ME is implicitly linked to an instance of the PPTP xDSL UNI part 1. (R)
46// (mandatory) (2-bytes)
47//
48// Xdsl Transmission System
49// NOTE 2 - This attribute is only 7-bytes long. An eighth byte identifying VDSL2 capabilities in
50// use is defined in the VDSL2 line inventory and status data part 1 ME.
51//
52// Line Power Management State
53// (R) (mandatory) (1-byte)
54//
55// Downstream Line Attenuation
56// NOTE 3 - [ITU-T G.993.2] specifies a per-band array to represent this attribute. The array is
57// defined in the VDSL2 line inventory and status data part 3 ME. In an ITU-T G.993.2 context, the
58// downstream line attenuation attribute should be set to 0 here, and populated in the VDSL2 line
59// inventory and status data part 3 ME instead.
60//
61// Upstream Line Attenuation
62// NOTE 4 - [ITU-T G.993.2] specifies a per-band array to represent this attribute. The array is
63// defined in the VDSL2 line inventory and status data part 3 ME. In an ITU-T G.993.2 context, the
64// upstream line attenuation attribute should be set to 0 here, and populated in the VDSL2 line
65// inventory and status data part 3 ME instead.
66//
67// Downstream Signal Attenuation
68// NOTE 6 - [ITU-T G.993.2] specifies a per-band array to represent this attribute. The array is
69// defined in the VDSL2 line inventory and status data part 3 ME. In an ITU-T G.993.2 context, the
70// downstream signal attenuation attribute should be set to 0 here, and populated in the VDSL2 line
71// inventory and status data part 3 ME instead.
72//
73// Upstream Signal Attenuation
74// NOTE 8 - [ITU-T G.993.2] specifies a per-band array to represent this attribute. The array is
75// defined in the VDSL2 line inventory and status data part 3 ME. In an ITU-T G.993.2 context, the
76// upstream signal attenuation attribute should be set to 0 here, and populated in the VDSL2 line
77// inventory and status data part 3 ME instead.
78//
79// Downstream Snr Ratio Margin
80// Downstream SNR ratio margin: The downstream SNR margin SNRMds is the maximum increase of noise
81// power received at the xTUR, such that the BER requirements can still be met for all downstream
82// bearer channels. The attribute value ranges from 0 (-64.0 dB) to 1270 (+63.0-dB). The special
83// value 0xFFFF indicates that the attribute is out of range (R) (mandatory) (2-bytes)
84//
85// Upstream Snr Margin
86// Upstream SNR margin: The upstream SNR margin SNRMus is the maximum increase of noise power
87// received at the xTUC, such that the BER requirements can still be met for all upstream bearer
88// channels. The attribute value ranges from 0 (-64.0 dB) to 1270 (+63.0 dB). The special value
89// 0xFFFF indicates that the attribute is out of range. (R) (mandatory) (2-bytes)
90//
91// Downstream Maximum Attainable Data Rate
92// Downstream maximum attainable data rate: The ATTNDRds attribute indicates the maximum downstream
93// net data rate currently attainable. The rate is coded in bits per second. (R) (mandatory)
94// (4-bytes)
95//
96// Upstream Maximum Attainable Data Rate
97// Upstream maximum attainable data rate: The ATTNDRus attribute indicates the maximum upstream net
98// data rate currently attainable. The rate is coded in bits per second. (R) (mandatory) (4-bytes)
99//
100// Downstream Actual Power Spectrum Density
101// Downstream actual power spectrum density: The ACTPSDds attribute is the average downstream
102// transmit power spectrum density over the subcarriers in use (subcarriers to which downstream
103// user data are allocated) delivered by the xTUC at the UC reference point, at the instant of
104// measurement. The attribute value ranges from 0 (-90.0-dBm/Hz) to 900 (0.0-dBm/Hz). The special
105// value (0xFFFF) indicates that the parameter is out of range. (R) (mandatory) (2-bytes)
106//
107// Upstream Actual Power Spectrum Density
108// Upstream actual power spectrum density: The ACTPSDus attribute is the average upstream transmit
109// power spectrum density over the subcarriers in use (subcarriers to which upstream user data are
110// allocated) delivered by the xTUR at the UR reference point, at the instant of measurement. The
111// attribute value ranges from 0 (-90.0-dBm/Hz) to 900 (0.0-dBm/Hz). The special value 0xFFFF
112// indicates that the attribute is out of range. (R) (mandatory) (2-bytes)
113//
114// Downstream Actual Aggregate Transmit Power
115// NOTE 9 - The downstream nominal aggregate transmit power may be taken as a best estimate of the
116// parameter.
117//
118// Upstream Actual Aggregate Transmit Power
119// NOTE 10 - The upstream nominal aggregate transmit power may be taken as a best estimate of the
120// parameter.
121//
122// Initialization _ Last State Transmitted Downstream
123// (R) (mandatory) (1-byte)
124//
125// Initialization _ Last State Transmitted Upstream
126// (R) (mandatory) (1-byte)
127//
128type XdslLineInventoryAndStatusDataPart2 struct {
129 ManagedEntityDefinition
130 Attributes AttributeValueMap
131}
132
133func init() {
134 xdsllineinventoryandstatusdatapart2BME = &ManagedEntityDefinition{
135 Name: "XdslLineInventoryAndStatusDataPart2",
136 ClassID: 101,
137 MessageTypes: mapset.NewSetWith(
138 Get,
139 ),
140 AllowedAttributeMask: 0xffff,
141 AttributeDefinitions: AttributeDefinitionMap{
142 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
143 1: MultiByteField("XdslTransmissionSystem", OctetsAttributeType, 0x8000, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 1),
144 2: ByteField("LinePowerManagementState", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
145 3: Uint16Field("DownstreamLineAttenuation", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
146 4: Uint16Field("UpstreamLineAttenuation", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
147 5: Uint16Field("DownstreamSignalAttenuation", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
148 6: Uint16Field("UpstreamSignalAttenuation", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
149 7: Uint16Field("DownstreamSnrRatioMargin", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
150 8: Uint16Field("UpstreamSnrMargin", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
151 9: Uint32Field("DownstreamMaximumAttainableDataRate", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
152 10: Uint32Field("UpstreamMaximumAttainableDataRate", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
153 11: Uint16Field("DownstreamActualPowerSpectrumDensity", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
154 12: Uint16Field("UpstreamActualPowerSpectrumDensity", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
155 13: Uint16Field("DownstreamActualAggregateTransmitPower", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
156 14: Uint16Field("UpstreamActualAggregateTransmitPower", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
157 15: ByteField("InitializationLastStateTransmittedDownstream", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
158 16: ByteField("InitializationLastStateTransmittedUpstream", UnsignedIntegerAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
159 },
160 Access: CreatedByOnu,
161 Support: UnknownSupport,
162 }
163}
164
165// NewXdslLineInventoryAndStatusDataPart2 (class ID 101) creates the basic
166// Managed Entity definition that is used to validate an ME of this type that
167// is received from or transmitted to the OMCC.
168func NewXdslLineInventoryAndStatusDataPart2(params ...ParamData) (*ManagedEntity, OmciErrors) {
169 return NewManagedEntity(*xdsllineinventoryandstatusdatapart2BME, params...)
170}