blob: 63a10b386a50012c93aadcce3dbda516a4f8fde6 [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Matteo Scandolof9d43412021-01-12 11:11:34 -08003 * Copyright 2020-present Open Networking Foundation
Elia Battiston9bfe1102022-02-03 10:38:03 +01004 *
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07005 * 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
Elia Battiston9bfe1102022-02-03 10:38:03 +01008 *
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07009 * http://www.apache.org/licenses/LICENSE-2.0
Elia Battiston9bfe1102022-02-03 10:38:03 +010010 *
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070011 * 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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080023
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070024package generated
25
26import "github.com/deckarep/golang-set"
27
Matteo Scandolof9d43412021-01-12 11:11:34 -080028// ReAniGClassID is the 16-bit ID for the OMCI
29// Managed entity RE ANI-G
Andrea Campanella10426e22021-10-15 17:58:04 +020030const ReAniGClassID = ClassID(313) // 0x0139
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
32var reanigBME *ManagedEntityDefinition
33
Andrea Campanella10426e22021-10-15 17:58:04 +020034// ReAniG (Class ID: #313 / 0x0139)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070035// This ME organizes data associated with each R'/S' physical interface of an RE if the RE supports
36// OEO regeneration in either direction. The management ONU automatically creates one instance of
37// this ME for each R'/S' physical port (uni- or bidirectional) as follows.
38//
Matteo Scandolof9d43412021-01-12 11:11:34 -080039// o When the RE has mid-span PON RE ANI interface ports built into its factory configuration.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070040//
Matteo Scandolof9d43412021-01-12 11:11:34 -080041// o When a cardholder is provisioned to expect a circuit pack of the mid-span PON RE ANI type.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070042//
Matteo Scandolof9d43412021-01-12 11:11:34 -080043// o When a cardholder provisioned for plug-and-play is equipped with a circuit pack of the midspan
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070044// PON RE ANI type. Note that the installation of a plug-and-play card may indicate the presence of
45// a mid-span PON RE ANI port via equipment ID as well as its type attribute, and indeed may cause
46// the management ONU to instantiate a port-mapping package to specify the ports precisely.
47//
48// The management ONU automatically deletes instances of this ME when a cardholder is neither
49// provisioned to expect a mid-span PON RE ANI circuit pack, nor is it equipped with a mid-span PON
50// RE ANI circuit pack.
51//
52// As illustrated in Figure 8.2.10-4, an RE ANI-G may share the physical port with an RE downstream
53// amplifier. The ONU declares a shared configuration through the port-mapping package combined
54// port table, whose structure defines one ME as the master. It is recommended that the RE ANI-G be
55// the master, with the RE downstream amplifier as a secondary ME.
56//
57// The administrative state, operational state and ARC attributes of the master ME override similar
58// attributes in secondary MEs associated with the same port. In the secondary ME, these attributes
59// are present, but cause no action when written and have undefined values when read. The RE
60// downstream amplifier should use its provisionable downstream alarm thresholds and should declare
61// downstream alarms as necessary; other isomorphic alarms should be declared by the RE ANI-G. The
62// test action should be addressed to the master ME.
63//
64// Relationships
65// An instance of this ME is associated with each R'/S' physical interface of an RE that includes
66// OEO regeneration in either direction, and with one or more instances of the PPTP RE UNI. It may
67// also be associated with an RE downstream amplifier.
68//
69// Attributes
70// Managed Entity Id
Andrea Campanella10426e22021-10-15 17:58:04 +020071// This attribute uniquely identifies each instance of this ME. Its value indicates the physical
72// position of the R'/S' interface. The first byte is the slot ID (defined in clause 9.1.5). The
73// second byte is the port ID. (R) (mandatory) (2-bytes)
74//
Matteo Scandolof9d43412021-01-12 11:11:34 -080075// NOTE 1 - This ME ID may be identical to that of an RE downstream amplifier if it shares the same
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070076// physical slot and port.
77//
78// Administrative State
Andrea Campanella10426e22021-10-15 17:58:04 +020079// This attribute locks (1) and unlocks (0) the functions performed by this ME. Administrative
80// state is further described in clause A.1.6. (R,-W) (mandatory) (1-byte)
81//
Matteo Scandolof9d43412021-01-12 11:11:34 -080082// NOTE 2 - When an RE supports multiple PONs, or protected access to a single PON, its primary
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070083// ANI-G cannot be completely shut down, due to a loss of the management communications capability.
84// Complete blocking of service and removal of power may nevertheless be appropriate for secondary
85// RE ANI-Gs. Administrative lock suppresses alarms and notifications for an RE ANI-G, be it either
86// primary or secondary.
87//
88// Operational State
Andrea Campanella10426e22021-10-15 17:58:04 +020089// This attribute indicates whether the ME is capable of performing its function. Valid values are
90// enabled (0) and disabled (1). (R) (optional) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070091//
92// Arc
Andrea Campanella10426e22021-10-15 17:58:04 +020093// See clause A.1.4.3. (R,-W) (optional) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070094//
95// Arc Interval
Andrea Campanella10426e22021-10-15 17:58:04 +020096// See clause A.1.4.3. (R,-W) (optional) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070097//
98// Optical Signal Level
Andrea Campanella10426e22021-10-15 17:58:04 +020099// This attribute reports the current measurement of total downstream optical power. Its value is a
100// 2s complement integer referred to 1-mW (i.e., dBm), with 0.002-dB granularity. (Coding -32768 to
101// +32767, where 0x00 = 0-dBm, 0x03e8 = +2-dBm, etc.) (R) (optional) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700102//
103// Lower Optical Threshold
Andrea Campanella10426e22021-10-15 17:58:04 +0200104// This attribute specifies the optical level that the RE uses to declare the downstream low
105// received optical power alarm. Valid values are -127-dBm (coded as 254) to 0-dBm (coded as 0) in
106// 0.5-dB increments. The default value 0xFF selects the RE's internal policy. (R,-W) (optional)
107// (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700108//
109// Upper Optical Threshold
Andrea Campanella10426e22021-10-15 17:58:04 +0200110// This attribute specifies the optical level that the RE uses to declare the downstream high
111// received optical power alarm. Valid values are -127-dBm (coded as 254) to 0-dBm (coded as 0) in
112// 0.5 dB increments. The default value 0xFF selects the RE's internal policy. (R,-W) (optional)
113// (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700114//
115// Transmit Optical Level
Andrea Campanella10426e22021-10-15 17:58:04 +0200116// This attribute reports the current measurement of mean optical launch power. Its value is a 2s
117// complement integer referred to 1-mW (i.e., dBm), with 0.002-dB granularity. (Coding -32768 to
118// +32767, where 0x00 = 0-dBm, 0x03e8 = +2-dBm, etc.) (R) (optional) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700119//
120// Lower Transmit Power Threshold
Andrea Campanella10426e22021-10-15 17:58:04 +0200121// This attribute specifies the minimum mean optical launch power that the RE uses to declare the
122// low transmit optical power alarm. Its value is a 2s-complement integer referred to 1-mW (i.e.,
123// dBm), with 0.5-dB granularity. The default value 0x7F selects the RE's internal policy. (R,-W)
124// (optional) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700125//
126// Upper Transmit Power Threshold
Andrea Campanella10426e22021-10-15 17:58:04 +0200127// This attribute specifies the maximum mean optical launch power that the RE uses to declare the
128// high transmit optical power alarm. Its value is a 2s-complement integer referred to 1-mW (i.e.,
129// dBm), with 0.5-dB granularity. The default value 0x7F selects the RE's internal policy. (R,-W)
130// (optional) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700131//
132// Usage Mode
Andrea Campanella10426e22021-10-15 17:58:04 +0200133// In a mid-span PON RE, an R'/S' interface may be used as the PON interface for the embedded
134// management ONU or the uplink interface for an S'/R' interface. This attribute specifies the
135// usage of the R'/S' interface. (R,-W) (mandatory) (1-byte)
136//
137// 0 Disable
138//
139// 1 This R'/S' interface is used as the uplink for the embedded management ONU
140//
141// 2 This R'/S' interface is used as the uplink for one or more PPTP RE UNI(s)
142//
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700143// 3 This R'/S' interface is used as the uplink for both the embedded management ONU and one or
144// more PPTP RE UNI(s) (in a time division fashion).
145//
146// Target Upstream Frequency
Andrea Campanella10426e22021-10-15 17:58:04 +0200147// This attribute specifies the frequency of the converted upstream signal on the optical trunk
148// line (OTL), in gigahertz. The converted frequency must conform to the frequency plan specified
149// in [ITUT G.984.6]. The value 0 means that the upstream signal frequency remains the same as the
150// original frequency; no frequency conversion is done. If the RE does not support provisionable
151// upstream frequency (wavelength), this attribute should take the fixed value representing the
152// RE's capability and the RE should deny attempts to set the value of the attribute. If the RE
153// does support provisionable upstream frequency conversion, the default value of this attribute is
154// 0. (R, W) (optional) (4 bytes).
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700155//
156// Target Downstream Frequency
Andrea Campanella10426e22021-10-15 17:58:04 +0200157// This attribute specifies the frequency of the downstream signal received by the RE on the OTL,
158// in gigahertz. The incoming frequency must conform to the frequency plan specified in [ITUT
159// G.984.6]. The default value 0 means that the downstream frequency remains the same as its
160// original frequency; no frequency conversion is done. If the RE does not support provisionable
161// downstream frequency selectivity, this attribute should take the fixed value representing the
162// RE's capability, and the RE should deny attempts to set the value of the attribute. If the RE
163// does support provisionable downstream frequency selectivity, the default value of this attribute
164// is 0. (R, W) (optional) (4 bytes).
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700165//
166// Upstream Signal Transmission Mode
Andrea Campanella10426e22021-10-15 17:58:04 +0200167// When true, this Boolean attribute enables conversion from burst mode to continuous mode. The
168// default value false specifies burst mode upstream transmission. If the RE does not have the
169// ability to convert from burst to continuous mode transmission, it should deny attempts to set
170// this attribute to true. (R, W) (optional) (1 byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700171//
172type ReAniG struct {
173 ManagedEntityDefinition
174 Attributes AttributeValueMap
175}
176
Elia Battiston9bfe1102022-02-03 10:38:03 +0100177// Attribute name constants
178
179const ReAniG_AdministrativeState = "AdministrativeState"
180const ReAniG_OperationalState = "OperationalState"
181const ReAniG_Arc = "Arc"
182const ReAniG_ArcInterval = "ArcInterval"
183const ReAniG_OpticalSignalLevel = "OpticalSignalLevel"
184const ReAniG_LowerOpticalThreshold = "LowerOpticalThreshold"
185const ReAniG_UpperOpticalThreshold = "UpperOpticalThreshold"
186const ReAniG_TransmitOpticalLevel = "TransmitOpticalLevel"
187const ReAniG_LowerTransmitPowerThreshold = "LowerTransmitPowerThreshold"
188const ReAniG_UpperTransmitPowerThreshold = "UpperTransmitPowerThreshold"
189const ReAniG_UsageMode = "UsageMode"
190const ReAniG_TargetUpstreamFrequency = "TargetUpstreamFrequency"
191const ReAniG_TargetDownstreamFrequency = "TargetDownstreamFrequency"
192const ReAniG_UpstreamSignalTransmissionMode = "UpstreamSignalTransmissionMode"
193
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700194func init() {
195 reanigBME = &ManagedEntityDefinition{
196 Name: "ReAniG",
Elia Battiston9bfe1102022-02-03 10:38:03 +0100197 ClassID: ReAniGClassID,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700198 MessageTypes: mapset.NewSetWith(
199 Get,
200 Set,
201 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -0800202 AllowedAttributeMask: 0xfffc,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700203 AttributeDefinitions: AttributeDefinitionMap{
Elia Battiston9bfe1102022-02-03 10:38:03 +0100204 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
205 1: ByteField(ReAniG_AdministrativeState, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
206 2: ByteField(ReAniG_OperationalState, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, true, false, 2),
207 3: ByteField(ReAniG_Arc, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), true, true, false, 3),
208 4: ByteField(ReAniG_ArcInterval, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
209 5: Uint16Field(ReAniG_OpticalSignalLevel, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, true, false, 5),
210 6: ByteField(ReAniG_LowerOpticalThreshold, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, true, false, 6),
211 7: ByteField(ReAniG_UpperOpticalThreshold, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, true, false, 7),
212 8: Uint16Field(ReAniG_TransmitOpticalLevel, UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
213 9: ByteField(ReAniG_LowerTransmitPowerThreshold, UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
214 10: ByteField(ReAniG_UpperTransmitPowerThreshold, UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, true, false, 10),
215 11: ByteField(ReAniG_UsageMode, UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, false, false, 11),
216 12: Uint32Field(ReAniG_TargetUpstreamFrequency, UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
217 13: Uint32Field(ReAniG_TargetDownstreamFrequency, UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13),
218 14: ByteField(ReAniG_UpstreamSignalTransmissionMode, UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14),
Matteo Scandolof9d43412021-01-12 11:11:34 -0800219 },
220 Access: CreatedByOnu,
221 Support: UnknownSupport,
222 Alarms: AlarmMap{
223 0: "Low received optical power",
224 1: "High received optical power",
225 2: "Low transmit optical power",
226 3: "High transmit optical power",
227 4: "High laser bias current",
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700228 },
229 }
230}
231
Matteo Scandolof9d43412021-01-12 11:11:34 -0800232// NewReAniG (class ID 313) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700233// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -0800234// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700235func NewReAniG(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800236 return NewManagedEntity(*reanigBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700237}