blob: 4173e7343c2863ba826a57c2e16e1cf26a2ea5fb [file] [log] [blame]
Holger Hildebrandtfa074992020-03-27 15:42:06 +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 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +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 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +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 */
Himani Chawlaac1f5ad2021-02-04 21:21:54 +053017/*
Holger Hildebrandtfa074992020-03-27 15:42:06 +000018 * 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// ReDownstreamAmplifierClassID is the 16-bit ID for the OMCI
29// Managed entity RE downstream amplifier
mpagenko836a1fd2021-11-01 16:12:42 +000030const ReDownstreamAmplifierClassID = ClassID(316) // 0x013c
Holger Hildebrandtfa074992020-03-27 15:42:06 +000031
32var redownstreamamplifierBME *ManagedEntityDefinition
33
mpagenko836a1fd2021-11-01 16:12:42 +000034// ReDownstreamAmplifier (Class ID: #316 / 0x013c)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000035// This ME organizes data associated with each OA for downstream data supported by the RE. The
36// management ONU automatically creates one instance of this ME for each downstream OA as follows.
37//
38// o When the RE has mid-span PON RE downstream OA ports built into its factory configuration.
39//
40// o When a cardholder is provisioned to expect a circuit pack of the mid-span PON RE downstream OA
41// type.
42//
43// o When a cardholder provisioned for plug-and-play is equipped with a circuit pack of the midspan
44// PON RE downstream OA type. Note that the installation of a plug-and-play card may indicate the
45// presence of a mid-span PON RE downstream OA via equipment ID as well as its type attribute, and
46// indeed may cause the management ONU to instantiate a port-mapping package to specify the ports
47// precisely.
48//
49// The management ONU automatically deletes instances of this ME when a cardholder is neither
50// provisioned to expect a mid-span PON RE downstream OA circuit pack, nor is it equipped with a
51// mid-span PON RE downstream OA circuit pack.
52//
53// Relationships
54// An instance of this ME is associated with a downstream OA and with an instance of a circuit
55// pack. If the RE includes OEO regeneration in either direction, the RE downstream amplifier is
56// also associated with an RE ANI-G. Refer to clause-9.14.1 for further discussion.
57//
58// Attributes
59// Managed Entity Id
mpagenko836a1fd2021-11-01 16:12:42 +000060// This attribute uniquely identifies each instance of this ME. Its value indicates the physical
61// position of the downstream OA. The first byte is the slot ID (defined in clause 9.1.5 of [ITU-T
62// G.984.4]). The second byte is the port ID. (R) (mandatory) (2-bytes)
63//
Holger Hildebrandtfa074992020-03-27 15:42:06 +000064// NOTE 1 - This ME ID may be identical to that of an RE ANI-G if it shares the same physical slot-
65// port.
66//
67// Administrative State
mpagenko836a1fd2021-11-01 16:12:42 +000068// This attribute locks (1) and unlocks (0) the functions performed by this ME. Administrative
69// state is further described in clause A.1.6. (R,-W) (mandatory) (1-byte)
70//
Holger Hildebrandtfa074992020-03-27 15:42:06 +000071// NOTE 2- When an RE supports multiple PONs, or protected access to a single PON, its primary
72// ANI-G cannot be completely shut down, due to a loss of the management communications capability.
73// Complete blocking of service and removal of power may nevertheless be appropriate for secondary
74// RE ANI-Gs. Administrative lock suppresses alarms and notifications for both primary and
75// secondary RE ANI-Gs. Administrative lock suppresses alarms and notifications for an RE
76// downstream amplifier, be it either primary or secondary.
77//
78// Operational State
mpagenko836a1fd2021-11-01 16:12:42 +000079// This attribute indicates whether the ME is capable of performing its function. Valid values are
80// enabled (0) and disabled (1). (R) (optional) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000081//
82// Arc
mpagenko836a1fd2021-11-01 16:12:42 +000083// See clause A.1.4.3. (R,-W) (optional) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000084//
85// Arc Interval
mpagenko836a1fd2021-11-01 16:12:42 +000086// See clause A.1.4.3. (R,-W) (optional) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000087//
88// Operational Mode
mpagenko836a1fd2021-11-01 16:12:42 +000089// This attribute indicates the operational mode as follows.
90//
91// 0 Constant gain
92//
93// 1 Constant output power
94//
95// 2 Autonomous
96//
Holger Hildebrandtfa074992020-03-27 15:42:06 +000097// (R,W) (mandatory) (1-byte)
98//
99// Input Optical Signal Level
mpagenko836a1fd2021-11-01 16:12:42 +0000100// This attribute reports the current measurement of the input optical signal power of the
101// downstream OA. Its value is a 2s-complement integer referred to 1-mW (i.e., dBm), with 0.002-dB
102// granularity. (Coding -32768 to +32767, where 0x00 = 0-dBm, 0x03e8 = +2-dBm, etc.) (R) (optional)
103// (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000104//
105// Lower Input Optical Threshold
mpagenko836a1fd2021-11-01 16:12:42 +0000106// This attribute specifies the optical level the RE uses to declare the low received optical power
107// alarm. Valid values are -127-dBm (coded as 254) to 0-dBm (coded as 0) in 0.5-dB increments. The
108// default value 0xFF selects the RE's internal policy. (R,-W) (optional) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000109//
110// Upper Input Optical Threshold
mpagenko836a1fd2021-11-01 16:12:42 +0000111// This attribute specifies the optical level the RE uses to declare the high received optical
112// power alarm. Valid values are -127-dBm (coded as 254) to 0-dBm (coded as 0) in 0.5-dB
113// increments. The default value 0xFF selects the RE's internal policy. (R,-W) (optional) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000114//
115// Output Optical Signal Level
mpagenko836a1fd2021-11-01 16:12:42 +0000116// This attribute reports the current measurement of the mean optical launch power of the
117// downstream OA. Its value is a 2s-complement integer referred to 1-mW (i.e., dBm), with 0.002-dB
118// granularity. (Coding -32768 to +32767, where 0x00 = 0-dBm, 0x03e8 = +2-dBm, etc.) (R) (optional)
119// (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000120//
121// Lower Output Optical Threshold
mpagenko836a1fd2021-11-01 16:12:42 +0000122// This attribute specifies the minimum mean optical launch power that the RE uses to declare the
123// low transmit optical power alarm. Its value is a 2s complement integer referred to 1-mW (i.e.,
124// dBm), with 0.5-dB granularity. The default value 0x7F selects the RE's internal policy. (R,-W)
125// (optional) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000126//
127// Upper Output Optical Threshold
mpagenko836a1fd2021-11-01 16:12:42 +0000128// This attribute specifies the maximum mean optical launch power that the RE uses to declare the
129// high transmit optical power alarm. Its value is a 2s complement integer referred to 1-mW (i.e.,
130// dBm), with 0.5-dB granularity. The default value 0x7F selects the RE's internal policy. (R,-W)
131// (optional) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000132//
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000133// R S Splitter Coupling Ratio
134// R'S' splitter coupling ratio: This attribute reports the coupling ratio of the splitter at the
135// R'/S' interface that connects the embedded management ONU and the amplifiers to the OTL. Valid
136// values are 99:1 (coded as 99-decimal) to 1:99 (coded as 1 decimal), where the first value is the
137// value encoded and is the percentage of the optical signal connected to the amplifier. The
138// default value 0xFF indicates that there is no splitter connected to this upstream/downstream
139// amplifier pair. (R) (optional) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000140//
141type ReDownstreamAmplifier struct {
142 ManagedEntityDefinition
143 Attributes AttributeValueMap
144}
145
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000146// Attribute name constants
147
148const ReDownstreamAmplifier_AdministrativeState = "AdministrativeState"
149const ReDownstreamAmplifier_OperationalState = "OperationalState"
150const ReDownstreamAmplifier_Arc = "Arc"
151const ReDownstreamAmplifier_ArcInterval = "ArcInterval"
152const ReDownstreamAmplifier_OperationalMode = "OperationalMode"
153const ReDownstreamAmplifier_InputOpticalSignalLevel = "InputOpticalSignalLevel"
154const ReDownstreamAmplifier_LowerInputOpticalThreshold = "LowerInputOpticalThreshold"
155const ReDownstreamAmplifier_UpperInputOpticalThreshold = "UpperInputOpticalThreshold"
156const ReDownstreamAmplifier_OutputOpticalSignalLevel = "OutputOpticalSignalLevel"
157const ReDownstreamAmplifier_LowerOutputOpticalThreshold = "LowerOutputOpticalThreshold"
158const ReDownstreamAmplifier_UpperOutputOpticalThreshold = "UpperOutputOpticalThreshold"
159const ReDownstreamAmplifier_RSSplitterCouplingRatio = "RSSplitterCouplingRatio"
160
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000161func init() {
162 redownstreamamplifierBME = &ManagedEntityDefinition{
163 Name: "ReDownstreamAmplifier",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000164 ClassID: ReDownstreamAmplifierClassID,
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000165 MessageTypes: mapset.NewSetWith(
166 Get,
167 Set,
168 Test,
169 ),
170 AllowedAttributeMask: 0xfff0,
171 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000172 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
173 1: ByteField(ReDownstreamAmplifier_AdministrativeState, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
174 2: ByteField(ReDownstreamAmplifier_OperationalState, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, true, false, 2),
175 3: ByteField(ReDownstreamAmplifier_Arc, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), true, true, false, 3),
176 4: ByteField(ReDownstreamAmplifier_ArcInterval, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
177 5: ByteField(ReDownstreamAmplifier_OperationalMode, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
178 6: Uint16Field(ReDownstreamAmplifier_InputOpticalSignalLevel, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, true, false, 6),
179 7: ByteField(ReDownstreamAmplifier_LowerInputOpticalThreshold, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, true, false, 7),
180 8: ByteField(ReDownstreamAmplifier_UpperInputOpticalThreshold, UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8),
181 9: Uint16Field(ReDownstreamAmplifier_OutputOpticalSignalLevel, UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, true, false, 9),
182 10: ByteField(ReDownstreamAmplifier_LowerOutputOpticalThreshold, UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, true, false, 10),
183 11: ByteField(ReDownstreamAmplifier_UpperOutputOpticalThreshold, UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
184 12: ByteField(ReDownstreamAmplifier_RSSplitterCouplingRatio, UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, true, false, 12),
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000185 },
186 Access: CreatedByOnu,
187 Support: UnknownSupport,
Himani Chawlaac1f5ad2021-02-04 21:21:54 +0530188 Alarms: AlarmMap{
189 0: "Low received optical power",
190 1: "High received optical power",
191 2: "Low transmit optical power",
192 3: "High transmit optical power",
193 4: "High laser bias current",
194 },
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000195 }
196}
197
198// NewReDownstreamAmplifier (class ID 316) creates the basic
199// Managed Entity definition that is used to validate an ME of this type that
200// is received from or transmitted to the OMCC.
201func NewReDownstreamAmplifier(params ...ParamData) (*ManagedEntity, OmciErrors) {
202 return NewManagedEntity(*redownstreamamplifierBME, params...)
203}