blob: 084f6b3aed40dea227ac24a49c1bb708198bf9c1 [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// ReUpstreamAmplifierClassID is the 16-bit ID for the OMCI
26// Managed entity RE upstream amplifier
27const ReUpstreamAmplifierClassID ClassID = ClassID(315)
28
29var reupstreamamplifierBME *ManagedEntityDefinition
30
31// ReUpstreamAmplifier (class ID #315)
32// This ME organizes data associated with each upstream RE optical amplifier (OA) supported by the
33// RE. The management ONU automatically creates one instance of this ME for each upstream OA as
34// follows.
35//
36// o When the RE has mid-span PON RE upstream OA 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 upstream OA
39// type.
40//
41// o When a cardholder provisioned for plug-and-play is equipped with a circuit pack of the mid-
42// span PON RE upstream OA type. Note that the installation of a plug-and-play card may indicate
43// the presence of a mid-span PON RE upstream OA via equipment ID as well as its type attribute,
44// and indeed may cause the management ONU to instantiate a port-mapping package to specify the
45// ports precisely.
46//
47// The management ONU automatically deletes instances of this ME when a cardholder is neither
48// provisioned to expect a mid-span PON RE upstream OA circuit pack, nor is it equipped with a mid-
49// span PON RE upstream OA circuit pack.
50//
51// Relationships
52// An instance of this ME is associated with an upstream OA, and with an instance of a circuit
53// pack. If the RE includes OEO regeneration in either direction, the RE upstream amplifier is also
54// associated with a PPTP RE UNI. Refer to clause-9.14.2 for further discussion.
55//
56// Attributes
57// Managed Entity Id
58// NOTE 1 - This ME ID may be identical to that of a PPTP RE UNI if it shares the same physical
59// slot and port.
60//
61// Administrative State
62// NOTE 2 - Administrative lock of an RE upstream amplifier results in LOS from any downstream
63// ONUs.
64//
65// Operational State
66// Operational state: This attribute indicates whether the ME is capable of performing its
67// function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
68//
69// Operational Mode
70// (R,-W) (mandatory) (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// Re Downstream Amplifier Pointer
79// RE downstream amplifier pointer: This attribute points to an RE downstream amplifier instance.
80// The default value is 0xFFFF, a null pointer. (R,-W) (mandatory) (2-bytes)
81//
82// Total Optical Receive Signal Level Table
83// Total optical receive signal level table: This table attribute reports a series of measurements
84// of time-averaged input upstream optical signal power. The measurement circuit should have a
85// temporal response similar to a simple 1 pole low pass filter, with an effective time constant on
86// the order of a GTC frame time. Each table entry has a 2-byte frame counter field (most
87// significant end), and a 2-byte power measurement field. The frame counter field contains the
88// least significant 16-bits of the superframe counter received closest to the time of the
89// measurement. The power measurement field is a 2s-complement integer referred to 1-mW (i.e.,
90// dBm), with 0.002-dB granularity. The RE equipment should add entries to this table as frequently
91// as is reasonable. The RE should clear the table once it is read by the OLT. (R) (optional) (4-*
92// N-bytes, where N is the number of measurements present.)
93//
94// Per Burst Receive Signal Level Table
95// Per burst receive signal level table: This table attribute reports the most recent measurement
96// of received burst upstream optical signal power. Each table entry has a 2-byte ONU-ID field
97// (most significant end), and a 2-byte power measurement field. The power measurement field is a
98// 2s-complement integer referred to 1-mW (i.e.,-dBm), with 0.002-dB granularity. (R) (optional)
99// (4-* N-bytes, where N is the number of distinct ONUs connected to the S'/R' interface.)
100//
101// Lower Receive Optical Threshold
102// Lower receive optical threshold: This attribute specifies the optical level that the RE uses to
103// declare the low received optical power alarm. Valid values are -127-dBm (coded as 254) to 0-dBm
104// (coded as 0) in 0.5-dB increments. The default value 0xFF selects the RE's internal policy.
105// (R,-W) (optional) (1-byte)
106//
107// Upper Receive Optical Threshold
108// Upper receive optical threshold: This attribute specifies the optical level that the RE uses to
109// declare the high received optical power alarm. Valid values are -127-dBm (coded as 254) to 0-dBm
110// (coded as 0) in 0.5-dB increments. The default value 0xFF selects the RE's internal policy.
111// (R,-W) (optional) (1-byte)
112//
113// Transmit Optical Signal Level
114// Transmit optical signal level: This attribute reports the current measurement of the mean
115// optical launch power of the upstream OA. Its value is a 2s-complement integer referred to 1-mW
116// (i.e., dBm), with 0.002-dB granularity. (R) (optional) (2-bytes)
117//
118// Lower Transmit Optical Threshold
119// Lower transmit optical threshold: This attribute specifies the minimum mean optical launch power
120// that the RE uses to declare the low transmit optical power alarm. Its value is a 2s-complement
121// integer referred to 1-mW (i.e., dBm), with 0.5-dB granularity. The default value 0x7F selects
122// the RE's internal policy. (R,-W) (optional) (1-byte)
123//
124// Upper Transmit Optical Threshold
125// Upper transmit optical threshold: This attribute specifies the maximum mean optical launch power
126// that the RE uses to declare the high transmit optical power alarm. Its value is a 2s complement
127// integer referred to 1-mW (i.e., dBm), with 0.5-dB granularity. The default value 0x7F selects
128// the RE's internal policy. (R,-W) (optional) (1-byte)
129//
130type ReUpstreamAmplifier struct {
131 ManagedEntityDefinition
132 Attributes AttributeValueMap
133}
134
135func init() {
136 reupstreamamplifierBME = &ManagedEntityDefinition{
137 Name: "ReUpstreamAmplifier",
138 ClassID: 315,
139 MessageTypes: mapset.NewSetWith(
140 Get,
141 GetNext,
142 Set,
143 ),
144 AllowedAttributeMask: 0xfff8,
145 AttributeDefinitions: AttributeDefinitionMap{
146 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
147 1: ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
148 2: ByteField("OperationalState", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, true, false, 2),
149 3: ByteField("OperationalMode", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
150 4: ByteField("Arc", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), true, true, false, 4),
151 5: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5),
152 6: Uint16Field("ReDownstreamAmplifierPointer", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
153 7: TableField("TotalOpticalReceiveSignalLevelTable", TableAttributeType, 0x0200, TableInfo{nil, 4}, mapset.NewSetWith(Read), false, true, false, 7),
154 8: TableField("PerBurstReceiveSignalLevelTable", TableAttributeType, 0x0100, TableInfo{nil, 4}, mapset.NewSetWith(Read), false, true, false, 8),
155 9: ByteField("LowerReceiveOpticalThreshold", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
156 10: ByteField("UpperReceiveOpticalThreshold", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, true, false, 10),
157 11: Uint16Field("TransmitOpticalSignalLevel", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, true, false, 11),
158 12: ByteField("LowerTransmitOpticalThreshold", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
159 13: ByteField("UpperTransmitOpticalThreshold", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13),
160 },
161 Access: CreatedByOnu,
162 Support: UnknownSupport,
163 }
164}
165
166// NewReUpstreamAmplifier (class ID 315) creates the basic
167// Managed Entity definition that is used to validate an ME of this type that
168// is received from or transmitted to the OMCC.
169func NewReUpstreamAmplifier(params ...ParamData) (*ManagedEntity, OmciErrors) {
170 return NewManagedEntity(*reupstreamamplifierBME, params...)
171}