blob: 393ae25855d6641ee5c513ac1b1351df7a91df33 [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// XdslLineInventoryAndStatusDataPart1ClassID is the 16-bit ID for the OMCI
29// Managed entity xDSL line inventory and status data part 1
Chip Boling610117d2021-09-09 11:24:34 -050030const XdslLineInventoryAndStatusDataPart1ClassID = ClassID(100) // 0x0064
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var xdsllineinventoryandstatusdatapart1BME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// XdslLineInventoryAndStatusDataPart1 (Class ID: #100 / 0x0064)
Chip Boling6e27b352020-02-14 09:10:01 -060035// This ME contains part 1 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// Relationships
40// An instance of this ME is associated with an xDSL UNI.
41//
42// Attributes
43// Managed Entity Id
Chip Boling610117d2021-09-09 11:24:34 -050044// This attribute uniquely identifies each instance of this ME. Through an identical ID, this ME is
45// implicitly linked to an instance of the PPTP xDSL UNI part 1. (R) (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060046//
47// Xtu_C G.994.1 Vendor Id
48// xTU-C G.994.1 vendor ID: This is the vendor ID as inserted by the xTU-C in the ITUT-G.994.1 CL
49// message. It comprises 8 octets, including a country code followed by a (regionally allocated)
50// provider code, as defined in [ITUT-T.35]. (R) (mandatory) (8-bytes)
51//
52// Xtu_R G.994.1 Vendor Id
53// xTU-R G.994.1 vendor ID: This is the vendor ID as inserted by the xTU-R in the ITUT-G.994.1 CLR
54// message. It comprises 8 binary octets, with the same format as the xTUC ITUT G.994.1 vendor ID.
55// (R) (mandatory) (8-bytes)
56//
57// Xtu_C System Vendor Id
58// xTU-C system vendor ID: This is the vendor ID as inserted by the xTU-C in the overhead messages
59// of [ITU-T G.992.3] and [ITU-T G.992.4]. It comprises 8 binary octets, with the same format as
60// the xTU-C ITUT-G.994.1 vendor ID. (R) (mandatory) (8-bytes)
61//
62// Xtu_R System Vendor Id
63// xTU-R system vendor ID: This is the vendor ID as inserted by the xTU-R in the embedded
64// operations channel and overhead messages of [ITU-T G.992.3] and [ITUT-G.992.4]. It comprises 8
65// binary octets, with the same format as the xTU-C ITUT-G.994.1 vendor ID. (R) (mandatory)
66// (8-bytes)
67//
68// Xtu_C Version Number
69// xTU-C version number: This is the vendorspecific version number as inserted by the xTUC in the
70// overhead messages of [ITU-T G.992.3] and [ITU-T G.992.4]. It comprises up to 16 binary octets.
71// (R) (mandatory) (16-bytes)
72//
73// Xtu_R Version Number
74// xTU-R version number: This is the version number as inserted by the xTUR in the embedded
75// operations channel of [ITU-T G.992.1] or [ITU-T G.992.2], or the overhead messages of [ITU-T
76// G.992.3], [ITU-T G.992.4], [ITU-T G.992.5] and [ITU-T G.993.2]. The attribute value may be
77// vendor-specific, but is recommended to comprise up to 16 ASCII characters, null-terminated if it
78// is shorter than 16. The string should contain the xTU-R firmware version and the xTU-R model,
79// encoded in that order and separated by a space character: "<xTU-R firmware version><xTU-R
80// model>". It is recognized that legacy xTU-Rs may not support this format. (R) (mandatory)
81// (16-bytes)
82//
83// Xtu_C Serial Number Part 1
84// xTU-C serial number part 1: The vendorspecific serial number inserted by the xTU-C in the
85// overhead messages of [ITU-T G.992.3] and [ITU-T G.992.4] comprises up to 32 ASCII characters,
86// null terminated if it is shorter than 32 characters. This attribute contains the first 16
87// characters. (R) (mandatory) (16-bytes)
88//
89// Xtu_C Serial Number Part 2
90// xTU-C serial number part 2: This attribute contains the second 16 characters of the xTU-C serial
91// number. (R) (mandatory) (16-bytes)
92//
93// Xtu_R Serial Number Part 1
94// xTU-R serial number part 1: The serial number inserted by the xTU-R in the embedded operations
95// channel of [ITU-T G.992.1] or [ITU-T G.992.2], or the overhead messages of [ITU-T G.992.3],
96// [ITU-T G.992.4], [ITU-T G.992.5] and [ITUT-G.993.2], comprises up to 32 ASCII characters,
97// nullterminated if it is shorter than 32. It is recommended that the equipment serial number, the
98// equipment model and the equipment firmware version, encoded in that order and separated by space
99// characters, be contained: "<equipment serial number><equipment model><equipment firmware
100// version>". It is recognized that legacy xTU-Rs may not support this format. This attribute
101// contains the first 16 characters. (R) (mandatory) (16-bytes)
102//
103// Xtu_R Serial Number Part 2
104// xTU-R serial number part 2: This attribute contains the second 16 characters of the xTU-R serial
105// number. (R) (mandatory) (16-bytes)
106//
107// Xtu_C Self Test Results
108// xTU-C selftest results: This parameter reports the xTU-C self-test result. It is coded in two
109// fields. The most significant octet is 0 if the self-test passed and 1 if it failed. The three
110// least significant octets are a vendor-discretionary integer that can be interpreted in
111// combination with [ITU-T G.994.1] and the system vendor ID. (R) (mandatory) (4-bytes)
112//
113// Xtu_R Self Test Results
114// xTU-R selftest results: This parameter defines the xTU-R self-test result. It is coded in two
115// fields. The most significant octet is 0 if the self-test passed and 1 if it failed. The three
116// least significant octets are a vendor-discretionary integer that can be interpreted in
117// combination with [ITU-T G.994.1] and the system vendor ID. (R) (mandatory) (4-bytes)
118//
119// Xtu_C Transmission System Capability
Chip Boling610117d2021-09-09 11:24:34 -0500120// xTU-C transmission system capability: This attribute lists xTUC transmission system
121// capabilities. It is a bit map, defined in Table 9.7.12-1. (R) (mandatory) (7-bytes)
122//
Chip Boling6e27b352020-02-14 09:10:01 -0600123// NOTE 1 - This attribute is only 7-bytes long. An eighth byte identifying VDSL2 capabilities is
124// defined in the VDSL2 line inventory and status data part 1 ME.
125//
126// Xtu_R Transmission System Capability
Chip Boling610117d2021-09-09 11:24:34 -0500127// xTU-R transmission system capability: This attribute lists xTUR transmission system
128// capabilities. It is a bit map, defined in Table 9.7.121. (R) (mandatory) (7-bytes)
129//
Chip Boling6e27b352020-02-14 09:10:01 -0600130// NOTE 2 - This attribute is only 7-bytes long. An eighth byte identifying VDSL2 capabilities is
131// defined in the VDSL2 line inventory and status data part 2 ME.
132//
133// Initialization Success_Failure Cause
134// (R) (mandatory) (1-byte)
135//
Chip Boling610117d2021-09-09 11:24:34 -0500136// Initialization success/failure cause: This parameter represents the success or failure cause of
137// the last full initialization performed on the line. It is coded as follows.
138//
139// 0 Successful
140//
141// 1 Configuration error
142//
143// This error occurs with inconsistencies in configuration parameters, e.g., when the line is
144// initialized in an xDSL transmission system whose xTU does not support the configured maximum
145// delay or the configured minimum or maximum data rate for one or more bearer channels.
146//
147// 2 Configuration not feasible on the line
148//
149// This error occurs if the minimum data rate cannot be achieved on the line with the minimum noise
150// margin, maximum PSD level, maximum delay and maximum bit error ratio for one or more bearer
151// channels.
152//
153// 3 Communication problem
154//
155// This error occurs, for example, due to corrupted messages, bad syntax messages, if no common
156// mode can be selected in the ITUT-G.994.1 handshake procedure or due to a timeout.
157//
158// 4 No peer xTU detected
159//
160// This error occurs if the peer xTU is not powered or not connected or if the line is too long to
161// allow detection of a peer xTU.
162//
163// 5 Any other or unknown initialization failure cause.
164//
Chip Boling6e27b352020-02-14 09:10:01 -0600165type XdslLineInventoryAndStatusDataPart1 struct {
166 ManagedEntityDefinition
167 Attributes AttributeValueMap
168}
169
Chip Boling8cdd6392022-01-27 08:43:37 -0600170// Attribute name constants
171
172const XdslLineInventoryAndStatusDataPart1_XtuCG9941VendorId = "XtuCG9941VendorId"
173const XdslLineInventoryAndStatusDataPart1_XtuRG9941VendorId = "XtuRG9941VendorId"
174const XdslLineInventoryAndStatusDataPart1_XtuCSystemVendorId = "XtuCSystemVendorId"
175const XdslLineInventoryAndStatusDataPart1_XtuRSystemVendorId = "XtuRSystemVendorId"
176const XdslLineInventoryAndStatusDataPart1_XtuCVersionNumber = "XtuCVersionNumber"
177const XdslLineInventoryAndStatusDataPart1_XtuRVersionNumber = "XtuRVersionNumber"
178const XdslLineInventoryAndStatusDataPart1_XtuCSerialNumberPart1 = "XtuCSerialNumberPart1"
179const XdslLineInventoryAndStatusDataPart1_XtuCSerialNumberPart2 = "XtuCSerialNumberPart2"
180const XdslLineInventoryAndStatusDataPart1_XtuRSerialNumberPart1 = "XtuRSerialNumberPart1"
181const XdslLineInventoryAndStatusDataPart1_XtuRSerialNumberPart2 = "XtuRSerialNumberPart2"
182const XdslLineInventoryAndStatusDataPart1_XtuCSelfTestResults = "XtuCSelfTestResults"
183const XdslLineInventoryAndStatusDataPart1_XtuRSelfTestResults = "XtuRSelfTestResults"
184const XdslLineInventoryAndStatusDataPart1_XtuCTransmissionSystemCapability = "XtuCTransmissionSystemCapability"
185const XdslLineInventoryAndStatusDataPart1_XtuRTransmissionSystemCapability = "XtuRTransmissionSystemCapability"
186const XdslLineInventoryAndStatusDataPart1_InitializationSuccessFailureCause = "InitializationSuccessFailureCause"
187
Chip Boling6e27b352020-02-14 09:10:01 -0600188func init() {
189 xdsllineinventoryandstatusdatapart1BME = &ManagedEntityDefinition{
190 Name: "XdslLineInventoryAndStatusDataPart1",
Chip Boling8cdd6392022-01-27 08:43:37 -0600191 ClassID: XdslLineInventoryAndStatusDataPart1ClassID,
Chip Boling6e27b352020-02-14 09:10:01 -0600192 MessageTypes: mapset.NewSetWith(
193 Get,
194 ),
195 AllowedAttributeMask: 0xfffe,
196 AttributeDefinitions: AttributeDefinitionMap{
Chip Boling8cdd6392022-01-27 08:43:37 -0600197 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
198 1: Uint64Field(XdslLineInventoryAndStatusDataPart1_XtuCG9941VendorId, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
199 2: Uint64Field(XdslLineInventoryAndStatusDataPart1_XtuRG9941VendorId, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
200 3: Uint64Field(XdslLineInventoryAndStatusDataPart1_XtuCSystemVendorId, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
201 4: Uint64Field(XdslLineInventoryAndStatusDataPart1_XtuRSystemVendorId, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
202 5: MultiByteField(XdslLineInventoryAndStatusDataPart1_XtuCVersionNumber, OctetsAttributeType, 0x0800, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 5),
203 6: MultiByteField(XdslLineInventoryAndStatusDataPart1_XtuRVersionNumber, OctetsAttributeType, 0x0400, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 6),
204 7: MultiByteField(XdslLineInventoryAndStatusDataPart1_XtuCSerialNumberPart1, OctetsAttributeType, 0x0200, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 7),
205 8: MultiByteField(XdslLineInventoryAndStatusDataPart1_XtuCSerialNumberPart2, OctetsAttributeType, 0x0100, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 8),
206 9: MultiByteField(XdslLineInventoryAndStatusDataPart1_XtuRSerialNumberPart1, OctetsAttributeType, 0x0080, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 9),
207 10: MultiByteField(XdslLineInventoryAndStatusDataPart1_XtuRSerialNumberPart2, OctetsAttributeType, 0x0040, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 10),
208 11: Uint32Field(XdslLineInventoryAndStatusDataPart1_XtuCSelfTestResults, UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
209 12: Uint32Field(XdslLineInventoryAndStatusDataPart1_XtuRSelfTestResults, UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
210 13: MultiByteField(XdslLineInventoryAndStatusDataPart1_XtuCTransmissionSystemCapability, OctetsAttributeType, 0x0008, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 13),
211 14: MultiByteField(XdslLineInventoryAndStatusDataPart1_XtuRTransmissionSystemCapability, OctetsAttributeType, 0x0004, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 14),
212 15: ByteField(XdslLineInventoryAndStatusDataPart1_InitializationSuccessFailureCause, UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
Chip Boling6e27b352020-02-14 09:10:01 -0600213 },
214 Access: CreatedByOnu,
215 Support: UnknownSupport,
216 }
217}
218
219// NewXdslLineInventoryAndStatusDataPart1 (class ID 100) creates the basic
220// Managed Entity definition that is used to validate an ME of this type that
221// is received from or transmitted to the OMCC.
222func NewXdslLineInventoryAndStatusDataPart1(params ...ParamData) (*ManagedEntity, OmciErrors) {
223 return NewManagedEntity(*xdsllineinventoryandstatusdatapart1BME, params...)
224}