blob: 36eeea12b85072aa4886bf5cc8340ce3a22045cc [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 */
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
30const XdslLineInventoryAndStatusDataPart1ClassID ClassID = ClassID(100)
31
32var xdsllineinventoryandstatusdatapart1BME *ManagedEntityDefinition
33
34// XdslLineInventoryAndStatusDataPart1 (class ID #100)
35// 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
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// Xtu_C G.994.1 Vendor Id
49// 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
50// message. It comprises 8 octets, including a country code followed by a (regionally allocated)
51// provider code, as defined in [ITUT-T.35]. (R) (mandatory) (8-bytes)
52//
53// Xtu_R G.994.1 Vendor Id
54// 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
55// message. It comprises 8 binary octets, with the same format as the xTUC ITUT G.994.1 vendor ID.
56// (R) (mandatory) (8-bytes)
57//
58// Xtu_C System Vendor Id
59// xTU-C system vendor ID: This is the vendor ID as inserted by the xTU-C in the overhead messages
60// of [ITU-T G.992.3] and [ITU-T G.992.4]. It comprises 8 binary octets, with the same format as
61// the xTU-C ITUT-G.994.1 vendor ID. (R) (mandatory) (8-bytes)
62//
63// Xtu_R System Vendor Id
64// xTU-R system vendor ID: This is the vendor ID as inserted by the xTU-R in the embedded
65// operations channel and overhead messages of [ITU-T G.992.3] and [ITUT-G.992.4]. It comprises 8
66// binary octets, with the same format as the xTU-C ITUT-G.994.1 vendor ID. (R) (mandatory)
67// (8-bytes)
68//
69// Xtu_C Version Number
70// xTU-C version number: This is the vendorspecific version number as inserted by the xTUC in the
71// overhead messages of [ITU-T G.992.3] and [ITU-T G.992.4]. It comprises up to 16 binary octets.
72// (R) (mandatory) (16-bytes)
73//
74// Xtu_R Version Number
75// xTU-R version number: This is the version number as inserted by the xTUR in the embedded
76// operations channel of [ITU-T G.992.1] or [ITU-T G.992.2], or the overhead messages of [ITU-T
77// G.992.3], [ITU-T G.992.4], [ITU-T G.992.5] and [ITU-T G.993.2]. The attribute value may be
78// vendor-specific, but is recommended to comprise up to 16 ASCII characters, null-terminated if it
79// is shorter than 16. The string should contain the xTU-R firmware version and the xTU-R model,
80// encoded in that order and separated by a space character: "<xTU-R firmware version><xTU-R
81// model>". It is recognized that legacy xTU-Rs may not support this format. (R) (mandatory)
82// (16-bytes)
83//
84// Xtu_C Serial Number Part 1
85// xTU-C serial number part 1: The vendorspecific serial number inserted by the xTU-C in the
86// overhead messages of [ITU-T G.992.3] and [ITU-T G.992.4] comprises up to 32 ASCII characters,
87// null terminated if it is shorter than 32 characters. This attribute contains the first 16
88// characters. (R) (mandatory) (16-bytes)
89//
90// Xtu_C Serial Number Part 2
91// xTU-C serial number part 2: This attribute contains the second 16 characters of the xTU-C serial
92// number. (R) (mandatory) (16-bytes)
93//
94// Xtu_R Serial Number Part 1
95// xTU-R serial number part 1: The serial number inserted by the xTU-R in the embedded operations
96// channel of [ITU-T G.992.1] or [ITU-T G.992.2], or the overhead messages of [ITU-T G.992.3],
97// [ITU-T G.992.4], [ITU-T G.992.5] and [ITUT-G.993.2], comprises up to 32 ASCII characters,
98// nullterminated if it is shorter than 32. It is recommended that the equipment serial number, the
99// equipment model and the equipment firmware version, encoded in that order and separated by space
100// characters, be contained: "<equipment serial number><equipment model><equipment firmware
101// version>". It is recognized that legacy xTU-Rs may not support this format. This attribute
102// contains the first 16 characters. (R) (mandatory) (16-bytes)
103//
104// Xtu_R Serial Number Part 2
105// xTU-R serial number part 2: This attribute contains the second 16 characters of the xTU-R serial
106// number. (R) (mandatory) (16-bytes)
107//
108// Xtu_C Self Test Results
109// xTU-C selftest results: This parameter reports the xTU-C self-test result. It is coded in two
110// fields. The most significant octet is 0 if the self-test passed and 1 if it failed. The three
111// least significant octets are a vendor-discretionary integer that can be interpreted in
112// combination with [ITU-T G.994.1] and the system vendor ID. (R) (mandatory) (4-bytes)
113//
114// Xtu_R Self Test Results
115// xTU-R selftest results: This parameter defines the xTU-R self-test result. It is coded in two
116// fields. The most significant octet is 0 if the self-test passed and 1 if it failed. The three
117// least significant octets are a vendor-discretionary integer that can be interpreted in
118// combination with [ITU-T G.994.1] and the system vendor ID. (R) (mandatory) (4-bytes)
119//
120// Xtu_C Transmission System Capability
121// NOTE 1 - This attribute is only 7-bytes long. An eighth byte identifying VDSL2 capabilities is
122// defined in the VDSL2 line inventory and status data part 1 ME.
123//
124// Xtu_R Transmission System Capability
125// NOTE 2 - This attribute is only 7-bytes long. An eighth byte identifying VDSL2 capabilities is
126// defined in the VDSL2 line inventory and status data part 2 ME.
127//
128// Initialization Success_Failure Cause
129// (R) (mandatory) (1-byte)
130//
131type XdslLineInventoryAndStatusDataPart1 struct {
132 ManagedEntityDefinition
133 Attributes AttributeValueMap
134}
135
136func init() {
137 xdsllineinventoryandstatusdatapart1BME = &ManagedEntityDefinition{
138 Name: "XdslLineInventoryAndStatusDataPart1",
139 ClassID: 100,
140 MessageTypes: mapset.NewSetWith(
141 Get,
142 ),
143 AllowedAttributeMask: 0xfffe,
144 AttributeDefinitions: AttributeDefinitionMap{
145 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
146 1: Uint64Field("XtuCG9941VendorId", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
147 2: Uint64Field("XtuRG9941VendorId", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
148 3: Uint64Field("XtuCSystemVendorId", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
149 4: Uint64Field("XtuRSystemVendorId", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
150 5: MultiByteField("XtuCVersionNumber", OctetsAttributeType, 0x0800, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 5),
151 6: MultiByteField("XtuRVersionNumber", OctetsAttributeType, 0x0400, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 6),
152 7: MultiByteField("XtuCSerialNumberPart1", OctetsAttributeType, 0x0200, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 7),
153 8: MultiByteField("XtuCSerialNumberPart2", OctetsAttributeType, 0x0100, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 8),
154 9: MultiByteField("XtuRSerialNumberPart1", OctetsAttributeType, 0x0080, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 9),
155 10: MultiByteField("XtuRSerialNumberPart2", OctetsAttributeType, 0x0040, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 10),
156 11: Uint32Field("XtuCSelfTestResults", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
157 12: Uint32Field("XtuRSelfTestResults", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
158 13: MultiByteField("XtuCTransmissionSystemCapability", OctetsAttributeType, 0x0008, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 13),
159 14: MultiByteField("XtuRTransmissionSystemCapability", OctetsAttributeType, 0x0004, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 14),
160 15: ByteField("InitializationSuccessFailureCause", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
161 },
162 Access: CreatedByOnu,
163 Support: UnknownSupport,
164 }
165}
166
167// NewXdslLineInventoryAndStatusDataPart1 (class ID 100) creates the basic
168// Managed Entity definition that is used to validate an ME of this type that
169// is received from or transmitted to the OMCC.
170func NewXdslLineInventoryAndStatusDataPart1(params ...ParamData) (*ManagedEntity, OmciErrors) {
171 return NewManagedEntity(*xdsllineinventoryandstatusdatapart1BME, params...)
172}