blob: d85e3a7b0ce1e82aa7fc71ddce206f480b8f3b3f [file] [log] [blame]
Matteo Scandolof9d43412021-01-12 11:11:34 -08001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
4
5 * 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
8
9 * http://www.apache.org/licenses/LICENSE-2.0
10
11 * 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// ReDownstreamAmplifierClassID is the 16-bit ID for the OMCI
29// Managed entity RE downstream amplifier
Andrea Campanella10426e22021-10-15 17:58:04 +020030const ReDownstreamAmplifierClassID = ClassID(316) // 0x013c
Matteo Scandolof9d43412021-01-12 11:11:34 -080031
32var redownstreamamplifierBME *ManagedEntityDefinition
33
Andrea Campanella10426e22021-10-15 17:58:04 +020034// ReDownstreamAmplifier (Class ID: #316 / 0x013c)
Matteo Scandolof9d43412021-01-12 11:11:34 -080035// 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
Andrea Campanella10426e22021-10-15 17:58:04 +020060// 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//
Matteo Scandolof9d43412021-01-12 11:11:34 -080064// 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
Andrea Campanella10426e22021-10-15 17:58:04 +020068// 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//
Matteo Scandolof9d43412021-01-12 11:11:34 -080071// 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
Andrea Campanella10426e22021-10-15 17:58:04 +020079// 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)
Matteo Scandolof9d43412021-01-12 11:11:34 -080081//
82// Arc
Andrea Campanella10426e22021-10-15 17:58:04 +020083// See clause A.1.4.3. (R,-W) (optional) (1-byte)
Matteo Scandolof9d43412021-01-12 11:11:34 -080084//
85// Arc Interval
Andrea Campanella10426e22021-10-15 17:58:04 +020086// See clause A.1.4.3. (R,-W) (optional) (1-byte)
Matteo Scandolof9d43412021-01-12 11:11:34 -080087//
88// Operational Mode
Andrea Campanella10426e22021-10-15 17:58:04 +020089// This attribute indicates the operational mode as follows.
90//
91// 0 Constant gain
92//
93// 1 Constant output power
94//
95// 2 Autonomous
96//
Matteo Scandolof9d43412021-01-12 11:11:34 -080097// (R,W) (mandatory) (1-byte)
98//
99// Input Optical Signal Level
Andrea Campanella10426e22021-10-15 17:58:04 +0200100// 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)
Matteo Scandolof9d43412021-01-12 11:11:34 -0800104//
105// Lower Input Optical Threshold
Andrea Campanella10426e22021-10-15 17:58:04 +0200106// 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)
Matteo Scandolof9d43412021-01-12 11:11:34 -0800109//
110// Upper Input Optical Threshold
Andrea Campanella10426e22021-10-15 17:58:04 +0200111// 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)
Matteo Scandolof9d43412021-01-12 11:11:34 -0800114//
115// Output Optical Signal Level
Andrea Campanella10426e22021-10-15 17:58:04 +0200116// 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)
Matteo Scandolof9d43412021-01-12 11:11:34 -0800120//
121// Lower Output Optical Threshold
Andrea Campanella10426e22021-10-15 17:58:04 +0200122// 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)
Matteo Scandolof9d43412021-01-12 11:11:34 -0800126//
127// Upper Output Optical Threshold
Andrea Campanella10426e22021-10-15 17:58:04 +0200128// 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)
Matteo Scandolof9d43412021-01-12 11:11:34 -0800132//
133// R'S' Splitter Coupling Ratio
Andrea Campanella10426e22021-10-15 17:58:04 +0200134// This attribute reports the coupling ratio of the splitter at the R'/S' interface that connects
135// the embedded management ONU and the amplifiers to the OTL. Valid values are 99:1 (coded as
136// 99-decimal) to 1:99 (coded as 1 decimal), where the first value is the value encoded and is the
137// percentage of the optical signal connected to the amplifier. The default value 0xFF indicates
138// that there is no splitter connected to this upstream/downstream amplifier pair. (R) (optional)
139// (1-byte)
Matteo Scandolof9d43412021-01-12 11:11:34 -0800140//
141type ReDownstreamAmplifier struct {
142 ManagedEntityDefinition
143 Attributes AttributeValueMap
144}
145
146func init() {
147 redownstreamamplifierBME = &ManagedEntityDefinition{
148 Name: "ReDownstreamAmplifier",
149 ClassID: 316,
150 MessageTypes: mapset.NewSetWith(
151 Get,
152 Set,
153 Test,
154 ),
155 AllowedAttributeMask: 0xfff0,
156 AttributeDefinitions: AttributeDefinitionMap{
157 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
158 1: ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
159 2: ByteField("OperationalState", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, true, false, 2),
160 3: ByteField("Arc", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), true, true, false, 3),
161 4: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
162 5: ByteField("OperationalMode", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
163 6: Uint16Field("InputOpticalSignalLevel", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, true, false, 6),
164 7: ByteField("LowerInputOpticalThreshold", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, true, false, 7),
165 8: ByteField("UpperInputOpticalThreshold", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8),
166 9: Uint16Field("OutputOpticalSignalLevel", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, true, false, 9),
167 10: ByteField("LowerOutputOpticalThreshold", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, true, false, 10),
168 11: ByteField("UpperOutputOpticalThreshold", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
169 12: ByteField("R'S'SplitterCouplingRatio", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, true, false, 12),
170 },
171 Access: CreatedByOnu,
172 Support: UnknownSupport,
173 Alarms: AlarmMap{
174 0: "Low received optical power",
175 1: "High received optical power",
176 2: "Low transmit optical power",
177 3: "High transmit optical power",
178 4: "High laser bias current",
179 },
180 }
181}
182
183// NewReDownstreamAmplifier (class ID 316) creates the basic
184// Managed Entity definition that is used to validate an ME of this type that
185// is received from or transmitted to the OMCC.
186func NewReDownstreamAmplifier(params ...ParamData) (*ManagedEntity, OmciErrors) {
187 return NewManagedEntity(*redownstreamamplifierBME, params...)
188}