blob: f5176d929e6c2d9363d6ecc6794b9d5fac22c842 [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
4
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
Andrea Campanella7167ebb2020-02-24 09:56:38 +01008
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Andrea Campanella7167ebb2020-02-24 09:56:38 +010010
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
30const ReDownstreamAmplifierClassID ClassID = ClassID(316)
31
32var redownstreamamplifierBME *ManagedEntityDefinition
33
34// ReDownstreamAmplifier (class ID #316)
35// 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
60// NOTE 1 - This ME ID may be identical to that of an RE ANI-G if it shares the same physical slot-
61// port.
62//
63// Administrative State
64// NOTE 2- When an RE supports multiple PONs, or protected access to a single PON, its primary
65// ANI-G cannot be completely shut down, due to a loss of the management communications capability.
66// Complete blocking of service and removal of power may nevertheless be appropriate for secondary
67// RE ANI-Gs. Administrative lock suppresses alarms and notifications for both primary and
68// secondary RE ANI-Gs. Administrative lock suppresses alarms and notifications for an RE
69// downstream amplifier, be it either primary or secondary.
70//
71// Operational State
72// Operational state: This attribute indicates whether the ME is capable of performing its
73// function. Valid values are enabled (0) and disabled (1). (R) (optional) (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// Operational Mode
82// (R,W) (mandatory) (1-byte)
83//
84// Input Optical Signal Level
85// Input optical signal level: This attribute reports the current measurement of the input optical
86// signal power of the downstream OA. Its value is a 2s-complement integer referred to 1-mW (i.e.,
87// dBm), with 0.002-dB granularity. (R) (optional) (2-bytes)
88//
89// Lower Input Optical Threshold
90// Lower input optical threshold: This attribute specifies the optical level the RE uses to declare
91// the low received optical power alarm. Valid values are -127-dBm (coded as 254) to 0-dBm (coded
92// as 0) in 0.5-dB increments. The default value 0xFF selects the RE's internal policy. (R,-W)
93// (optional) (1-byte)
94//
95// Upper Input Optical Threshold
96// Upper input optical threshold: This attribute specifies the optical level the RE uses to declare
97// the high received optical power alarm. Valid values are -127-dBm (coded as 254) to 0-dBm (coded
98// as 0) in 0.5-dB increments. The default value 0xFF selects the RE's internal policy. (R,-W)
99// (optional) (1-byte)
100//
101// Output Optical Signal Level
102// Output optical signal level: This attribute reports the current measurement of the mean optical
103// launch power of the downstream OA. Its value is a 2s-complement integer referred to 1-mW (i.e.,
104// dBm), with 0.002-dB granularity. (R) (optional) (2-bytes)
105//
106// Lower Output Optical Threshold
107// Lower output optical threshold: This attribute specifies the minimum mean optical launch power
108// that the RE 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 0x7F selects
110// the RE's internal policy. (R,-W) (optional) (1-byte)
111//
112// Upper Output Optical Threshold
113// Upper output optical threshold: This attribute specifies the maximum mean optical launch power
114// that the RE 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 0x7F selects
116// the RE's internal policy. (R,-W) (optional) (1-byte)
117//
118// R'S' Splitter Coupling Ratio
119// R'S' splitter coupling ratio: This attribute reports the coupling ratio of the splitter at the
120// R'/S' interface that connects the embedded management ONU and the amplifiers to the OTL. Valid
121// values are 99:1 (coded as 99-decimal) to 1:99 (coded as 1 decimal), where the first value is the
122// value encoded and is the percentage of the optical signal connected to the amplifier. The
123// default value 0xFF indicates that there is no splitter connected to this upstream/downstream
124// amplifier pair. (R) (optional) (1-byte)
125//
126type ReDownstreamAmplifier struct {
127 ManagedEntityDefinition
128 Attributes AttributeValueMap
129}
130
131func init() {
132 redownstreamamplifierBME = &ManagedEntityDefinition{
133 Name: "ReDownstreamAmplifier",
134 ClassID: 316,
135 MessageTypes: mapset.NewSetWith(
136 Get,
137 Set,
138 Test,
139 ),
140 AllowedAttributeMask: 0xfff0,
141 AttributeDefinitions: AttributeDefinitionMap{
142 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
143 1: ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
144 2: ByteField("OperationalState", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, true, false, 2),
145 3: ByteField("Arc", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), true, true, false, 3),
146 4: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
147 5: ByteField("OperationalMode", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
148 6: Uint16Field("InputOpticalSignalLevel", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, true, false, 6),
149 7: ByteField("LowerInputOpticalThreshold", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, true, false, 7),
150 8: ByteField("UpperInputOpticalThreshold", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8),
151 9: Uint16Field("OutputOpticalSignalLevel", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, true, false, 9),
152 10: ByteField("LowerOutputOpticalThreshold", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, true, false, 10),
153 11: ByteField("UpperOutputOpticalThreshold", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
154 12: ByteField("R'S'SplitterCouplingRatio", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, true, false, 12),
155 },
156 Access: CreatedByOnu,
157 Support: UnknownSupport,
Chip Boling34ebcb62021-02-02 12:13:58 -0600158 Alarms: AlarmMap{
159 0: "Low received optical power",
160 1: "High received optical power",
161 2: "Low transmit optical power",
162 3: "High transmit optical power",
163 4: "High laser bias current",
164 },
Chip Boling6e27b352020-02-14 09:10:01 -0600165 }
166}
167
168// NewReDownstreamAmplifier (class ID 316) creates the basic
169// Managed Entity definition that is used to validate an ME of this type that
170// is received from or transmitted to the OMCC.
171func NewReDownstreamAmplifier(params ...ParamData) (*ManagedEntity, OmciErrors) {
172 return NewManagedEntity(*redownstreamamplifierBME, params...)
173}