blob: 93cf64b5f22f1cab7a86dba0239e3f6d7dba60c8 [file] [log] [blame]
Holger Hildebrandtfa074992020-03-27 15:42:06 +00001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00004 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00005 * 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
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00008 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +000011 * 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 */
Himani Chawlaac1f5ad2021-02-04 21:21:54 +053017/*
Holger Hildebrandtfa074992020-03-27 15:42:06 +000018 * 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
mpagenko836a1fd2021-11-01 16:12:42 +000030const ReUpstreamAmplifierClassID = ClassID(315) // 0x013b
Holger Hildebrandtfa074992020-03-27 15:42:06 +000031
32var reupstreamamplifierBME *ManagedEntityDefinition
33
mpagenko836a1fd2021-11-01 16:12:42 +000034// ReUpstreamAmplifier (Class ID: #315 / 0x013b)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000035// 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
mpagenko836a1fd2021-11-01 16:12:42 +000061// 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//
Holger Hildebrandtfa074992020-03-27 15:42:06 +000065// 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
mpagenko836a1fd2021-11-01 16:12:42 +000069// 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//
Holger Hildebrandtfa074992020-03-27 15:42:06 +000072// NOTE 2 - Administrative lock of an RE upstream amplifier results in LOS from any downstream
73// ONUs.
74//
75// Operational State
mpagenko836a1fd2021-11-01 16:12:42 +000076// 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)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000078//
79// Operational Mode
mpagenko836a1fd2021-11-01 16:12:42 +000080// This attribute indicates the operational mode as follows.
81//
82// 0 Constant gain
83//
84// 1 Constant output power
85//
86// 2 Autonomous
87//
Holger Hildebrandtfa074992020-03-27 15:42:06 +000088// (R,-W) (mandatory) (1-byte)
89//
90// Arc
mpagenko836a1fd2021-11-01 16:12:42 +000091// See clause A.1.4.3. (R,-W) (optional) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000092//
93// Arc Interval
mpagenko836a1fd2021-11-01 16:12:42 +000094// See clause A.1.4.3. (R,-W) (optional) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000095//
96// Re Downstream Amplifier Pointer
mpagenko836a1fd2021-11-01 16:12:42 +000097// This attribute points to an RE downstream amplifier instance. The default value is 0xFFFF, a
98// null pointer. (R,-W) (mandatory) (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000099//
100// Total Optical Receive Signal Level Table
mpagenko836a1fd2021-11-01 16:12:42 +0000101// 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.)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000111//
112// Per Burst Receive Signal Level Table
mpagenko836a1fd2021-11-01 16:12:42 +0000113// 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.)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000119//
120// Lower Receive Optical Threshold
mpagenko836a1fd2021-11-01 16:12:42 +0000121// 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)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000124//
125// Upper Receive Optical Threshold
mpagenko836a1fd2021-11-01 16:12:42 +0000126// 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)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000129//
130// Transmit Optical Signal Level
mpagenko836a1fd2021-11-01 16:12:42 +0000131// 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)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000134//
135// Lower Transmit Optical Threshold
mpagenko836a1fd2021-11-01 16:12:42 +0000136// 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)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000140//
141// Upper Transmit Optical Threshold
mpagenko836a1fd2021-11-01 16:12:42 +0000142// 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)
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000146//
147type ReUpstreamAmplifier struct {
148 ManagedEntityDefinition
149 Attributes AttributeValueMap
150}
151
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000152// Attribute name constants
153
154const ReUpstreamAmplifier_AdministrativeState = "AdministrativeState"
155const ReUpstreamAmplifier_OperationalState = "OperationalState"
156const ReUpstreamAmplifier_OperationalMode = "OperationalMode"
157const ReUpstreamAmplifier_Arc = "Arc"
158const ReUpstreamAmplifier_ArcInterval = "ArcInterval"
159const ReUpstreamAmplifier_ReDownstreamAmplifierPointer = "ReDownstreamAmplifierPointer"
160const ReUpstreamAmplifier_TotalOpticalReceiveSignalLevelTable = "TotalOpticalReceiveSignalLevelTable"
161const ReUpstreamAmplifier_PerBurstReceiveSignalLevelTable = "PerBurstReceiveSignalLevelTable"
162const ReUpstreamAmplifier_LowerReceiveOpticalThreshold = "LowerReceiveOpticalThreshold"
163const ReUpstreamAmplifier_UpperReceiveOpticalThreshold = "UpperReceiveOpticalThreshold"
164const ReUpstreamAmplifier_TransmitOpticalSignalLevel = "TransmitOpticalSignalLevel"
165const ReUpstreamAmplifier_LowerTransmitOpticalThreshold = "LowerTransmitOpticalThreshold"
166const ReUpstreamAmplifier_UpperTransmitOpticalThreshold = "UpperTransmitOpticalThreshold"
167
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000168func init() {
169 reupstreamamplifierBME = &ManagedEntityDefinition{
170 Name: "ReUpstreamAmplifier",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000171 ClassID: ReUpstreamAmplifierClassID,
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000172 MessageTypes: mapset.NewSetWith(
173 Get,
174 GetNext,
175 Set,
176 ),
177 AllowedAttributeMask: 0xfff8,
178 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000179 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
180 1: ByteField(ReUpstreamAmplifier_AdministrativeState, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
181 2: ByteField(ReUpstreamAmplifier_OperationalState, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, true, false, 2),
182 3: ByteField(ReUpstreamAmplifier_OperationalMode, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
183 4: ByteField(ReUpstreamAmplifier_Arc, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), true, true, false, 4),
184 5: ByteField(ReUpstreamAmplifier_ArcInterval, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5),
185 6: Uint16Field(ReUpstreamAmplifier_ReDownstreamAmplifierPointer, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
186 7: TableField(ReUpstreamAmplifier_TotalOpticalReceiveSignalLevelTable, TableAttributeType, 0x0200, TableInfo{nil, 4}, mapset.NewSetWith(Read), false, true, false, 7),
187 8: TableField(ReUpstreamAmplifier_PerBurstReceiveSignalLevelTable, TableAttributeType, 0x0100, TableInfo{nil, 4}, mapset.NewSetWith(Read), false, true, false, 8),
188 9: ByteField(ReUpstreamAmplifier_LowerReceiveOpticalThreshold, UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
189 10: ByteField(ReUpstreamAmplifier_UpperReceiveOpticalThreshold, UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, true, false, 10),
190 11: Uint16Field(ReUpstreamAmplifier_TransmitOpticalSignalLevel, UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, true, false, 11),
191 12: ByteField(ReUpstreamAmplifier_LowerTransmitOpticalThreshold, UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
192 13: ByteField(ReUpstreamAmplifier_UpperTransmitOpticalThreshold, UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13),
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000193 },
194 Access: CreatedByOnu,
195 Support: UnknownSupport,
Himani Chawlaac1f5ad2021-02-04 21:21:54 +0530196 Alarms: AlarmMap{
197 0: "Low received optical power",
198 1: "High received optical power",
199 2: "Low transmit optical power",
200 3: "High transmit optical power",
201 4: "High laser bias current",
202 5: "S'/R' LOS",
203 },
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000204 }
205}
206
207// NewReUpstreamAmplifier (class ID 315) creates the basic
208// Managed Entity definition that is used to validate an ME of this type that
209// is received from or transmitted to the OMCC.
210func NewReUpstreamAmplifier(params ...ParamData) (*ManagedEntity, OmciErrors) {
211 return NewManagedEntity(*reupstreamamplifierBME, params...)
212}