blob: 32f3e6289c7ea1a80d50d4012eae8db36d7a69fc [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// ReUpstreamAmplifierClassID is the 16-bit ID for the OMCI
29// Managed entity RE upstream amplifier
Chip Boling610117d2021-09-09 11:24:34 -050030const ReUpstreamAmplifierClassID = ClassID(315) // 0x013b
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var reupstreamamplifierBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// ReUpstreamAmplifier (Class ID: #315 / 0x013b)
Chip Boling6e27b352020-02-14 09:10:01 -060035// This ME organizes data associated with each upstream RE optical amplifier (OA) supported by the
36// RE. The management ONU automatically creates one instance of this ME for each upstream OA as
37// follows.
38//
39// o When the RE has mid-span PON RE upstream OA ports built into its factory configuration.
40//
41// o When a cardholder is provisioned to expect a circuit pack of the mid-span PON RE upstream OA
42// type.
43//
44// o When a cardholder provisioned for plug-and-play is equipped with a circuit pack of the mid-
45// span PON RE upstream OA type. Note that the installation of a plug-and-play card may indicate
46// the presence of a mid-span PON RE upstream OA via equipment ID as well as its type attribute,
47// and indeed may cause the management ONU to instantiate a port-mapping package to specify the
48// ports precisely.
49//
50// The management ONU automatically deletes instances of this ME when a cardholder is neither
51// provisioned to expect a mid-span PON RE upstream OA circuit pack, nor is it equipped with a mid-
52// span PON RE upstream OA circuit pack.
53//
54// Relationships
55// An instance of this ME is associated with an upstream OA, and with an instance of a circuit
56// pack. If the RE includes OEO regeneration in either direction, the RE upstream amplifier is also
57// associated with a PPTP RE UNI. Refer to clause-9.14.2 for further discussion.
58//
59// Attributes
60// Managed Entity Id
Chip Boling610117d2021-09-09 11:24:34 -050061// This attribute uniquely identifies each instance of this ME. Its value indicates the physical
62// position of the upstream OA. The first byte is the slot ID (defined in clause 9.1.5). The second
63// byte is the port ID. (R) (mandatory) (2-bytes)
64//
Chip Boling6e27b352020-02-14 09:10:01 -060065// NOTE 1 - This ME ID may be identical to that of a PPTP RE UNI if it shares the same physical
66// slot and port.
67//
68// Administrative State
Chip Boling610117d2021-09-09 11:24:34 -050069// This attribute locks (1) and unlocks (0) the functions performed by this ME. Administrative
70// state is further described in clause A.1.6. (R,-W) (mandatory) (1-byte)
71//
Chip Boling6e27b352020-02-14 09:10:01 -060072// NOTE 2 - Administrative lock of an RE upstream amplifier results in LOS from any downstream
73// ONUs.
74//
75// Operational State
Chip Boling610117d2021-09-09 11:24:34 -050076// This attribute indicates whether the ME is capable of performing its function. Valid values are
77// enabled (0) and disabled (1). (R) (optional) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -060078//
79// Operational Mode
Chip Boling610117d2021-09-09 11:24:34 -050080// This attribute indicates the operational mode as follows.
81//
82// 0 Constant gain
83//
84// 1 Constant output power
85//
86// 2 Autonomous
87//
Chip Boling6e27b352020-02-14 09:10:01 -060088// (R,-W) (mandatory) (1-byte)
89//
90// Arc
Chip Boling610117d2021-09-09 11:24:34 -050091// See clause A.1.4.3. (R,-W) (optional) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -060092//
93// Arc Interval
Chip Boling610117d2021-09-09 11:24:34 -050094// See clause A.1.4.3. (R,-W) (optional) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -060095//
96// Re Downstream Amplifier Pointer
Chip Boling610117d2021-09-09 11:24:34 -050097// This attribute points to an RE downstream amplifier instance. The default value is 0xFFFF, a
98// null pointer. (R,-W) (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060099//
100// Total Optical Receive Signal Level Table
Chip Boling610117d2021-09-09 11:24:34 -0500101// This table attribute reports a series of measurements of time-averaged input upstream optical
102// signal power. The measurement circuit should have a temporal response similar to a simple 1 pole
103// low pass filter, with an effective time constant on the order of a GTC frame time. Each table
104// entry has a 2-byte frame counter field (most significant end), and a 2-byte power measurement
105// field. The frame counter field contains the least significant 16-bits of the superframe counter
106// received closest to the time of the measurement. The power measurement field is a 2s-complement
107// integer referred to 1-mW (i.e., dBm), with 0.002-dB granularity. (Coding -32768 to +32767, where
108// 0x00 = 0-dBm, 0x03e8 = +2-dBm, etc.) The RE equipment should add entries to this table as
109// frequently as is reasonable. The RE should clear the table once it is read by the OLT. (R)
110// (optional) (4-* N-bytes, where N is the number of measurements present.)
Chip Boling6e27b352020-02-14 09:10:01 -0600111//
112// Per Burst Receive Signal Level Table
Chip Boling610117d2021-09-09 11:24:34 -0500113// This table attribute reports the most recent measurement of received burst upstream optical
114// signal power. Each table entry has a 2-byte ONU-ID field (most significant end), and a 2-byte
115// power measurement field. The power measurement field is a 2s-complement integer referred to 1-mW
116// (i.e.,-dBm), with 0.002-dB granularity. (Coding -32768 to +32767, where 0x00 = 0-dBm, 0x03e8 =
117// +2-dBm, etc.) (R) (optional) (4-* N-bytes, where N is the number of distinct ONUs connected to
118// the S'/R' interface.)
Chip Boling6e27b352020-02-14 09:10:01 -0600119//
120// Lower Receive Optical Threshold
Chip Boling610117d2021-09-09 11:24:34 -0500121// This attribute specifies the optical level that the RE uses to declare the low received optical
122// power alarm. Valid values are -127-dBm (coded as 254) to 0-dBm (coded as 0) in 0.5-dB
123// increments. The default value 0xFF selects the RE's internal policy. (R,-W) (optional) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -0600124//
125// Upper Receive Optical Threshold
Chip Boling610117d2021-09-09 11:24:34 -0500126// This attribute specifies the optical level that the RE uses to declare the high received optical
127// power alarm. Valid values are -127-dBm (coded as 254) to 0-dBm (coded as 0) in 0.5-dB
128// increments. The default value 0xFF selects the RE's internal policy. (R,-W) (optional) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -0600129//
130// Transmit Optical Signal Level
Chip Boling610117d2021-09-09 11:24:34 -0500131// This attribute reports the current measurement of the mean optical launch power of the upstream
132// OA. Its value is a 2s-complement integer referred to 1-mW (i.e., dBm), with 0.002-dB
133// granularity. (R) (optional) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600134//
135// Lower Transmit Optical Threshold
Chip Boling610117d2021-09-09 11:24:34 -0500136// This attribute specifies the minimum mean optical launch power that the RE uses to declare the
137// low transmit optical power alarm. Its value is a 2s-complement integer referred to 1-mW (i.e.,
138// dBm), with 0.5-dB granularity. The default value 0x7F selects the RE's internal policy. (R,-W)
139// (optional) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -0600140//
141// Upper Transmit Optical Threshold
Chip Boling610117d2021-09-09 11:24:34 -0500142// This attribute specifies the maximum mean optical launch power that the RE uses to declare the
143// high transmit optical power alarm. Its value is a 2s complement integer referred to 1-mW (i.e.,
144// dBm), with 0.5-dB granularity. The default value 0x7F selects the RE's internal policy. (R,-W)
145// (optional) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -0600146//
147type ReUpstreamAmplifier struct {
148 ManagedEntityDefinition
149 Attributes AttributeValueMap
150}
151
152func init() {
153 reupstreamamplifierBME = &ManagedEntityDefinition{
154 Name: "ReUpstreamAmplifier",
155 ClassID: 315,
156 MessageTypes: mapset.NewSetWith(
157 Get,
158 GetNext,
159 Set,
160 ),
161 AllowedAttributeMask: 0xfff8,
162 AttributeDefinitions: AttributeDefinitionMap{
163 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
164 1: ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
165 2: ByteField("OperationalState", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, true, false, 2),
166 3: ByteField("OperationalMode", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
167 4: ByteField("Arc", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), true, true, false, 4),
168 5: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5),
169 6: Uint16Field("ReDownstreamAmplifierPointer", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
170 7: TableField("TotalOpticalReceiveSignalLevelTable", TableAttributeType, 0x0200, TableInfo{nil, 4}, mapset.NewSetWith(Read), false, true, false, 7),
171 8: TableField("PerBurstReceiveSignalLevelTable", TableAttributeType, 0x0100, TableInfo{nil, 4}, mapset.NewSetWith(Read), false, true, false, 8),
172 9: ByteField("LowerReceiveOpticalThreshold", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
173 10: ByteField("UpperReceiveOpticalThreshold", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, true, false, 10),
174 11: Uint16Field("TransmitOpticalSignalLevel", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, true, false, 11),
175 12: ByteField("LowerTransmitOpticalThreshold", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
176 13: ByteField("UpperTransmitOpticalThreshold", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13),
177 },
178 Access: CreatedByOnu,
179 Support: UnknownSupport,
Chip Boling34ebcb62021-02-02 12:13:58 -0600180 Alarms: AlarmMap{
181 0: "Low received optical power",
182 1: "High received optical power",
183 2: "Low transmit optical power",
184 3: "High transmit optical power",
185 4: "High laser bias current",
186 5: "S'/R' LOS",
187 },
Chip Boling6e27b352020-02-14 09:10:01 -0600188 }
189}
190
191// NewReUpstreamAmplifier (class ID 315) creates the basic
192// Managed Entity definition that is used to validate an ME of this type that
193// is received from or transmitted to the OMCC.
194func NewReUpstreamAmplifier(params ...ParamData) (*ManagedEntity, OmciErrors) {
195 return NewManagedEntity(*reupstreamamplifierBME, params...)
196}