blob: 0e13c5cfb46e7140f8ad03d97c956fdcf69a27e1 [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 */
Chip Boling34ebcb62021-02-02 12:13:58 -060017/*
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// AniGClassID is the 16-bit ID for the OMCI
29// Managed entity ANI-G
Chip Boling610117d2021-09-09 11:24:34 -050030const AniGClassID = ClassID(263) // 0x0107
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var anigBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// AniG (Class ID: #263 / 0x0107)
Chip Boling6e27b352020-02-14 09:10:01 -060035// This ME organizes data associated with each access network interface supported by a GPON ONU.
36// The ONU automatically creates one instance of this ME for each PON physical port.
37//
38// Relationships
39// An instance of this ME is associated with each instance of a physical PON interface.
40//
41// Attributes
42// Managed Entity Id
Chip Boling610117d2021-09-09 11:24:34 -050043// This attribute uniquely identifies each instance of this ME. Its value indicates the physical
44// position of the PON interface. The first byte is the slot ID, defined in clause 9.1.5. The
45// second byte is the port ID. (R) (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060046//
47// Sr Indication
Chip Boling610117d2021-09-09 11:24:34 -050048// This Boolean attribute indicates the ONU's capability to report queue status for DBA. The value
49// true means that status reporting is available for all TCONTs that are associated with the ANI.
50// (R) (mandatory) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -060051//
52// Total TCont Number
Chip Boling610117d2021-09-09 11:24:34 -050053// This attribute indicates the total number of T-CONTs that can be supported on this ANI. (R)
54// (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060055//
56// Gem Block Length
Chip Boling610117d2021-09-09 11:24:34 -050057// This attribute specifies the queue occupancy reporting granularity for DBA, expressed in bytes.
58// This attribute is meaningful only in ITUT G.984.x systems. (R, W) (mandatory) (2 bytes)
59//
60// In ITU-T G.984 systems, the value set by the OLT is used by all TCONTs on this ANI. Upon ME
61// instantiation, the ONU sets this attribute to 48. See [ITUT G.984.3] for further details.
62//
Chip Boling6e27b352020-02-14 09:10:01 -060063// In all other ITU-T PON systems, the unit for queue occupancy reporting is fixed in at 4-bytes by
64// the respective TC layer specification.
65//
66// Piggyback Dba Reporting
Chip Boling610117d2021-09-09 11:24:34 -050067// This attribute indicates the ONU's piggyback DBA reporting format capabilities. [ITUT G.984.3]
68// defines two possible piggyback reporting modes. For reporting mode 0, the single field is the
69// entire report. For reporting mode 1, the DBA report is two fields long. Mode 0 is mandatory for
70// ITU-T G.984 ONUs that support piggyback DBA reporting; mode 1 is optional. Subsequent PON
71// specifications allows only one mode, which should be reported in this attribute as code point 0.
72//
73// The following coding indicates the ONU's piggyback DBA reporting mode capabilities:
74//
75// 0 Mode 0 only
76//
77// 1 Modes 0 and 1
78//
79// 2 Deprecated
80//
81// 3 Deprecated
82//
83// 4 Piggyback DBA reporting not supported
84//
Chip Boling6e27b352020-02-14 09:10:01 -060085// (R) (mandatory) (1-byte)
86//
87// Deprecated
Chip Boling610117d2021-09-09 11:24:34 -050088// This attribute should be set to 0 by the ONU and ignored by the OLT. (R) (mandatory) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -060089//
90// Signal Fail Threshold
91// Signal fail (SF) threshold: This attribute specifies the downstream bit error rate (BER)
92// threshold to detect the SF alarm. When this value is y, the BER threshold is 10-y. Valid values
93// are 3..8. Upon ME instantiation, the ONU sets this attribute to 5. (R,-W) (mandatory) (1-byte)
94//
95// Signal Degrade Threshold
96// Signal degrade (SD) threshold: This attribute specifies the downstream BER threshold to detect
97// the SD alarm. When this value is x, the BER threshold for SD is 10-x. Valid values are 4..10.
98// The SD threshold must be lower than the SF threshold; i.e., x-> y. Upon ME instantiation, the
99// ONU sets this attribute to 9. (R,-W) (mandatory) (1-byte)
100//
101// Arc
Chip Boling610117d2021-09-09 11:24:34 -0500102// See clause A.1.4.3. (R,-W) (optional) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -0600103//
104// Arc Interval
Chip Boling610117d2021-09-09 11:24:34 -0500105// See clause A.1.4.3. (R,-W) (optional) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -0600106//
107// Optical Signal Level
Chip Boling610117d2021-09-09 11:24:34 -0500108// This attribute reports the current measurement of the total downstream optical signal level. Its
109// value is a 2s complement integer referred to 1- mW (i.e., 1-dBm), with 0.002 dB granularity. (R)
110// (optional) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600111//
112// Lower Optical Threshold
Chip Boling610117d2021-09-09 11:24:34 -0500113// This attribute specifies the optical level the ONU uses to declare the downstream low received
114// optical power alarm. Valid values are -127 dBm (coded as 254) to 0 dBm (coded as 0) in 0.5 dB
115// increments. The default value 0xFF selects the ONU's internal policy. (R,-W) (optional) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -0600116//
117// Upper Optical Threshold
Chip Boling610117d2021-09-09 11:24:34 -0500118// This attribute specifies the optical level the ONU uses to declare the downstream high received
119// optical power alarm. Valid values are -127 dBm (coded as 254) to 0 dBm (coded as 0) in 0.5 dB
120// increments. The default value 0xFF selects the ONU's internal policy. (R,-W) (optional) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -0600121//
122// Onu Response Time
Chip Boling610117d2021-09-09 11:24:34 -0500123// This attribute indicates the ONU's actual response time. This attribute is in the range
124// 34..36-us. Although this attribute is expressed in nanoseconds, its accuracy is likely to be
125// more coarse. Furthermore, the value may change from one activation cycle to the next. Valid
126// values are:
127//
128// 0 (Null, function not supported)
129//
130// 34000 to 36000 (response time in nanoseconds)
131//
132// All other values reserved
133//
Chip Boling6e27b352020-02-14 09:10:01 -0600134// (R) (optional) (2-bytes)
135//
136// Transmit Optical Level
Chip Boling610117d2021-09-09 11:24:34 -0500137// This attribute reports the current measurement of mean optical launch power. Its value is a 2s
138// complement integer referred to 1-mW (i.e., 1-dBm), with 0.002 dB granularity. (R) (optional)
139// (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600140//
141// Lower Transmit Power Threshold
Chip Boling610117d2021-09-09 11:24:34 -0500142// This attribute specifies the minimum mean optical launch power that the ONU uses to declare the
143// low transmit optical power alarm. Its value is a 2s complement integer referred to 1-mW (i.e.,
144// dBm), with 0.5-dB granularity. The default value -63.5 (0x81) selects the ONU's internal policy.
145// (R,-W) (optional) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -0600146//
147// Upper Transmit Power Threshold
Chip Boling610117d2021-09-09 11:24:34 -0500148// This attribute specifies the maximum mean optical launch power that the ONU uses to declare the
149// high transmit optical power alarm. Its value is a 2s complement integer referred to 1-mW (i.e.,
150// dBm), with 0.5-dB granularity. The default value -63.5 (0x81) selects the ONU's internal policy.
151// (R,-W) (optional) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -0600152//
153type AniG struct {
154 ManagedEntityDefinition
155 Attributes AttributeValueMap
156}
157
158func init() {
159 anigBME = &ManagedEntityDefinition{
160 Name: "AniG",
161 ClassID: 263,
162 MessageTypes: mapset.NewSetWith(
163 Get,
164 Set,
165 Test,
166 ),
167 AllowedAttributeMask: 0xffff,
168 AttributeDefinitions: AttributeDefinitionMap{
169 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
170 1: ByteField("SrIndication", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
171 2: Uint16Field("TotalTcontNumber", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
172 3: Uint16Field("GemBlockLength", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
173 4: ByteField("PiggybackDbaReporting", EnumerationAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
174 5: ByteField("Deprecated", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, true, 5),
175 6: ByteField("SignalFailThreshold", UnsignedIntegerAttributeType, 0x0400, 5, mapset.NewSetWith(Read, Write), false, false, false, 6),
176 7: ByteField("SignalDegradeThreshold", UnsignedIntegerAttributeType, 0x0200, 9, mapset.NewSetWith(Read, Write), false, false, false, 7),
177 8: ByteField("Arc", EnumerationAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), true, true, false, 8),
178 9: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
179 10: Uint16Field("OpticalSignalLevel", SignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
180 11: ByteField("LowerOpticalThreshold", SignedIntegerAttributeType, 0x0020, 255, mapset.NewSetWith(Read, Write), false, true, false, 11),
181 12: ByteField("UpperOpticalThreshold", SignedIntegerAttributeType, 0x0010, 255, mapset.NewSetWith(Read, Write), false, true, false, 12),
Chip Boling610117d2021-09-09 11:24:34 -0500182 13: Uint16Field("OnuResponseTime", UnsignedIntegerAttributeType, 0x0008, 35000, mapset.NewSetWith(Read), false, true, false, 13),
Chip Boling6e27b352020-02-14 09:10:01 -0600183 14: Uint16Field("TransmitOpticalLevel", SignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, true, false, 14),
184 15: ByteField("LowerTransmitPowerThreshold", SignedIntegerAttributeType, 0x0002, 129, mapset.NewSetWith(Read, Write), false, true, false, 15),
185 16: ByteField("UpperTransmitPowerThreshold", SignedIntegerAttributeType, 0x0001, 129, mapset.NewSetWith(Read, Write), false, true, false, 16),
186 },
187 Access: CreatedByOnu,
188 Support: UnknownSupport,
Chip Boling34ebcb62021-02-02 12:13:58 -0600189 Alarms: AlarmMap{
190 0: "Low received optical power",
191 1: "High received optical power",
192 2: "SF",
193 3: "SD",
194 4: "Low transmit optical power",
195 5: "High transmit optical power",
196 6: "Laser bias current",
197 },
Chip Boling6e27b352020-02-14 09:10:01 -0600198 }
199}
200
201// NewAniG (class ID 263) creates the basic
202// Managed Entity definition that is used to validate an ME of this type that
203// is received from or transmitted to the OMCC.
204func NewAniG(params ...ParamData) (*ManagedEntity, OmciErrors) {
205 return NewManagedEntity(*anigBME, params...)
206}