tdl-xoa-driver 1.6.2__py3-none-any.whl → 1.7.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tdl_xoa_driver-1.6.2.dist-info → tdl_xoa_driver-1.7.1.dist-info}/METADATA +2 -2
- {tdl_xoa_driver-1.6.2.dist-info → tdl_xoa_driver-1.7.1.dist-info}/RECORD +23 -15
- {tdl_xoa_driver-1.6.2.dist-info → tdl_xoa_driver-1.7.1.dist-info}/WHEEL +1 -1
- xoa_driver/__init__.py +2 -2
- xoa_driver/enums.py +2 -0
- xoa_driver/functions/async_wrapper.py +130 -0
- xoa_driver/functions/layer1_adv.py +340 -0
- xoa_driver/functions/mgmt.py +96 -34
- xoa_driver/hlfuncs.py +4 -0
- xoa_driver/internals/commands/__init__.py +1 -0
- xoa_driver/internals/commands/enums.py +11 -1
- xoa_driver/internals/commands/pl1_commands.py +1 -1
- xoa_driver/internals/commands/pl1ad_commands.py +702 -0
- xoa_driver/internals/hli/ports/port_l23/family_freya.py +5 -0
- xoa_driver/internals/hli/ports/port_l23/family_odin.py +1 -1
- xoa_driver/internals/hli/ports/port_l23/layer1_adv/__init__.py +0 -0
- xoa_driver/internals/hli/ports/port_l23/layer1_adv/freq.py +38 -0
- xoa_driver/internals/hli/ports/port_l23/layer1_adv/pcs_fec.py +214 -0
- xoa_driver/internals/hli/ports/port_l23/layer1_adv/rs_fault.py +24 -0
- xoa_driver/internals/hli/ports/port_l23/layer1_freya.py +5 -0
- xoa_driver/internals/hli/ports/port_l23/layer1_freya_adv.py +61 -0
- {tdl_xoa_driver-1.6.2.dist-info → tdl_xoa_driver-1.7.1.dist-info}/licenses/LICENSE +0 -0
- {tdl_xoa_driver-1.6.2.dist-info → tdl_xoa_driver-1.7.1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,702 @@
|
|
|
1
|
+
"""Port Advanced Layer 1 Commands"""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
from dataclasses import dataclass
|
|
4
|
+
import typing
|
|
5
|
+
import functools
|
|
6
|
+
from xoa_driver.internals.core.builders import (
|
|
7
|
+
build_get_request,
|
|
8
|
+
build_set_request
|
|
9
|
+
)
|
|
10
|
+
from xoa_driver.internals.core import interfaces
|
|
11
|
+
from xoa_driver.internals.core.token import Token
|
|
12
|
+
from xoa_driver.internals.core.transporter.registry import register_command
|
|
13
|
+
from xoa_driver.internals.core.transporter.protocol.payload import (
|
|
14
|
+
field,
|
|
15
|
+
RequestBodyStruct,
|
|
16
|
+
ResponseBodyStruct,
|
|
17
|
+
XmpByte,
|
|
18
|
+
XmpInt,
|
|
19
|
+
XmpSequence,
|
|
20
|
+
XmpStr,
|
|
21
|
+
Hex,
|
|
22
|
+
XmpHex,
|
|
23
|
+
XmpLong,
|
|
24
|
+
)
|
|
25
|
+
from .enums import (
|
|
26
|
+
TrueFalse,
|
|
27
|
+
OnOff,
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
@register_command
|
|
31
|
+
@dataclass
|
|
32
|
+
class PL1AD_RX_FREQ_CURR:
|
|
33
|
+
"""
|
|
34
|
+
Return the current port Rx frequency in Hz.
|
|
35
|
+
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
code: typing.ClassVar[int] = 1303
|
|
39
|
+
pushed: typing.ClassVar[bool] = False
|
|
40
|
+
|
|
41
|
+
_connection: 'interfaces.IConnection'
|
|
42
|
+
_module: int
|
|
43
|
+
_port: int
|
|
44
|
+
|
|
45
|
+
class GetDataAttr(ResponseBodyStruct):
|
|
46
|
+
frequency_hz: int = field(XmpInt(signed=False))
|
|
47
|
+
"""Current port Rx frequency in Hz."""
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def get(self) -> Token[GetDataAttr]:
|
|
51
|
+
"""Get the current port Rx frequency in Hz.
|
|
52
|
+
|
|
53
|
+
:return: Current port Rx frequency in Hz
|
|
54
|
+
:rtype: PL1AD_RX_FREQ_CURR.GetDataAttr
|
|
55
|
+
"""
|
|
56
|
+
|
|
57
|
+
return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
@register_command
|
|
61
|
+
@dataclass
|
|
62
|
+
class PL1AD_RX_FREQ_MIN:
|
|
63
|
+
"""
|
|
64
|
+
Return the minimum port Rx frequency in Hz since the previous query.
|
|
65
|
+
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
code: typing.ClassVar[int] = 1305
|
|
69
|
+
pushed: typing.ClassVar[bool] = False
|
|
70
|
+
|
|
71
|
+
_connection: 'interfaces.IConnection'
|
|
72
|
+
_module: int
|
|
73
|
+
_port: int
|
|
74
|
+
|
|
75
|
+
class GetDataAttr(ResponseBodyStruct):
|
|
76
|
+
frequency_hz: int = field(XmpInt(signed=False))
|
|
77
|
+
"""Minimum port Rx frequency in Hz since the previous query."""
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def get(self) -> Token[GetDataAttr]:
|
|
81
|
+
"""Get the minimum port Rx frequency in Hz since the previous query.
|
|
82
|
+
:return: Minimum port Rx frequency in Hz since the previous query
|
|
83
|
+
:rtype: PL1AD_RX_FREQ_MIN.GetDataAttr
|
|
84
|
+
"""
|
|
85
|
+
|
|
86
|
+
return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
@register_command
|
|
90
|
+
@dataclass
|
|
91
|
+
class PL1AD_RX_FREQ_MAX:
|
|
92
|
+
"""
|
|
93
|
+
Return the maximum port Rx frequency in Hz since the previous query.
|
|
94
|
+
|
|
95
|
+
"""
|
|
96
|
+
|
|
97
|
+
code: typing.ClassVar[int] = 1304
|
|
98
|
+
pushed: typing.ClassVar[bool] = False
|
|
99
|
+
|
|
100
|
+
_connection: 'interfaces.IConnection'
|
|
101
|
+
_module: int
|
|
102
|
+
_port: int
|
|
103
|
+
|
|
104
|
+
class GetDataAttr(ResponseBodyStruct):
|
|
105
|
+
frequency_hz: int = field(XmpInt(signed=False))
|
|
106
|
+
"""Maximum port Rx frequency in Hz since the previous query."""
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def get(self) -> Token[GetDataAttr]:
|
|
110
|
+
"""Get the maximum port Rx frequency in Hz since the previous query.
|
|
111
|
+
:return: Maximum port Rx frequency in Hz since the previous query
|
|
112
|
+
:rtype: PL1AD_RX_FREQ_MAX.GetDataAttr
|
|
113
|
+
"""
|
|
114
|
+
|
|
115
|
+
return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
@register_command
|
|
119
|
+
@dataclass
|
|
120
|
+
class PL1AD_RX_LOL:
|
|
121
|
+
"""
|
|
122
|
+
Returns the current and the latched CDR Loss of Lock (LOL) status of the specified Serdes.
|
|
123
|
+
|
|
124
|
+
"""
|
|
125
|
+
|
|
126
|
+
code: typing.ClassVar[int] = 1312
|
|
127
|
+
pushed: typing.ClassVar[bool] = False
|
|
128
|
+
|
|
129
|
+
_connection: 'interfaces.IConnection'
|
|
130
|
+
_module: int
|
|
131
|
+
_port: int
|
|
132
|
+
_serdes_xindex: int
|
|
133
|
+
|
|
134
|
+
class GetDataAttr(ResponseBodyStruct):
|
|
135
|
+
current_lol: TrueFalse = field(XmpByte())
|
|
136
|
+
"""Current CDR Loss of Lock (LOL) status. `True` indicates a current LOL condition."""
|
|
137
|
+
|
|
138
|
+
latched_lol: TrueFalse = field(XmpByte())
|
|
139
|
+
"""Latched CDR Loss of Lock (LOL) status. `True` indicates a LOL condition has occurred."""
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
def get(self) -> Token[GetDataAttr]:
|
|
143
|
+
"""Get the current and latched CDR Loss of Lock (LOL) status of the specified Serdes.
|
|
144
|
+
|
|
145
|
+
:return: Current and latched CDR Loss of Lock (LOL) status of the specified Serdes
|
|
146
|
+
:rtype: PL1AD_RX_LOL.GetDataAttr
|
|
147
|
+
"""
|
|
148
|
+
|
|
149
|
+
return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex]))
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
@register_command
|
|
153
|
+
@dataclass
|
|
154
|
+
class PL1AD_RX_SKEW:
|
|
155
|
+
"""
|
|
156
|
+
Returns the relative skew in bits of the specified PCS lane.
|
|
157
|
+
|
|
158
|
+
"""
|
|
159
|
+
|
|
160
|
+
code: typing.ClassVar[int] = 1315
|
|
161
|
+
pushed: typing.ClassVar[bool] = False
|
|
162
|
+
|
|
163
|
+
_connection: 'interfaces.IConnection'
|
|
164
|
+
_module: int
|
|
165
|
+
_port: int
|
|
166
|
+
_lane_xindex: int
|
|
167
|
+
|
|
168
|
+
class GetDataAttr(ResponseBodyStruct):
|
|
169
|
+
skew_bits: int = field(XmpInt(signed=True))
|
|
170
|
+
"""Relative skew of the PCS lane measured in bits."""
|
|
171
|
+
|
|
172
|
+
def get(self) -> Token[GetDataAttr]:
|
|
173
|
+
"""Get the relative skew of the PCS lane measured in bits.
|
|
174
|
+
|
|
175
|
+
:return: Relative skew of the PCS lane measured in bits
|
|
176
|
+
:rtype: PL1AD_RX_SKEW.GetDataAttr
|
|
177
|
+
"""
|
|
178
|
+
|
|
179
|
+
return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._lane_xindex]))
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
@register_command
|
|
184
|
+
@dataclass
|
|
185
|
+
class PL1AD_RX_HIBER:
|
|
186
|
+
"""
|
|
187
|
+
Returns the current and the latched High BER status of the port.
|
|
188
|
+
"""
|
|
189
|
+
|
|
190
|
+
code: typing.ClassVar[int] = 1306
|
|
191
|
+
pushed: typing.ClassVar[bool] = False
|
|
192
|
+
|
|
193
|
+
_connection: 'interfaces.IConnection'
|
|
194
|
+
_module: int
|
|
195
|
+
_port: int
|
|
196
|
+
|
|
197
|
+
class GetDataAttr(ResponseBodyStruct):
|
|
198
|
+
|
|
199
|
+
current_hiber: TrueFalse = field(XmpByte())
|
|
200
|
+
"""Current High BER status. `True` indicates a current High BER condition."""
|
|
201
|
+
|
|
202
|
+
latched_hiber: TrueFalse = field(XmpByte())
|
|
203
|
+
"""Latched High BER status. `True` indicates a High BER condition has occurred."""
|
|
204
|
+
|
|
205
|
+
def get(self) -> Token[GetDataAttr]:
|
|
206
|
+
"""Get the current and latched High BER status of the port.
|
|
207
|
+
|
|
208
|
+
:return: Current and latched High BER status of the port
|
|
209
|
+
:rtype: PL1AD_RX_HIBER.GetDataAttr
|
|
210
|
+
"""
|
|
211
|
+
|
|
212
|
+
return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
@register_command
|
|
216
|
+
@dataclass
|
|
217
|
+
class PL1AD_RX_HISER:
|
|
218
|
+
"""
|
|
219
|
+
Returns the current and latched High SER status of the port, when High SER Alarm, controlled by ``PL1AD_RX_HISER_ALARM`` command, is enabled. If High SER Alarm is disabled, both status will be `False`.
|
|
220
|
+
|
|
221
|
+
High SER status is set if 5560 RS-FEC symbol errors are detected in a contiguous block of 8192 non-overlapping RS-FEC codewords.
|
|
222
|
+
|
|
223
|
+
"""
|
|
224
|
+
|
|
225
|
+
code: typing.ClassVar[int] = 1307
|
|
226
|
+
pushed: typing.ClassVar[bool] = False
|
|
227
|
+
|
|
228
|
+
_connection: 'interfaces.IConnection'
|
|
229
|
+
_module: int
|
|
230
|
+
_port: int
|
|
231
|
+
|
|
232
|
+
class GetDataAttr(ResponseBodyStruct):
|
|
233
|
+
|
|
234
|
+
alarm_state: OnOff = field(XmpByte())
|
|
235
|
+
"""Current state of the High SER Alarm of the port. `ON` indicates that High SER Alarm is enabled, `OFF` indicates it is disabled. The same alarm state can also be retrieved using ``PL1AD_RX_HISER_ALARM``."""
|
|
236
|
+
|
|
237
|
+
current_hiser: TrueFalse = field(XmpByte())
|
|
238
|
+
"""Current High SER status. `True` indicates a current High SER condition."""
|
|
239
|
+
|
|
240
|
+
latched_hiser: TrueFalse = field(XmpByte())
|
|
241
|
+
"""Latched High SER status. `True` indicates a High SER condition has occurred."""
|
|
242
|
+
|
|
243
|
+
def get(self) -> Token[GetDataAttr]:
|
|
244
|
+
"""Get the current and latched High SER status of the port.
|
|
245
|
+
|
|
246
|
+
:return: Current and latched High SER status of the port
|
|
247
|
+
:rtype: PL1AD_RX_HISER.GetDataAttr
|
|
248
|
+
"""
|
|
249
|
+
|
|
250
|
+
return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
@register_command
|
|
254
|
+
@dataclass
|
|
255
|
+
class PL1AD_RX_HISER_ALARM:
|
|
256
|
+
"""
|
|
257
|
+
Controls the High SER Alarm state of the port. When enabled, the port will signal a High SER Alarm if 5560 RS-FEC symbol errors are detected in a contiguous block of 8192 non-overlapping RS-FEC codewords (Use ``PL1AD_RX_HISER`` to retrieve the status). When disabled, the High SER Alarm will not be signaled regardless of the symbol error rate.
|
|
258
|
+
|
|
259
|
+
"""
|
|
260
|
+
|
|
261
|
+
code: typing.ClassVar[int] = 1308
|
|
262
|
+
pushed: typing.ClassVar[bool] = False
|
|
263
|
+
|
|
264
|
+
_connection: 'interfaces.IConnection'
|
|
265
|
+
_module: int
|
|
266
|
+
_port: int
|
|
267
|
+
|
|
268
|
+
class GetDataAttr(ResponseBodyStruct):
|
|
269
|
+
alarm_state: OnOff = field(XmpByte())
|
|
270
|
+
"""Enables or disables the High SER Alarm on the port. `ON` enables the alarm, `OFF` disables it."""
|
|
271
|
+
|
|
272
|
+
class SetDataAttr(RequestBodyStruct):
|
|
273
|
+
alarm_state: OnOff = field(XmpByte())
|
|
274
|
+
"""Enables or disables the High SER Alarm on the port. `ON` enables the alarm, `OFF` disables it."""
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
def get(self) -> Token[GetDataAttr]:
|
|
278
|
+
"""Get the High SER Alarm state of the port.
|
|
279
|
+
|
|
280
|
+
:return: High SER Alarm state of the port
|
|
281
|
+
:rtype: PL1AD_RX_HISER_ALARM.GetDataAttr
|
|
282
|
+
"""
|
|
283
|
+
|
|
284
|
+
return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
|
|
285
|
+
|
|
286
|
+
def set(self, alarm_state: OnOff) -> Token[None]:
|
|
287
|
+
"""Set the High SER Alarm state of the port.
|
|
288
|
+
|
|
289
|
+
:param alarm_state: Enables or disables the High SER Alarm on the port. `ON` enables the alarm, `OFF` disables it.
|
|
290
|
+
:type alarm_state: OnOff
|
|
291
|
+
"""
|
|
292
|
+
|
|
293
|
+
return Token(self._connection, build_set_request(self, module=self._module, port=self._port, alarm_state=alarm_state))
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
@register_command
|
|
297
|
+
@dataclass
|
|
298
|
+
class PL1AD_RX_DEG_SER:
|
|
299
|
+
"""
|
|
300
|
+
This command retrieves the current and latched Degraded SER status of the port.
|
|
301
|
+
|
|
302
|
+
A Degraded SER (Symbol Error Rate) Alarm indicates that the pre-FEC (Forward Error Correction) SER has exceeded a predefined threshold, signaling potential signal degradation.
|
|
303
|
+
|
|
304
|
+
"""
|
|
305
|
+
|
|
306
|
+
code: typing.ClassVar[int] = 1300
|
|
307
|
+
pushed: typing.ClassVar[bool] = False
|
|
308
|
+
|
|
309
|
+
_connection: 'interfaces.IConnection'
|
|
310
|
+
_module: int
|
|
311
|
+
_port: int
|
|
312
|
+
|
|
313
|
+
class GetDataAttr(ResponseBodyStruct):
|
|
314
|
+
current_deg_ser: TrueFalse = field(XmpByte())
|
|
315
|
+
"""Current Degraded SER status. `True` indicates a current Degraded SER condition."""
|
|
316
|
+
|
|
317
|
+
latched_deg_ser: TrueFalse = field(XmpByte())
|
|
318
|
+
"""Latched Degraded SER status. `True` indicates a Degraded SER condition has occurred."""
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
def get(self) -> Token[GetDataAttr]:
|
|
322
|
+
"""Get the current and latched Degraded SER status of the port.
|
|
323
|
+
|
|
324
|
+
:return: Current and latched Degraded SER status of the port
|
|
325
|
+
:rtype: PL1AD_RX_DEG_SER.GetDataAttr
|
|
326
|
+
"""
|
|
327
|
+
|
|
328
|
+
return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
@register_command
|
|
333
|
+
@dataclass
|
|
334
|
+
class PL1AD_RX_DEG_SER_THRESH:
|
|
335
|
+
"""
|
|
336
|
+
This command configures the thresholds for the Degraded SER Alarm.
|
|
337
|
+
|
|
338
|
+
A Degraded SER (Symbol Error Rate) Alarm indicates that the pre-FEC (Forward Error Correction) SER has exceeded a predefined threshold, signaling potential signal degradation.
|
|
339
|
+
|
|
340
|
+
Degraded SER is signaled when more than ``act_thresh`` RS-FEC symbol errors are detected within a contiguous block of ``degrade_interval`` RS-FEC codewords. It is no longer signaled when the error count falls below ``deact_thresh`` within a similar degrade_interval.
|
|
341
|
+
|
|
342
|
+
An uncorrectable RS-FEC codeword is counted as 16 erroneous symbols to account for the worst-case scenario of complete codeword failure.
|
|
343
|
+
|
|
344
|
+
Threshold changes take effect immediately. The activation threshold must be strictly greater than the deactivation threshold.
|
|
345
|
+
|
|
346
|
+
The ``degrade_interval`` parameter must be an even number and a multiple of the number of PCS flows as follows:
|
|
347
|
+
|
|
348
|
+
- 100G: 2 flows (1 PCS flow, but must be even)
|
|
349
|
+
- 200G/400G: 2 flows (2 PCS flows)
|
|
350
|
+
- 800G/1.6T: 4 flows (4 PCS flows)
|
|
351
|
+
|
|
352
|
+
"""
|
|
353
|
+
|
|
354
|
+
code: typing.ClassVar[int] = 1301
|
|
355
|
+
pushed: typing.ClassVar[bool] = False
|
|
356
|
+
|
|
357
|
+
_connection: 'interfaces.IConnection'
|
|
358
|
+
_module: int
|
|
359
|
+
_port: int
|
|
360
|
+
|
|
361
|
+
class GetDataAttr(ResponseBodyStruct):
|
|
362
|
+
act_thresh: int = field(XmpInt(signed=False))
|
|
363
|
+
"""Number of RS-FEC symbol errors in the specified ``degrade_interval`` to activate Degraded SER Alarm. Valid range is 1 to 65535. ``act_thresh`` must be strictly greater than ``deact_thresh``"""
|
|
364
|
+
|
|
365
|
+
deact_thresh: int = field(XmpInt(signed=False))
|
|
366
|
+
"""Number of RS-FEC symbol errors in the specified ``degrade_interval`` to deactivate Degraded SER Alarm. Valid range is 0 to 65534. ``deact_thresh`` must be strictly less than ``act_thresh``."""
|
|
367
|
+
|
|
368
|
+
degrade_interval: int = field(XmpInt(signed=False))
|
|
369
|
+
"""Number of RS-FEC codewords over which to monitor for symbol errors. Valid range is 2 to 65534. Must be an even number and a multiple of the number of PCS flows."""
|
|
370
|
+
|
|
371
|
+
class SetDataAttr(RequestBodyStruct):
|
|
372
|
+
act_thresh: int = field(XmpInt(signed=False))
|
|
373
|
+
"""Number of RS-FEC symbol errors in the specified ``degrade_interval`` to activate Degraded SER Alarm. Valid range is 1 to 65535. ``act_thresh`` must be strictly greater than ``deact_thresh``"""
|
|
374
|
+
|
|
375
|
+
deact_thresh: int = field(XmpInt(signed=False))
|
|
376
|
+
"""Number of RS-FEC symbol errors in the specified ``degrade_interval`` to deactivate Degraded SER Alarm. Valid range is 0 to 65534. ``deact_thresh`` must be strictly less than ``act_thresh``."""
|
|
377
|
+
|
|
378
|
+
degrade_interval: int = field(XmpInt(signed=False))
|
|
379
|
+
"""Number of RS-FEC codewords over which to monitor for symbol errors. Valid range is 2 to 65534. Must be an even number and a multiple of the number of PCS flows."""
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
def get(self) -> Token[GetDataAttr]:
|
|
383
|
+
"""Get the thresholds for the Degraded SER Alarm.
|
|
384
|
+
|
|
385
|
+
:return: Thresholds for the Degraded SER Alarm
|
|
386
|
+
:rtype: PL1AD_RX_DEG_SER_THRESH.GetDataAttr
|
|
387
|
+
"""
|
|
388
|
+
|
|
389
|
+
return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
|
|
390
|
+
|
|
391
|
+
def set(self, act_thresh: int, deact_thresh: int, degrade_interval: int) -> Token[None]:
|
|
392
|
+
"""Set the thresholds for the Degraded SER Alarm.
|
|
393
|
+
|
|
394
|
+
:param act_thresh: Number of RS-FEC symbol errors in the specified ``degrade_interval`` to activate Degraded SER Alarm.
|
|
395
|
+
:type act_thresh: int
|
|
396
|
+
:param deact_thresh: Number of RS-FEC symbol errors in the specified ``degrade_interval`` to deactivate Degraded SER Alarm.
|
|
397
|
+
:type deact_thresh: int
|
|
398
|
+
:param degrade_interval: Number of RS-FEC codewords over which to monitor for symbol errors.
|
|
399
|
+
:type degrade_interval: int
|
|
400
|
+
"""
|
|
401
|
+
|
|
402
|
+
return Token(self._connection, build_set_request(self, module=self._module, port=self._port, act_thresh=act_thresh, deact_thresh=deact_thresh, degrade_interval=degrade_interval))
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
@register_command
|
|
406
|
+
@dataclass
|
|
407
|
+
class PL1AD_RX_ERR_CW_CNT:
|
|
408
|
+
"""
|
|
409
|
+
Returns the number of cumulative erroneous 64b/66b codewords since the previous query.
|
|
410
|
+
|
|
411
|
+
Use ``PP_RXCLEAR`` to reset the counter.
|
|
412
|
+
|
|
413
|
+
"""
|
|
414
|
+
|
|
415
|
+
code: typing.ClassVar[int] = 1302
|
|
416
|
+
pushed: typing.ClassVar[bool] = False
|
|
417
|
+
|
|
418
|
+
_connection: 'interfaces.IConnection'
|
|
419
|
+
_module: int
|
|
420
|
+
_port: int
|
|
421
|
+
|
|
422
|
+
class GetDataAttr(ResponseBodyStruct):
|
|
423
|
+
err_cw_count: int = field(XmpInt(signed=False))
|
|
424
|
+
"""Number of erroneous 64b/66b codewords since the previous query."""
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
def get(self) -> Token[GetDataAttr]:
|
|
428
|
+
"""Get the number of cumulative erroneous 64b/66b codewords since the previous query.
|
|
429
|
+
|
|
430
|
+
:return: Number of erroneous 64b/66b codewords since the previous query
|
|
431
|
+
:rtype: PL1AD_RX_ERR_CW_CNT.GetDataAttr
|
|
432
|
+
"""
|
|
433
|
+
|
|
434
|
+
return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
@register_command
|
|
438
|
+
@dataclass
|
|
439
|
+
class PL1AD_RX_ITB_CNT:
|
|
440
|
+
"""
|
|
441
|
+
Returns the number of cumulated Invalid 256b/257b Transcode Blocks since the previous query.
|
|
442
|
+
|
|
443
|
+
Use ``PP_RXCLEAR`` to reset the counter.
|
|
444
|
+
|
|
445
|
+
"""
|
|
446
|
+
|
|
447
|
+
code: typing.ClassVar[int] = 1309
|
|
448
|
+
pushed: typing.ClassVar[bool] = False
|
|
449
|
+
|
|
450
|
+
_connection: 'interfaces.IConnection'
|
|
451
|
+
_module: int
|
|
452
|
+
_port: int
|
|
453
|
+
|
|
454
|
+
class GetDataAttr(ResponseBodyStruct):
|
|
455
|
+
|
|
456
|
+
itb_count: int = field(XmpInt(signed=False))
|
|
457
|
+
"""Number of cumulated Invalid 256b/257b Transcode Blocks since the previous query."""
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
def get(self) -> Token[GetDataAttr]:
|
|
461
|
+
"""Get the number of cumulated Invalid 256b/257b Transcode Blocks since the previous query
|
|
462
|
+
|
|
463
|
+
:return: Number of cumulated Invalid 256b/257b Transcode Blocks since the previous query
|
|
464
|
+
:rtype: PL1AD_RX_ITB_CNT.GetDataAttr
|
|
465
|
+
"""
|
|
466
|
+
|
|
467
|
+
return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
@register_command
|
|
471
|
+
@dataclass
|
|
472
|
+
class PL1AD_RX_LOSYNC_CNT:
|
|
473
|
+
"""
|
|
474
|
+
Reports the number of cumulated Loss of Synchronization (LOSYNC) events since the previous query.
|
|
475
|
+
|
|
476
|
+
Use ``PP_RXCLEAR`` to reset the counter.
|
|
477
|
+
|
|
478
|
+
"""
|
|
479
|
+
|
|
480
|
+
code: typing.ClassVar[int] = 1313
|
|
481
|
+
pushed: typing.ClassVar[bool] = False
|
|
482
|
+
|
|
483
|
+
_connection: 'interfaces.IConnection'
|
|
484
|
+
_module: int
|
|
485
|
+
_port: int
|
|
486
|
+
|
|
487
|
+
class GetDataAttr(ResponseBodyStruct):
|
|
488
|
+
|
|
489
|
+
losync_count: int = field(XmpInt(signed=False))
|
|
490
|
+
"""Number of cumulated Loss of Synchronization (LOSYNC) events since the previous query."""
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
def get(self) -> Token[GetDataAttr]:
|
|
494
|
+
"""Get the number of cumulated Loss of Synchronization (LOSYNC) events since the previous query.
|
|
495
|
+
|
|
496
|
+
:return: Number of cumulated Loss of Synchronization (LOSYNC) events since the previous query
|
|
497
|
+
:rtype: PL1AD_RX_LOSYNC_CNT.GetDataAttr
|
|
498
|
+
"""
|
|
499
|
+
|
|
500
|
+
return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
@register_command
|
|
505
|
+
@dataclass
|
|
506
|
+
class PL1AD_RX_LF_CNT:
|
|
507
|
+
"""
|
|
508
|
+
Returns the number of cumulated Local Fault conditions since the previous query.
|
|
509
|
+
|
|
510
|
+
Use ``PP_RXCLEAR`` to reset the counter.
|
|
511
|
+
|
|
512
|
+
"""
|
|
513
|
+
|
|
514
|
+
code: typing.ClassVar[int] = 1310
|
|
515
|
+
pushed: typing.ClassVar[bool] = False
|
|
516
|
+
|
|
517
|
+
_connection: 'interfaces.IConnection'
|
|
518
|
+
_module: int
|
|
519
|
+
_port: int
|
|
520
|
+
|
|
521
|
+
class GetDataAttr(ResponseBodyStruct):
|
|
522
|
+
|
|
523
|
+
lf_count: int = field(XmpInt(signed=False))
|
|
524
|
+
"""Number of cumulated Local Fault conditions since the previous query."""
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
def get(self) -> Token[GetDataAttr]:
|
|
528
|
+
"""Get the number of cumulated Local Fault conditions since the previous query.
|
|
529
|
+
|
|
530
|
+
:return: Number of cumulated Local Fault conditions since the previous query
|
|
531
|
+
:rtype: PL1AD_RX_LF_CNT.GetDataAttr
|
|
532
|
+
"""
|
|
533
|
+
|
|
534
|
+
return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
@register_command
|
|
538
|
+
@dataclass
|
|
539
|
+
class PL1AD_RX_RF_CNT:
|
|
540
|
+
"""
|
|
541
|
+
Returns the number of Remote Fault conditions since last query.
|
|
542
|
+
|
|
543
|
+
Use ``PP_RXCLEAR`` to reset the counter.
|
|
544
|
+
|
|
545
|
+
"""
|
|
546
|
+
|
|
547
|
+
code: typing.ClassVar[int] = 1314
|
|
548
|
+
pushed: typing.ClassVar[bool] = False
|
|
549
|
+
|
|
550
|
+
_connection: 'interfaces.IConnection'
|
|
551
|
+
_module: int
|
|
552
|
+
_port: int
|
|
553
|
+
|
|
554
|
+
class GetDataAttr(ResponseBodyStruct):
|
|
555
|
+
|
|
556
|
+
rf_count: int = field(XmpInt(signed=False))
|
|
557
|
+
"""Number of Remote Fault conditions since last query."""
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
def get(self) -> Token[GetDataAttr]:
|
|
561
|
+
"""Get the number of Remote Fault conditions since last query.
|
|
562
|
+
|
|
563
|
+
:return: Number of Remote Fault conditions since last query
|
|
564
|
+
:rtype: PL1AD_RX_RF_CNT.GetDataAttr
|
|
565
|
+
"""
|
|
566
|
+
|
|
567
|
+
return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
@register_command
|
|
571
|
+
@dataclass
|
|
572
|
+
class PL1AD_RX_LOA_CNT:
|
|
573
|
+
"""
|
|
574
|
+
Reports the number of cumulated Loss of Alignment (LOA) events since the previous query.
|
|
575
|
+
|
|
576
|
+
Use ``PP_RXCLEAR`` to reset the counter.
|
|
577
|
+
"""
|
|
578
|
+
|
|
579
|
+
code: typing.ClassVar[int] = 1311
|
|
580
|
+
pushed: typing.ClassVar[bool] = False
|
|
581
|
+
|
|
582
|
+
_connection: 'interfaces.IConnection'
|
|
583
|
+
_module: int
|
|
584
|
+
_port: int
|
|
585
|
+
|
|
586
|
+
class GetDataAttr(ResponseBodyStruct):
|
|
587
|
+
|
|
588
|
+
loa_count: int = field(XmpInt(signed=False))
|
|
589
|
+
"""Number of cumulated Loss of Alignment (LOA) events since the previous query."""
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
def get(self) -> Token[GetDataAttr]:
|
|
593
|
+
"""Get the number of cumulated Loss of Alignment (LOA) events since the previous query.
|
|
594
|
+
|
|
595
|
+
:return: Number of cumulated Loss of Alignment (LOA) events since the previous query
|
|
596
|
+
:rtype: PL1AD_RX_LOA_CNT.GetDataAttr
|
|
597
|
+
"""
|
|
598
|
+
|
|
599
|
+
return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
@register_command
|
|
603
|
+
@dataclass
|
|
604
|
+
class PL1AD_TX_FREQ_CURR:
|
|
605
|
+
"""
|
|
606
|
+
Return the current port Tx frequency in Hz.
|
|
607
|
+
"""
|
|
608
|
+
|
|
609
|
+
code: typing.ClassVar[int] = 1317
|
|
610
|
+
pushed: typing.ClassVar[bool] = False
|
|
611
|
+
|
|
612
|
+
_connection: 'interfaces.IConnection'
|
|
613
|
+
_module: int
|
|
614
|
+
_port: int
|
|
615
|
+
|
|
616
|
+
class GetDataAttr(ResponseBodyStruct):
|
|
617
|
+
frequency_hz: int = field(XmpInt(signed=False))
|
|
618
|
+
"""Current port Tx frequency in Hz."""
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
def get(self) -> Token[GetDataAttr]:
|
|
622
|
+
"""Get the current port Tx frequency in Hz.
|
|
623
|
+
|
|
624
|
+
:return: Current port Tx frequency in Hz
|
|
625
|
+
:rtype: PL1AD_TX_FREQ_CURR.GetDataAttr
|
|
626
|
+
"""
|
|
627
|
+
|
|
628
|
+
return Token(self._connection, build_get_request(self, module=self._module, port=self._port))
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
@register_command
|
|
632
|
+
@dataclass
|
|
633
|
+
class PL1AD_TX_ERR_CW:
|
|
634
|
+
"""
|
|
635
|
+
Sends an error 64b/66b codeword from the Tx port immediately when called.
|
|
636
|
+
|
|
637
|
+
"""
|
|
638
|
+
|
|
639
|
+
code: typing.ClassVar[int] = 1316
|
|
640
|
+
pushed: typing.ClassVar[bool] = False
|
|
641
|
+
|
|
642
|
+
_connection: 'interfaces.IConnection'
|
|
643
|
+
_module: int
|
|
644
|
+
_port: int
|
|
645
|
+
|
|
646
|
+
class SetDataAttr(RequestBodyStruct):
|
|
647
|
+
pass
|
|
648
|
+
|
|
649
|
+
def set(self) -> Token[None]:
|
|
650
|
+
"""Send an error 64b/66b codeword from the Tx port immediately.
|
|
651
|
+
"""
|
|
652
|
+
|
|
653
|
+
return Token(self._connection, build_set_request(self, module=self._module, port=self._port))
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
@register_command
|
|
657
|
+
@dataclass
|
|
658
|
+
class PL1AD_TX_ITB:
|
|
659
|
+
"""
|
|
660
|
+
Sends an Invalid 256b/257b Transcode Block from the Tx port immediately when called.
|
|
661
|
+
|
|
662
|
+
"""
|
|
663
|
+
|
|
664
|
+
code: typing.ClassVar[int] = 1318
|
|
665
|
+
pushed: typing.ClassVar[bool] = False
|
|
666
|
+
|
|
667
|
+
_connection: 'interfaces.IConnection'
|
|
668
|
+
_module: int
|
|
669
|
+
_port: int
|
|
670
|
+
|
|
671
|
+
class SetDataAttr(RequestBodyStruct):
|
|
672
|
+
pass
|
|
673
|
+
|
|
674
|
+
def set(self) -> Token[None]:
|
|
675
|
+
"""Send an Invalid 256b/257b Transcode Block from the Tx port immediately.
|
|
676
|
+
"""
|
|
677
|
+
|
|
678
|
+
return Token(self._connection, build_set_request(self, module=self._module, port=self._port))
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
__all__ = [
|
|
683
|
+
"PL1AD_RX_FREQ_CURR",
|
|
684
|
+
"PL1AD_RX_FREQ_MIN",
|
|
685
|
+
"PL1AD_RX_FREQ_MAX",
|
|
686
|
+
"PL1AD_RX_LOL",
|
|
687
|
+
"PL1AD_RX_SKEW",
|
|
688
|
+
"PL1AD_RX_HIBER",
|
|
689
|
+
"PL1AD_RX_HISER",
|
|
690
|
+
"PL1AD_RX_HISER_ALARM",
|
|
691
|
+
"PL1AD_RX_DEG_SER",
|
|
692
|
+
"PL1AD_RX_DEG_SER_THRESH",
|
|
693
|
+
"PL1AD_RX_ERR_CW_CNT",
|
|
694
|
+
"PL1AD_RX_ITB_CNT",
|
|
695
|
+
"PL1AD_RX_LOSYNC_CNT",
|
|
696
|
+
"PL1AD_RX_LF_CNT",
|
|
697
|
+
"PL1AD_RX_RF_CNT",
|
|
698
|
+
"PL1AD_RX_LOA_CNT",
|
|
699
|
+
"PL1AD_TX_FREQ_CURR",
|
|
700
|
+
"PL1AD_TX_ERR_CW",
|
|
701
|
+
"PL1AD_TX_ITB",
|
|
702
|
+
]
|