blob: 5606c0d3912c88f04367e10088ac2d748aaab74b [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// AniGClassID is the 16-bit ID for the OMCI
26// Managed entity ANI-G
27const AniGClassID ClassID = ClassID(263)
28
29var anigBME *ManagedEntityDefinition
30
31// AniG (class ID #263)
32// This ME organizes data associated with each access network interface supported by a GPON ONU.
33// The ONU automatically creates one instance of this ME for each PON physical port.
34//
35// Relationships
36// An instance of this ME is associated with each instance of a physical PON interface.
37//
38// Attributes
39// Managed Entity Id
40// Managed entity ID: This attribute uniquely identifies each instance of this ME. Its value
41// indicates the physical position of the PON interface. The first byte is the slot ID, defined in
42// clause 9.1.5. The second byte is the port ID. (R) (mandatory) (2-bytes)
43//
44// Sr Indication
45// SR indication: This Boolean attribute indicates the ONU's capability to report queue status for
46// DBA. The value true means that status reporting is available for all TCONTs that are associated
47// with the ANI. (R) (mandatory) (1-byte)
48//
49// Total TCont Number
50// Total TCONT number: This attribute indicates the total number of T-CONTs that can be supported
51// on this ANI. (R) (mandatory) (2-bytes)
52//
53// Gem Block Length
54// In all other ITU-T PON systems, the unit for queue occupancy reporting is fixed in at 4-bytes by
55// the respective TC layer specification.
56//
57// Piggyback Dba Reporting
58// (R) (mandatory) (1-byte)
59//
60// Deprecated
61// Deprecated: This attribute should be set to 0 by the ONU and ignored by the OLT. (R) (mandatory)
62// (1-byte)
63//
64// Signal Fail Threshold
65// Signal fail (SF) threshold: This attribute specifies the downstream bit error rate (BER)
66// threshold to detect the SF alarm. When this value is y, the BER threshold is 10-y. Valid values
67// are 3..8. Upon ME instantiation, the ONU sets this attribute to 5. (R,-W) (mandatory) (1-byte)
68//
69// Signal Degrade Threshold
70// Signal degrade (SD) threshold: This attribute specifies the downstream BER threshold to detect
71// the SD alarm. When this value is x, the BER threshold for SD is 10-x. Valid values are 4..10.
72// The SD threshold must be lower than the SF threshold; i.e., x-> y. Upon ME instantiation, the
73// ONU sets this attribute to 9. (R,-W) (mandatory) (1-byte)
74//
75// Arc
76// ARC: See clause A.1.4.3. (R,-W) (optional) (1-byte)
77//
78// Arc Interval
79// ARC interval: See clause A.1.4.3. (R,-W) (optional) (1-byte)
80//
81// Optical Signal Level
82// Optical signal level: This attribute reports the current measurement of the total downstream
83// optical signal level. Its value is a 2s complement integer referred to 1- mW (i.e., 1-dBm), with
84// 0.002 dB granularity. (R) (optional) (2-bytes)
85//
86// Lower Optical Threshold
87// Lower optical threshold: This attribute specifies the optical level the ONU uses to declare the
88// downstream low received optical power alarm. Valid values are -127 dBm (coded as 254) to 0 dBm
89// (coded as 0) in 0.5 dB increments. The default value 0xFF selects the ONU's internal policy.
90// (R,-W) (optional) (1-byte)
91//
92// Upper Optical Threshold
93// Upper optical threshold: This attribute specifies the optical level the ONU uses to declare the
94// downstream high received optical power alarm. Valid values are -127 dBm (coded as 254) to 0 dBm
95// (coded as 0) in 0.5 dB increments. The default value 0xFF selects the ONU's internal policy.
96// (R,-W) (optional) (1-byte)
97//
98// Onu Response Time
99// (R) (optional) (2-bytes)
100//
101// Transmit Optical Level
102// Transmit optical level: This attribute reports the current measurement of mean optical launch
103// power. Its value is a 2s complement integer referred to 1-mW (i.e., 1-dBm), with 0.002 dB
104// granularity. (R) (optional) (2-bytes)
105//
106// Lower Transmit Power Threshold
107// Lower transmit power threshold: This attribute specifies the minimum mean optical launch power
108// that the ONU uses to declare the low transmit optical power alarm. Its value is a 2s complement
109// integer referred to 1-mW (i.e., dBm), with 0.5-dB granularity. The default value -63.5 (0x81)
110// selects the ONU's internal policy. (R,-W) (optional) (1-byte)
111//
112// Upper Transmit Power Threshold
113// Upper transmit power threshold: This attribute specifies the maximum mean optical launch power
114// that the ONU uses to declare the high transmit optical power alarm. Its value is a 2s complement
115// integer referred to 1-mW (i.e., dBm), with 0.5-dB granularity. The default value -63.5 (0x81)
116// selects the ONU's internal policy. (R,-W) (optional) (1-byte)
117//
118type AniG struct {
119 ManagedEntityDefinition
120 Attributes AttributeValueMap
121}
122
123func init() {
124 anigBME = &ManagedEntityDefinition{
125 Name: "AniG",
126 ClassID: 263,
127 MessageTypes: mapset.NewSetWith(
128 Get,
129 Set,
130 Test,
131 ),
132 AllowedAttributeMask: 0xffff,
133 AttributeDefinitions: AttributeDefinitionMap{
134 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
135 1: ByteField("SrIndication", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
136 2: Uint16Field("TotalTcontNumber", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
137 3: Uint16Field("GemBlockLength", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
138 4: ByteField("PiggybackDbaReporting", EnumerationAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
139 5: ByteField("Deprecated", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, true, 5),
140 6: ByteField("SignalFailThreshold", UnsignedIntegerAttributeType, 0x0400, 5, mapset.NewSetWith(Read, Write), false, false, false, 6),
141 7: ByteField("SignalDegradeThreshold", UnsignedIntegerAttributeType, 0x0200, 9, mapset.NewSetWith(Read, Write), false, false, false, 7),
142 8: ByteField("Arc", EnumerationAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), true, true, false, 8),
143 9: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
144 10: Uint16Field("OpticalSignalLevel", SignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
145 11: ByteField("LowerOpticalThreshold", SignedIntegerAttributeType, 0x0020, 255, mapset.NewSetWith(Read, Write), false, true, false, 11),
146 12: ByteField("UpperOpticalThreshold", SignedIntegerAttributeType, 0x0010, 255, mapset.NewSetWith(Read, Write), false, true, false, 12),
147 13: Uint16Field("OnuResponseTime", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, true, false, 13),
148 14: Uint16Field("TransmitOpticalLevel", SignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, true, false, 14),
149 15: ByteField("LowerTransmitPowerThreshold", SignedIntegerAttributeType, 0x0002, 129, mapset.NewSetWith(Read, Write), false, true, false, 15),
150 16: ByteField("UpperTransmitPowerThreshold", SignedIntegerAttributeType, 0x0001, 129, mapset.NewSetWith(Read, Write), false, true, false, 16),
151 },
152 Access: CreatedByOnu,
153 Support: UnknownSupport,
154 }
155}
156
157// NewAniG (class ID 263) creates the basic
158// Managed Entity definition that is used to validate an ME of this type that
159// is received from or transmitted to the OMCC.
160func NewAniG(params ...ParamData) (*ManagedEntity, OmciErrors) {
161 return NewManagedEntity(*anigBME, params...)
162}