blob: 4173e7343c2863ba826a57c2e16e1cf26a2ea5fb [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
Chip Boling8cdd6392022-01-27 08:43:37 -06004 *
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
Chip Boling8cdd6392022-01-27 08:43:37 -06008 *
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Chip Boling8cdd6392022-01-27 08:43:37 -060010 *
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// ReDownstreamAmplifierClassID is the 16-bit ID for the OMCI
29// Managed entity RE downstream amplifier
Chip Boling610117d2021-09-09 11:24:34 -050030const ReDownstreamAmplifierClassID = ClassID(316) // 0x013c
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var redownstreamamplifierBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// ReDownstreamAmplifier (Class ID: #316 / 0x013c)
Chip Boling6e27b352020-02-14 09:10:01 -060035// 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
Chip Boling610117d2021-09-09 11:24:34 -050060// 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//
Chip Boling6e27b352020-02-14 09:10:01 -060064// 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
Chip Boling610117d2021-09-09 11:24:34 -050068// 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//
Chip Boling6e27b352020-02-14 09:10:01 -060071// 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
Chip Boling610117d2021-09-09 11:24:34 -050079// 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)
Chip Boling6e27b352020-02-14 09:10:01 -060081//
82// Arc
Chip Boling610117d2021-09-09 11:24:34 -050083// See clause A.1.4.3. (R,-W) (optional) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -060084//
85// Arc Interval
Chip Boling610117d2021-09-09 11:24:34 -050086// See clause A.1.4.3. (R,-W) (optional) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -060087//
88// Operational Mode
Chip Boling610117d2021-09-09 11:24:34 -050089// This attribute indicates the operational mode as follows.
90//
91// 0 Constant gain
92//
93// 1 Constant output power
94//
95// 2 Autonomous
96//
Chip Boling6e27b352020-02-14 09:10:01 -060097// (R,W) (mandatory) (1-byte)
98//
99// Input Optical Signal Level
Chip Boling610117d2021-09-09 11:24:34 -0500100// 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)
Chip Boling6e27b352020-02-14 09:10:01 -0600104//
105// Lower Input Optical Threshold
Chip Boling610117d2021-09-09 11:24:34 -0500106// 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)
Chip Boling6e27b352020-02-14 09:10:01 -0600109//
110// Upper Input Optical Threshold
Chip Boling610117d2021-09-09 11:24:34 -0500111// 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)
Chip Boling6e27b352020-02-14 09:10:01 -0600114//
115// Output Optical Signal Level
Chip Boling610117d2021-09-09 11:24:34 -0500116// 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)
Chip Boling6e27b352020-02-14 09:10:01 -0600120//
121// Lower Output Optical Threshold
Chip Boling610117d2021-09-09 11:24:34 -0500122// 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)
Chip Boling6e27b352020-02-14 09:10:01 -0600126//
127// Upper Output Optical Threshold
Chip Boling610117d2021-09-09 11:24:34 -0500128// 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)
Chip Boling6e27b352020-02-14 09:10:01 -0600132//
Chip Boling8cdd6392022-01-27 08:43:37 -0600133// 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)
Chip Boling6e27b352020-02-14 09:10:01 -0600140//
141type ReDownstreamAmplifier struct {
142 ManagedEntityDefinition
143 Attributes AttributeValueMap
144}
145
Chip Boling8cdd6392022-01-27 08:43:37 -0600146// 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
Chip Boling6e27b352020-02-14 09:10:01 -0600161func init() {
162 redownstreamamplifierBME = &ManagedEntityDefinition{
163 Name: "ReDownstreamAmplifier",
Chip Boling8cdd6392022-01-27 08:43:37 -0600164 ClassID: ReDownstreamAmplifierClassID,
Chip Boling6e27b352020-02-14 09:10:01 -0600165 MessageTypes: mapset.NewSetWith(
166 Get,
167 Set,
168 Test,
169 ),
170 AllowedAttributeMask: 0xfff0,
171 AttributeDefinitions: AttributeDefinitionMap{
Chip Boling8cdd6392022-01-27 08:43:37 -0600172 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),
Chip Boling6e27b352020-02-14 09:10:01 -0600185 },
186 Access: CreatedByOnu,
187 Support: UnknownSupport,
Chip Boling34ebcb62021-02-02 12:13:58 -0600188 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 },
Chip Boling6e27b352020-02-14 09:10:01 -0600195 }
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}