blob: bec4bb44f7a5bb86835400a86d4155fd4fa06231 [file] [log] [blame]
mpagenko836a1fd2021-11-01 16:12:42 +00001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00004 *
mpagenko836a1fd2021-11-01 16:12:42 +00005 * 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
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00008 *
mpagenko836a1fd2021-11-01 16:12:42 +00009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
mpagenko836a1fd2021-11-01 16:12:42 +000011 * 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 */
17/*
18 * 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
30const AniGClassID = ClassID(263) // 0x0107
31
32var anigBME *ManagedEntityDefinition
33
34// AniG (Class ID: #263 / 0x0107)
35// 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
43// 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)
46//
47// Sr Indication
48// 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)
51//
52// Total TCont Number
53// This attribute indicates the total number of T-CONTs that can be supported on this ANI. (R)
54// (mandatory) (2-bytes)
55//
56// Gem Block Length
57// 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//
63// 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
67// 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//
85// (R) (mandatory) (1-byte)
86//
87// Deprecated
88// This attribute should be set to 0 by the ONU and ignored by the OLT. (R) (mandatory) (1-byte)
89//
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
102// See clause A.1.4.3. (R,-W) (optional) (1-byte)
103//
104// Arc Interval
105// See clause A.1.4.3. (R,-W) (optional) (1-byte)
106//
107// Optical Signal Level
108// 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)
111//
112// Lower Optical Threshold
113// 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)
116//
117// Upper Optical Threshold
118// 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)
121//
122// Onu Response Time
123// 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//
134// (R) (optional) (2-bytes)
135//
136// Transmit Optical Level
137// 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)
140//
141// Lower Transmit Power Threshold
142// 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)
146//
147// Upper Transmit Power Threshold
148// 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)
152//
153type AniG struct {
154 ManagedEntityDefinition
155 Attributes AttributeValueMap
156}
157
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000158// Attribute name constants
159
160const AniG_SrIndication = "SrIndication"
161const AniG_TotalTcontNumber = "TotalTcontNumber"
162const AniG_GemBlockLength = "GemBlockLength"
163const AniG_PiggybackDbaReporting = "PiggybackDbaReporting"
164const AniG_Deprecated = "Deprecated"
165const AniG_SignalFailThreshold = "SignalFailThreshold"
166const AniG_SignalDegradeThreshold = "SignalDegradeThreshold"
167const AniG_Arc = "Arc"
168const AniG_ArcInterval = "ArcInterval"
169const AniG_OpticalSignalLevel = "OpticalSignalLevel"
170const AniG_LowerOpticalThreshold = "LowerOpticalThreshold"
171const AniG_UpperOpticalThreshold = "UpperOpticalThreshold"
172const AniG_OnuResponseTime = "OnuResponseTime"
173const AniG_TransmitOpticalLevel = "TransmitOpticalLevel"
174const AniG_LowerTransmitPowerThreshold = "LowerTransmitPowerThreshold"
175const AniG_UpperTransmitPowerThreshold = "UpperTransmitPowerThreshold"
176
mpagenko836a1fd2021-11-01 16:12:42 +0000177func init() {
178 anigBME = &ManagedEntityDefinition{
179 Name: "AniG",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000180 ClassID: AniGClassID,
mpagenko836a1fd2021-11-01 16:12:42 +0000181 MessageTypes: mapset.NewSetWith(
182 Get,
183 Set,
184 Test,
185 ),
186 AllowedAttributeMask: 0xffff,
187 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000188 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
189 1: ByteField(AniG_SrIndication, EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
190 2: Uint16Field(AniG_TotalTcontNumber, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
191 3: Uint16Field(AniG_GemBlockLength, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
192 4: ByteField(AniG_PiggybackDbaReporting, EnumerationAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
193 5: ByteField(AniG_Deprecated, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, true, 5),
194 6: ByteField(AniG_SignalFailThreshold, UnsignedIntegerAttributeType, 0x0400, 5, mapset.NewSetWith(Read, Write), false, false, false, 6),
195 7: ByteField(AniG_SignalDegradeThreshold, UnsignedIntegerAttributeType, 0x0200, 9, mapset.NewSetWith(Read, Write), false, false, false, 7),
196 8: ByteField(AniG_Arc, EnumerationAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), true, true, false, 8),
197 9: ByteField(AniG_ArcInterval, UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
198 10: Uint16Field(AniG_OpticalSignalLevel, SignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
199 11: ByteField(AniG_LowerOpticalThreshold, SignedIntegerAttributeType, 0x0020, 255, mapset.NewSetWith(Read, Write), false, true, false, 11),
200 12: ByteField(AniG_UpperOpticalThreshold, SignedIntegerAttributeType, 0x0010, 255, mapset.NewSetWith(Read, Write), false, true, false, 12),
201 13: Uint16Field(AniG_OnuResponseTime, UnsignedIntegerAttributeType, 0x0008, 35000, mapset.NewSetWith(Read), false, true, false, 13),
202 14: Uint16Field(AniG_TransmitOpticalLevel, SignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, true, false, 14),
203 15: ByteField(AniG_LowerTransmitPowerThreshold, SignedIntegerAttributeType, 0x0002, 129, mapset.NewSetWith(Read, Write), false, true, false, 15),
204 16: ByteField(AniG_UpperTransmitPowerThreshold, SignedIntegerAttributeType, 0x0001, 129, mapset.NewSetWith(Read, Write), false, true, false, 16),
mpagenko836a1fd2021-11-01 16:12:42 +0000205 },
206 Access: CreatedByOnu,
207 Support: UnknownSupport,
208 Alarms: AlarmMap{
209 0: "Low received optical power",
210 1: "High received optical power",
211 2: "SF",
212 3: "SD",
213 4: "Low transmit optical power",
214 5: "High transmit optical power",
215 6: "Laser bias current",
216 },
217 }
218}
219
220// NewAniG (class ID 263) creates the basic
221// Managed Entity definition that is used to validate an ME of this type that
222// is received from or transmitted to the OMCC.
223func NewAniG(params ...ParamData) (*ManagedEntity, OmciErrors) {
224 return NewManagedEntity(*anigBME, params...)
225}