blob: 67728c0270ea41a4f918aa970abf1cfc88f73d12 [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// ReDownstreamAmplifierClassID is the 16-bit ID for the OMCI
26// Managed entity RE downstream amplifier
27const ReDownstreamAmplifierClassID ClassID = ClassID(316)
28
29var redownstreamamplifierBME *ManagedEntityDefinition
30
31// ReDownstreamAmplifier (class ID #316)
32// This ME organizes data associated with each OA for downstream data supported by the RE. The
33// management ONU automatically creates one instance of this ME for each downstream OA as follows.
34//
35// o When the RE has mid-span PON RE downstream OA ports built into its factory configuration.
36//
37// o When a cardholder is provisioned to expect a circuit pack of the mid-span PON RE downstream OA
38// type.
39//
40// o When a cardholder provisioned for plug-and-play is equipped with a circuit pack of the midspan
41// PON RE downstream OA type. Note that the installation of a plug-and-play card may indicate the
42// presence of a mid-span PON RE downstream OA via equipment ID as well as its type attribute, and
43// indeed may cause the management ONU to instantiate a port-mapping package to specify the ports
44// precisely.
45//
46// The management ONU automatically deletes instances of this ME when a cardholder is neither
47// provisioned to expect a mid-span PON RE downstream OA circuit pack, nor is it equipped with a
48// mid-span PON RE downstream OA circuit pack.
49//
50// Relationships
51// An instance of this ME is associated with a downstream OA and with an instance of a circuit
52// pack. If the RE includes OEO regeneration in either direction, the RE downstream amplifier is
53// also associated with an RE ANI-G. Refer to clause-9.14.1 for further discussion.
54//
55// Attributes
56// Managed Entity Id
57// NOTE 1 - This ME ID may be identical to that of an RE ANI-G if it shares the same physical slot-
58// port.
59//
60// Administrative State
61// NOTE 2- When an RE supports multiple PONs, or protected access to a single PON, its primary
62// ANI-G cannot be completely shut down, due to a loss of the management communications capability.
63// Complete blocking of service and removal of power may nevertheless be appropriate for secondary
64// RE ANI-Gs. Administrative lock suppresses alarms and notifications for both primary and
65// secondary RE ANI-Gs. Administrative lock suppresses alarms and notifications for an RE
66// downstream amplifier, be it either primary or secondary.
67//
68// Operational State
69// Operational state: This attribute indicates whether the ME is capable of performing its
70// function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
71//
72// Arc
73// ARC: See clause A.1.4.3. (R,-W) (optional) (1-byte)
74//
75// Arc Interval
76// ARC interval: See clause A.1.4.3. (R,-W) (optional) (1-byte)
77//
78// Operational Mode
79// (R,W) (mandatory) (1-byte)
80//
81// Input Optical Signal Level
82// Input optical signal level: This attribute reports the current measurement of the input optical
83// signal power of the downstream OA. Its value is a 2s-complement integer referred to 1-mW (i.e.,
84// dBm), with 0.002-dB granularity. (R) (optional) (2-bytes)
85//
86// Lower Input Optical Threshold
87// Lower input optical threshold: This attribute specifies the optical level the RE uses to declare
88// the low received optical power alarm. Valid values are -127-dBm (coded as 254) to 0-dBm (coded
89// as 0) in 0.5-dB increments. The default value 0xFF selects the RE's internal policy. (R,-W)
90// (optional) (1-byte)
91//
92// Upper Input Optical Threshold
93// Upper input optical threshold: This attribute specifies the optical level the RE uses to declare
94// the high received optical power alarm. Valid values are -127-dBm (coded as 254) to 0-dBm (coded
95// as 0) in 0.5-dB increments. The default value 0xFF selects the RE's internal policy. (R,-W)
96// (optional) (1-byte)
97//
98// Output Optical Signal Level
99// Output optical signal level: This attribute reports the current measurement of the mean optical
100// launch power of the downstream OA. Its value is a 2s-complement integer referred to 1-mW (i.e.,
101// dBm), with 0.002-dB granularity. (R) (optional) (2-bytes)
102//
103// Lower Output Optical Threshold
104// Lower output optical threshold: This attribute specifies the minimum mean optical launch power
105// that the RE uses to declare the low transmit optical power alarm. Its value is a 2s complement
106// integer referred to 1-mW (i.e., dBm), with 0.5-dB granularity. The default value 0x7F selects
107// the RE's internal policy. (R,-W) (optional) (1-byte)
108//
109// Upper Output Optical Threshold
110// Upper output optical threshold: This attribute specifies the maximum mean optical launch power
111// that the RE uses to declare the high transmit optical power alarm. Its value is a 2s complement
112// integer referred to 1-mW (i.e., dBm), with 0.5-dB granularity. The default value 0x7F selects
113// the RE's internal policy. (R,-W) (optional) (1-byte)
114//
115// R'S' Splitter Coupling Ratio
116// R'S' splitter coupling ratio: This attribute reports the coupling ratio of the splitter at the
117// R'/S' interface that connects the embedded management ONU and the amplifiers to the OTL. Valid
118// values are 99:1 (coded as 99-decimal) to 1:99 (coded as 1 decimal), where the first value is the
119// value encoded and is the percentage of the optical signal connected to the amplifier. The
120// default value 0xFF indicates that there is no splitter connected to this upstream/downstream
121// amplifier pair. (R) (optional) (1-byte)
122//
123type ReDownstreamAmplifier struct {
124 ManagedEntityDefinition
125 Attributes AttributeValueMap
126}
127
128func init() {
129 redownstreamamplifierBME = &ManagedEntityDefinition{
130 Name: "ReDownstreamAmplifier",
131 ClassID: 316,
132 MessageTypes: mapset.NewSetWith(
133 Get,
134 Set,
135 Test,
136 ),
137 AllowedAttributeMask: 0xfff0,
138 AttributeDefinitions: AttributeDefinitionMap{
139 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
140 1: ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
141 2: ByteField("OperationalState", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, true, false, 2),
142 3: ByteField("Arc", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), true, true, false, 3),
143 4: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
144 5: ByteField("OperationalMode", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
145 6: Uint16Field("InputOpticalSignalLevel", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, true, false, 6),
146 7: ByteField("LowerInputOpticalThreshold", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, true, false, 7),
147 8: ByteField("UpperInputOpticalThreshold", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8),
148 9: Uint16Field("OutputOpticalSignalLevel", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, true, false, 9),
149 10: ByteField("LowerOutputOpticalThreshold", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, true, false, 10),
150 11: ByteField("UpperOutputOpticalThreshold", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
151 12: ByteField("R'S'SplitterCouplingRatio", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, true, false, 12),
152 },
153 Access: CreatedByOnu,
154 Support: UnknownSupport,
155 }
156}
157
158// NewReDownstreamAmplifier (class ID 316) creates the basic
159// Managed Entity definition that is used to validate an ME of this type that
160// is received from or transmitted to the OMCC.
161func NewReDownstreamAmplifier(params ...ParamData) (*ManagedEntity, OmciErrors) {
162 return NewManagedEntity(*redownstreamamplifierBME, params...)
163}