blob: dce1d9d94e9c8fff2e513fdfc205060e9f136684 [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// ReAniGClassID is the 16-bit ID for the OMCI
26// Managed entity RE ANI-G
27const ReAniGClassID ClassID = ClassID(313)
28
29var reanigBME *ManagedEntityDefinition
30
31// ReAniG (class ID #313)
32// This ME organizes data associated with each R'/S' physical interface of an RE if the RE supports
33// OEO regeneration in either direction. The management ONU automatically creates one instance of
34// this ME for each R'/S' physical port (uni- or bidirectional) as follows.
35//
36// o When the RE has mid-span PON RE ANI interface ports built into its factory configuration.
37//
38// o When a cardholder is provisioned to expect a circuit pack of the mid-span PON RE ANI type.
39//
40// o When a cardholder provisioned for plug-and-play is equipped with a circuit pack of the midspan
41// PON RE ANI type. Note that the installation of a plug-and-play card may indicate the presence of
42// a mid-span PON RE ANI port via equipment ID as well as its type attribute, and indeed may cause
43// the management ONU to instantiate a port-mapping package to specify the ports precisely.
44//
45// The management ONU automatically deletes instances of this ME when a cardholder is neither
46// provisioned to expect a mid-span PON RE ANI circuit pack, nor is it equipped with a mid-span PON
47// RE ANI circuit pack.
48//
49// As illustrated in Figure 8.2.10-4, an RE ANI-G may share the physical port with an RE downstream
50// amplifier. The ONU declares a shared configuration through the port-mapping package combined
51// port table, whose structure defines one ME as the master. It is recommended that the RE ANI-G be
52// the master, with the RE downstream amplifier as a secondary ME.
53//
54// The administrative state, operational state and ARC attributes of the master ME override similar
55// attributes in secondary MEs associated with the same port. In the secondary ME, these attributes
56// are present, but cause no action when written and have undefined values when read. The RE
57// downstream amplifier should use its provisionable downstream alarm thresholds and should declare
58// downstream alarms as necessary; other isomorphic alarms should be declared by the RE ANI-G. The
59// test action should be addressed to the master ME.
60//
61// Relationships
62// An instance of this ME is associated with each R'/S' physical interface of an RE that includes
63// OEO regeneration in either direction, and with one or more instances of the PPTP RE UNI. It may
64// also be associated with an RE downstream amplifier.
65//
66// Attributes
67// Managed Entity Id
68// NOTE 1 - This ME ID may be identical to that of an RE downstream amplifier if it shares the same
69// physical slot and port.
70//
71// Administrative State
72// NOTE 2 - When an RE supports multiple PONs, or protected access to a single PON, its primary
73// ANI-G cannot be completely shut down, due to a loss of the management communications capability.
74// Complete blocking of service and removal of power may nevertheless be appropriate for secondary
75// RE ANI-Gs. Administrative lock suppresses alarms and notifications for an RE ANI-G, be it either
76// primary or secondary.
77//
78// Operational State
79// Operational state: This attribute indicates whether the ME is capable of performing its
80// function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
81//
82// Arc
83// ARC: See clause A.1.4.3. (R,-W) (optional) (1-byte)
84//
85// Arc Interval
86// ARC interval: See clause A.1.4.3. (R,-W) (optional) (1-byte)
87//
88// Optical Signal Level
89// Optical signal level: This attribute reports the current measurement of total downstream optical
90// power. Its value is a 2s complement integer referred to 1-mW (i.e., dBm), with 0.002-dB
91// granularity. (R) (optional) (2-bytes)
92//
93// Lower Optical Threshold
94// Lower optical threshold: This attribute specifies the optical level that the RE uses to declare
95// the downstream low received optical power alarm. Valid values are -127-dBm (coded as 254) to
96// 0-dBm (coded as 0) in 0.5-dB increments. The default value 0xFF selects the RE's internal
97// policy. (R,-W) (optional) (1-byte)
98//
99// Upper Optical Threshold
100// Upper optical threshold: This attribute specifies the optical level that the RE uses to declare
101// the downstream high received optical power alarm. Valid values are -127-dBm (coded as 254) to
102// 0-dBm (coded as 0) in 0.5 dB increments. The default value 0xFF selects the RE's internal
103// policy. (R,-W) (optional) (1-byte)
104//
105// Transmit Optical Level
106// Transmit optical level: This attribute reports the current measurement of mean optical launch
107// power. Its value is a 2s complement integer referred to 1-mW (i.e., dBm), with 0.002-dB
108// granularity. (R) (optional) (2-bytes)
109//
110// Lower Transmit Power Threshold
111// Lower transmit power threshold: This attribute specifies the minimum mean optical launch power
112// that the RE uses to declare the low transmit optical power alarm. Its value is a 2s-complement
113// integer referred to 1-mW (i.e., dBm), with 0.5-dB granularity. The default value 0x7F selects
114// the RE's internal policy. (R,-W) (optional) (1-byte)
115//
116// Upper Transmit Power Threshold
117// Upper transmit power threshold: This attribute specifies the maximum mean optical launch power
118// that the RE uses to declare the high transmit optical power alarm. Its value is a 2s-complement
119// integer referred to 1-mW (i.e., dBm), with 0.5-dB granularity. The default value 0x7F selects
120// the RE's internal policy. (R,-W) (optional) (1-byte)
121//
122// Usage Mode
123// 3 This R'/S' interface is used as the uplink for both the embedded management ONU and one or
124// more PPTP RE UNI(s) (in a time division fashion).
125//
126// Target Upstream Frequency
127// Target upstream frequency: This attribute specifies the frequency of the converted upstream
128// signal on the optical trunk line (OTL), in gigahertz. The converted frequency must conform to
129// the frequency plan specified in [ITUT G.984.6]. The value 0 means that the upstream signal
130// frequency remains the same as the original frequency; no frequency conversion is done. If the RE
131// does not support provisionable upstream frequency (wavelength), this attribute should take the
132// fixed value representing the RE's capability and the RE should deny attempts to set the value of
133// the attribute. If the RE does support provisionable upstream frequency conversion, the default
134// value of this attribute is 0. (R, W) (optional) (4 bytes).
135//
136// Target Downstream Frequency
137// Target downstream frequency: This attribute specifies the frequency of the downstream signal
138// received by the RE on the OTL, in gigahertz. The incoming frequency must conform to the
139// frequency plan specified in [ITUT G.984.6]. The default value 0 means that the downstream
140// frequency remains the same as its original frequency; no frequency conversion is done. If the RE
141// does not support provisionable downstream frequency selectivity, this attribute should take the
142// fixed value representing the RE's capability, and the RE should deny attempts to set the value
143// of the attribute. If the RE does support provisionable downstream frequency selectivity, the
144// default value of this attribute is 0. (R, W) (optional) (4 bytes).
145//
146// Upstream Signal Transmission Mode
147// Upstream signal transmission mode: When true, this Boolean attribute enables conversion from
148// burst mode to continuous mode. The default value false specifies burst mode upstream
149// transmission. If the RE does not have the ability to convert from burst to continuous mode
150// transmission, it should deny attempts to set this attribute to true. (R, W) (optional) (1 byte)
151//
152type ReAniG struct {
153 ManagedEntityDefinition
154 Attributes AttributeValueMap
155}
156
157func init() {
158 reanigBME = &ManagedEntityDefinition{
159 Name: "ReAniG",
160 ClassID: 313,
161 MessageTypes: mapset.NewSetWith(
162 Get,
163 Set,
164 ),
165 AllowedAttributeMask: 0xfffc,
166 AttributeDefinitions: AttributeDefinitionMap{
167 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
168 1: ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
169 2: ByteField("OperationalState", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, true, false, 2),
170 3: ByteField("Arc", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), true, true, false, 3),
171 4: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
172 5: Uint16Field("OpticalSignalLevel", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, true, false, 5),
173 6: ByteField("LowerOpticalThreshold", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, true, false, 6),
174 7: ByteField("UpperOpticalThreshold", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, true, false, 7),
175 8: Uint16Field("TransmitOpticalLevel", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
176 9: ByteField("LowerTransmitPowerThreshold", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
177 10: ByteField("UpperTransmitPowerThreshold", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, true, false, 10),
178 11: ByteField("UsageMode", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, false, false, 11),
179 12: Uint32Field("TargetUpstreamFrequency", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
180 13: Uint32Field("TargetDownstreamFrequency", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13),
181 14: ByteField("UpstreamSignalTransmissionMode", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14),
182 },
183 Access: CreatedByOnu,
184 Support: UnknownSupport,
185 }
186}
187
188// NewReAniG (class ID 313) creates the basic
189// Managed Entity definition that is used to validate an ME of this type that
190// is received from or transmitted to the OMCC.
191func NewReAniG(params ...ParamData) (*ManagedEntity, OmciErrors) {
192 return NewManagedEntity(*reanigBME, params...)
193}