blob: ebad3bef1ec1741fb5c6953e6b145056f46720ba [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
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 */
20package generated
21
22import "github.com/deckarep/golang-set"
23
24const Onu2GClassId ClassID = ClassID(257)
25
26var onu2gBME *ManagedEntityDefinition
27
28// Onu2G (class ID #257)
29// This ME contains additional attributes associated with a PON ONU. The ONU automatically creates
30// an instance of this ME. Its attributes are populated according to data within the ONU itself.
31//
32// This ME is the same as the ONT2-G of [ITUT G.984.4], with extensions.
33//
34// Relationships
35// This ME is paired with the ONU-G entity.
36//
37// Attributes
38// Managed Entity Id
39// Managed entity ID: This attribute uniquely identifies each instance of this ME. There is only
40// one instance, number 0. (R) (mandatory) (2 bytes)
41//
42// Equipment Id
43// Equipment ID: This attribute may be used to identify the specific type of ONU. In some
44// environments, this attribute may include the common language equipment identification (CLEI)
45// code. (R) (optional) (20 bytes)
46//
47// Optical Network Unit Management And Control Channel Omcc Version
48// (R) (mandatory) (1 byte)
49//
50// Vendor Product Code
51// Vendor product code: This attribute contains a vendor-specific product code for the ONU. (R)
52// (optional) (2 bytes)
53//
54// Security Capability
55// (R) (mandatory) (1 byte)
56//
57// Security Mode
58// Upon ME instantiation, the ONU sets this attribute to 1, AES-128. Attribute value 1 does not
59// imply that any channels are encrypted; that process is negotiated at the PLOAM layer. It only
60// signifies that the advanced encryption standard (AES) with 128 bit keys is the security mode to
61// be used on any channels that the OLT may choose to encrypt. (R, W) (mandatory) (1 byte)
62//
63// Total Priority Queue Number
64// Total priority queue number: This attribute reports the total number of upstream priority queues
65// that are not associated with a circuit pack, but with the ONU in its entirety. Upon ME
66// instantiation, the ONU sets this attribute to the value that represents its capabilities. (R)
67// (mandatory) (2 bytes)
68//
69// Total Traffic Scheduler Number
70// Total traffic scheduler number: This attribute reports the total number of traffic schedulers
71// that are not associated with a circuit pack, but with the ONU in its entirety. The ONU supports
72// null function, strict priority scheduling and weighted round robin (WRR) from the priority
73// control and guarantee of minimum rate control points of view, respectively. If the ONU has no
74// global traffic schedulers, this attribute is 0. (R) (mandatory) (1 byte)
75//
76// Deprecated
77// Deprecated: This attribute should always be set to 1 by the ONU and ignored by the OLT. (R)
78// (mandatory) (1 byte)
79//
80// Total Gem Port_Id Number
81// Total GEM port-ID number: This attribute reports the total number of GEM port-IDs supported by
82// the ONU. The maximum value is specified in the corresponding TC recommendations. Upon ME
83// instantiation, the ONU sets this attribute to the value that represents its capabilities. (R)
84// (optional) (2 bytes)
85//
86// Sysuptime
87// SysUpTime: This attribute counts 10 ms intervals since the ONU was last initialized. It rolls
88// over to 0 when full (see [IETF RFC 1213]). (R) (optional) (4 bytes)
89//
90// Connectivity Capability
91// (R) (optional) (2 bytes)
92//
93// Current Connectivity Mode
94// (R, W) (optional) (1 byte)
95//
96// Quality Of Service Qos Configuration Flexibility
97// The ME ID of both the T-CONT and traffic scheduler contains a slot number. Even when attributes
98// in the above list are RW, it is never permitted to change the slot number in a reference. That
99// is, configuration flexibility never extends across slots. It is also not permitted to change the
100// directionality of an upstream queue to downstream or vice versa.
101//
102// Priority Queue Scale Factor
103// NOTE 3 – Some legacy implementations may take the queue scale factor from the GEM block length
104// attribute of the ANI-G ME. That option is discouraged in new implementations.
105//
106type Onu2G struct {
107 ManagedEntityDefinition
108 Attributes AttributeValueMap
109}
110
111func init() {
112 onu2gBME = &ManagedEntityDefinition{
113 Name: "Onu2G",
114 ClassID: 257,
115 MessageTypes: mapset.NewSetWith(
116 Get,
117 Set,
118 ),
119 AllowedAttributeMask: 0XFFFC,
120 AttributeDefinitions: AttributeDefinitionMap{
121 0: Uint16Field("ManagedEntityId", 0, mapset.NewSetWith(Read), false, false, false, false, 0),
122 1: MultiByteField("EquipmentId", 20, nil, mapset.NewSetWith(Read), false, false, true, false, 1),
123 2: ByteField("OpticalNetworkUnitManagementAndControlChannelOmccVersion", 0, mapset.NewSetWith(Read), true, false, false, false, 2),
124 3: Uint16Field("VendorProductCode", 0, mapset.NewSetWith(Read), false, false, true, false, 3),
125 4: ByteField("SecurityCapability", 0, mapset.NewSetWith(Read), false, false, false, false, 4),
126 5: ByteField("SecurityMode", 0, mapset.NewSetWith(Read, Write), false, false, false, false, 5),
127 6: Uint16Field("TotalPriorityQueueNumber", 0, mapset.NewSetWith(Read), false, false, false, false, 6),
128 7: ByteField("TotalTrafficSchedulerNumber", 0, mapset.NewSetWith(Read), false, false, false, false, 7),
129 8: ByteField("Deprecated", 0, mapset.NewSetWith(Read), false, false, false, true, 8),
130 9: Uint16Field("TotalGemPortIdNumber", 0, mapset.NewSetWith(Read), false, false, true, false, 9),
131 10: Uint32Field("Sysuptime", 0, mapset.NewSetWith(Read), false, false, true, false, 10),
132 11: Uint16Field("ConnectivityCapability", 0, mapset.NewSetWith(Read), false, false, true, false, 11),
133 12: ByteField("CurrentConnectivityMode", 0, mapset.NewSetWith(Read, Write), false, false, true, false, 12),
134 13: Uint16Field("QualityOfServiceQosConfigurationFlexibility", 0, mapset.NewSetWith(Read), false, false, true, false, 13),
135 14: Uint16Field("PriorityQueueScaleFactor", 0, mapset.NewSetWith(Read, Write), false, false, true, false, 14),
136 },
137 }
138}
139
140// NewOnu2G (class ID 257 creates the basic
141// Managed Entity definition that is used to validate an ME of this type that
142// is received from the wire, about to be sent on the wire.
143func NewOnu2G(params ...ParamData) (*ManagedEntity, OmciErrors) {
144 return NewManagedEntity(onu2gBME, params...)
145}