blob: 393ae25855d6641ee5c513ac1b1351df7a91df33 [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Matteo Scandolof9d43412021-01-12 11:11:34 -08003 * Copyright 2020-present Open Networking Foundation
Elia Battiston9bfe1102022-02-03 10:38:03 +01004 *
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07005 * 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
Elia Battiston9bfe1102022-02-03 10:38:03 +01008 *
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07009 * http://www.apache.org/licenses/LICENSE-2.0
Elia Battiston9bfe1102022-02-03 10:38:03 +010010 *
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070011 * 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 */
Girish Gowdra161d27a2021-05-05 12:01:44 -070017/*
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070018 * 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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080023
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070024package generated
25
26import "github.com/deckarep/golang-set"
27
Matteo Scandolof9d43412021-01-12 11:11:34 -080028// XdslLineInventoryAndStatusDataPart1ClassID is the 16-bit ID for the OMCI
29// Managed entity xDSL line inventory and status data part 1
Andrea Campanella10426e22021-10-15 17:58:04 +020030const XdslLineInventoryAndStatusDataPart1ClassID = ClassID(100) // 0x0064
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
32var xdsllineinventoryandstatusdatapart1BME *ManagedEntityDefinition
33
Andrea Campanella10426e22021-10-15 17:58:04 +020034// XdslLineInventoryAndStatusDataPart1 (Class ID: #100 / 0x0064)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070035// 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
Andrea Campanella10426e22021-10-15 17:58:04 +020044// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070046//
47// Xtu_C G.994.1 Vendor Id
Matteo Scandolof9d43412021-01-12 11:11:34 -080048// 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
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070049// message. It comprises 8 octets, including a country code followed by a (regionally allocated)
Matteo Scandolof9d43412021-01-12 11:11:34 -080050// provider code, as defined in [ITUT-T.35]. (R) (mandatory) (8-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070051//
52// Xtu_R G.994.1 Vendor Id
Matteo Scandolof9d43412021-01-12 11:11:34 -080053// 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
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070054// message. It comprises 8 binary octets, with the same format as the xTUC ITUT G.994.1 vendor ID.
Matteo Scandolof9d43412021-01-12 11:11:34 -080055// (R) (mandatory) (8-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070056//
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
Matteo Scandolof9d43412021-01-12 11:11:34 -080060// the xTU-C ITUT-G.994.1 vendor ID. (R) (mandatory) (8-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070061//
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
Matteo Scandolof9d43412021-01-12 11:11:34 -080064// 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)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070067//
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.
Matteo Scandolof9d43412021-01-12 11:11:34 -080071// (R) (mandatory) (16-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070072//
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)
Matteo Scandolof9d43412021-01-12 11:11:34 -080081// (16-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070082//
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
Matteo Scandolof9d43412021-01-12 11:11:34 -080087// characters. (R) (mandatory) (16-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070088//
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
Matteo Scandolof9d43412021-01-12 11:11:34 -080091// number. (R) (mandatory) (16-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070092//
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],
Matteo Scandolof9d43412021-01-12 11:11:34 -080096// [ITU-T G.992.4], [ITU-T G.992.5] and [ITUT-G.993.2], comprises up to 32 ASCII characters,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070097// 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
Matteo Scandolof9d43412021-01-12 11:11:34 -0800101// contains the first 16 characters. (R) (mandatory) (16-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700102//
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
Matteo Scandolof9d43412021-01-12 11:11:34 -0800105// number. (R) (mandatory) (16-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700106//
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
Matteo Scandolof9d43412021-01-12 11:11:34 -0800111// combination with [ITU-T G.994.1] and the system vendor ID. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700112//
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
Matteo Scandolof9d43412021-01-12 11:11:34 -0800117// combination with [ITU-T G.994.1] and the system vendor ID. (R) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700118//
119// Xtu_C Transmission System Capability
Andrea Campanella10426e22021-10-15 17:58:04 +0200120// 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//
Matteo Scandolof9d43412021-01-12 11:11:34 -0800123// NOTE 1 - This attribute is only 7-bytes long. An eighth byte identifying VDSL2 capabilities is
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700124// defined in the VDSL2 line inventory and status data part 1 ME.
125//
126// Xtu_R Transmission System Capability
Andrea Campanella10426e22021-10-15 17:58:04 +0200127// 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//
Matteo Scandolof9d43412021-01-12 11:11:34 -0800130// NOTE 2 - This attribute is only 7-bytes long. An eighth byte identifying VDSL2 capabilities is
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700131// defined in the VDSL2 line inventory and status data part 2 ME.
132//
133// Initialization Success_Failure Cause
Matteo Scandolof9d43412021-01-12 11:11:34 -0800134// (R) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700135//
Andrea Campanella10426e22021-10-15 17:58:04 +0200136// 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//
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700165type XdslLineInventoryAndStatusDataPart1 struct {
166 ManagedEntityDefinition
167 Attributes AttributeValueMap
168}
169
Elia Battiston9bfe1102022-02-03 10:38:03 +0100170// 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
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700188func init() {
189 xdsllineinventoryandstatusdatapart1BME = &ManagedEntityDefinition{
190 Name: "XdslLineInventoryAndStatusDataPart1",
Elia Battiston9bfe1102022-02-03 10:38:03 +0100191 ClassID: XdslLineInventoryAndStatusDataPart1ClassID,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700192 MessageTypes: mapset.NewSetWith(
193 Get,
194 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -0800195 AllowedAttributeMask: 0xfffe,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700196 AttributeDefinitions: AttributeDefinitionMap{
Elia Battiston9bfe1102022-02-03 10:38:03 +0100197 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),
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700213 },
Matteo Scandolof9d43412021-01-12 11:11:34 -0800214 Access: CreatedByOnu,
215 Support: UnknownSupport,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700216 }
217}
218
Matteo Scandolof9d43412021-01-12 11:11:34 -0800219// NewXdslLineInventoryAndStatusDataPart1 (class ID 100) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700220// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -0800221// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700222func NewXdslLineInventoryAndStatusDataPart1(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800223 return NewManagedEntity(*xdsllineinventoryandstatusdatapart1BME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700224}