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