tdl-xoa-driver 1.5.1__py3-none-any.whl → 1.6.0__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.5.1.dist-info → tdl_xoa_driver-1.6.0.dist-info}/METADATA +1 -1
- {tdl_xoa_driver-1.5.1.dist-info → tdl_xoa_driver-1.6.0.dist-info}/RECORD +89 -88
- xoa_driver/__init__.py +2 -2
- xoa_driver/enums.py +10 -10
- xoa_driver/functions/anlt.py +60 -78
- xoa_driver/functions/cli/testbed_config.py +1 -1
- xoa_driver/functions/cmis/_replies.py +4 -4
- xoa_driver/functions/mgmt.py +206 -250
- xoa_driver/functions/tools.py +11 -6
- xoa_driver/internals/commands/c_commands.py +59 -0
- xoa_driver/internals/commands/enums.py +101 -90
- xoa_driver/internals/commands/m4_commands.py +25 -0
- xoa_driver/internals/commands/m4e_commands.py +6 -0
- xoa_driver/internals/commands/m_commands.py +51 -1
- xoa_driver/internals/commands/p4_commands.py +63 -1
- xoa_driver/internals/commands/p4e_commands.py +9 -0
- xoa_driver/internals/commands/p4g_commands.py +139 -0
- xoa_driver/internals/commands/p_commands.py +455 -61
- xoa_driver/internals/commands/pc_commands.py +9 -0
- xoa_driver/internals/commands/pd_commands.py +11 -0
- xoa_driver/internals/commands/pe_commands.py +27 -0
- xoa_driver/internals/commands/pec_commands.py +9 -0
- xoa_driver/internals/commands/ped_commands.py +23 -0
- xoa_driver/internals/commands/pef_commands.py +43 -0
- xoa_driver/internals/commands/pf_commands.py +11 -0
- xoa_driver/internals/commands/pl1_commands.py +315 -48
- xoa_driver/internals/commands/pl_commands.py +8 -0
- xoa_driver/internals/commands/pm_commands.py +11 -0
- xoa_driver/internals/commands/pp_commands.py +84 -27
- xoa_driver/internals/commands/pr_commands.py +25 -0
- xoa_driver/internals/commands/ps_commands.py +47 -1
- xoa_driver/internals/commands/pt_commands.py +15 -0
- xoa_driver/internals/commands/px_commands.py +180 -136
- xoa_driver/internals/commands/subtypes.py +4 -3
- xoa_driver/internals/core/transporter/protocol/payload/base_struct.py +1 -1
- xoa_driver/internals/hli/indices/macsecscs/base_macsecsc.py +41 -3
- xoa_driver/internals/hli/modules/modules_l23/family_combi.py +0 -64
- xoa_driver/internals/hli/modules/modules_l23/family_edun.py +0 -2
- xoa_driver/internals/hli/modules/modules_l23/{family_g.py → family_loki.py} +29 -1
- xoa_driver/internals/hli/modules/modules_l23/family_odin.py +412 -0
- xoa_driver/internals/hli/modules/modules_l23/{family_l.py → family_thor.py} +44 -0
- xoa_driver/internals/hli/ports/port_l23/chimera/port_chimera.py +3 -3
- xoa_driver/internals/hli/ports/port_l23/family_edun.py +9 -44
- xoa_driver/internals/hli/ports/port_l23/{family_l1.py → family_freya.py} +10 -45
- xoa_driver/internals/hli/ports/port_l23/{family_g.py → family_loki.py} +33 -32
- xoa_driver/internals/hli/ports/port_l23/family_odin.py +225 -0
- xoa_driver/internals/hli/ports/port_l23/family_thor.py +67 -0
- xoa_driver/internals/hli/ports/port_l23/layer1/anlt.py +512 -0
- xoa_driver/internals/hli/ports/port_l23/layer1/brr.py +26 -0
- xoa_driver/internals/hli/ports/port_l23/layer1/eye_diagram.py +71 -0
- xoa_driver/internals/hli/ports/port_l23/{pcs_pma_ijkl_chimera.py → layer1/impair.py} +7 -7
- xoa_driver/internals/hli/ports/port_l23/layer1/laser_power.py +28 -0
- xoa_driver/internals/hli/ports/port_l23/{family_e.py → layer1/lower_power.py} +1 -51
- xoa_driver/internals/hli/ports/port_l23/{freya_l1.py → layer1/medium.py} +38 -358
- xoa_driver/internals/hli/ports/port_l23/layer1/pcs_fec.py +219 -0
- xoa_driver/internals/hli/ports/port_l23/layer1/pma.py +43 -0
- xoa_driver/internals/hli/ports/port_l23/layer1/prbs.py +39 -0
- xoa_driver/internals/hli/ports/port_l23/layer1/preamble.py +25 -0
- xoa_driver/internals/hli/ports/port_l23/{fault_jkl.py → layer1/rs_fault.py} +2 -2
- xoa_driver/internals/hli/ports/port_l23/layer1/siv.py +69 -0
- xoa_driver/internals/hli/ports/port_l23/layer1_edun.py +103 -0
- xoa_driver/internals/hli/ports/port_l23/layer1_freya.py +103 -0
- xoa_driver/internals/hli/ports/port_l23/layer1_loki.py +74 -0
- xoa_driver/internals/hli/ports/port_l23/layer1_thor.py +70 -0
- xoa_driver/internals/hli/ports/port_l23/port_l23ve.py +4 -4
- xoa_driver/internals/hli/ports/port_l23/sec/__init__.py +0 -0
- xoa_driver/internals/hli/ports/port_l23/sec/macsec.py +108 -0
- xoa_driver/internals/hli/ports/port_l23/tcvr/__init__.py +0 -0
- xoa_driver/internals/hli/ports/port_l23/{bases/port_transceiver.py → tcvr/cmis.py} +4 -118
- xoa_driver/internals/hli/ports/port_l23/tcvr/transceiver.py +124 -0
- xoa_driver/internals/hli/ports/port_l23/trafficgen/__init__.py +0 -0
- xoa_driver/internals/hli/ports/port_l23/{bases → trafficgen}/port_l23.py +1 -1
- xoa_driver/internals/hli/ports/port_l23/{bases → trafficgen}/port_l23_genuine.py +5 -45
- xoa_driver/internals/hli/ports/port_l23/{bases/port_reception_statistics.py → trafficgen/port_rx_stats.py} +0 -21
- xoa_driver/internals/hli/ports/port_l23/{bases/port_transmission_statistics.py → trafficgen/port_tx_stats.py} +2 -22
- xoa_driver/internals/hli/ports/port_l23/trafficgen/runt.py +32 -0
- xoa_driver/internals/hli/testers/l23_tester.py +1 -3
- xoa_driver/internals/utils/indices/_interfaces.py +18 -6
- xoa_driver/internals/utils/indices/index_manager.py +8 -2
- xoa_driver/internals/utils/managers/ports_manager.py +5 -2
- xoa_driver/misc.py +6 -6
- xoa_driver/modules.py +31 -47
- xoa_driver/ports.py +10 -29
- xoa_driver/internals/hli/modules/modules_l23/family_d.py +0 -75
- xoa_driver/internals/hli/modules/modules_l23/family_e.py +0 -85
- xoa_driver/internals/hli/modules/modules_l23/family_f.py +0 -145
- xoa_driver/internals/hli/modules/modules_l23/family_h.py +0 -40
- xoa_driver/internals/hli/modules/modules_l23/family_i.py +0 -25
- xoa_driver/internals/hli/modules/modules_l23/family_j.py +0 -25
- xoa_driver/internals/hli/modules/modules_l23/family_k.py +0 -39
- xoa_driver/internals/hli/modules/modules_l23/family_m.py +0 -25
- xoa_driver/internals/hli/modules/modules_l23/family_n.py +0 -40
- xoa_driver/internals/hli/ports/port_l23/edun_l1.py +0 -181
- xoa_driver/internals/hli/ports/port_l23/family_combi.py +0 -37
- xoa_driver/internals/hli/ports/port_l23/family_d.py +0 -51
- xoa_driver/internals/hli/ports/port_l23/family_f.py +0 -151
- xoa_driver/internals/hli/ports/port_l23/family_h.py +0 -67
- xoa_driver/internals/hli/ports/port_l23/family_i.py +0 -84
- xoa_driver/internals/hli/ports/port_l23/family_j.py +0 -68
- xoa_driver/internals/hli/ports/port_l23/family_k.py +0 -73
- xoa_driver/internals/hli/ports/port_l23/family_l.py +0 -82
- xoa_driver/internals/hli/ports/port_l23/family_m.py +0 -29
- xoa_driver/internals/hli/ports/port_l23/pcs_pma_ghijkl.py +0 -369
- xoa_driver/internals/hli/ports/port_l23/pcs_pma_l.py +0 -78
- {tdl_xoa_driver-1.5.1.dist-info → tdl_xoa_driver-1.6.0.dist-info}/WHEEL +0 -0
- {tdl_xoa_driver-1.5.1.dist-info → tdl_xoa_driver-1.6.0.dist-info}/licenses/LICENSE +0 -0
- {tdl_xoa_driver-1.5.1.dist-info → tdl_xoa_driver-1.6.0.dist-info}/top_level.txt +0 -0
- /xoa_driver/internals/hli/modules/modules_l23/{family_l1.py → family_freya.py} +0 -0
- /xoa_driver/internals/hli/ports/port_l23/{bases → layer1}/__init__.py +0 -0
- /xoa_driver/internals/hli/ports/port_l23/{bases → trafficgen}/port_capture.py +0 -0
xoa_driver/functions/anlt.py
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
"""The anlt high-level function module."""
|
|
2
|
-
|
|
3
2
|
from __future__ import annotations
|
|
4
3
|
from dataclasses import dataclass, field
|
|
5
|
-
|
|
4
|
+
from typing import (
|
|
5
|
+
TYPE_CHECKING,
|
|
6
|
+
Union,
|
|
7
|
+
Any,
|
|
8
|
+
Generator,
|
|
9
|
+
List,
|
|
10
|
+
)
|
|
11
|
+
if TYPE_CHECKING:
|
|
12
|
+
from xoa_driver.ports import Z800FreyaPort
|
|
6
13
|
from xoa_driver import enums
|
|
7
14
|
from xoa_driver.utils import apply
|
|
8
|
-
from xoa_driver.internals.hli.ports.port_l23.family_l import FamilyL
|
|
9
|
-
from xoa_driver.internals.hli.ports.port_l23.family_l1 import FamilyFreya
|
|
10
|
-
from xoa_driver.ports import GenericL23Port
|
|
11
15
|
from xoa_driver.lli import commands
|
|
12
16
|
from xoa_driver.internals.core import interfaces as itf
|
|
13
17
|
from xoa_driver.misc import Token
|
|
@@ -23,14 +27,9 @@ from .tools import (
|
|
|
23
27
|
)
|
|
24
28
|
import asyncio
|
|
25
29
|
|
|
26
|
-
PcsPmaSupported = (FamilyL, FamilyFreya)
|
|
27
|
-
AutoNegSupported = (FamilyL, FamilyFreya)
|
|
28
|
-
LinkTrainingSupported = FamilyL
|
|
29
|
-
|
|
30
|
-
|
|
31
30
|
@dataclass
|
|
32
31
|
class DoAnlt:
|
|
33
|
-
port:
|
|
32
|
+
port: "Z800FreyaPort"
|
|
34
33
|
"""port object"""
|
|
35
34
|
should_do_an: bool
|
|
36
35
|
"""should the port do autoneg?"""
|
|
@@ -117,7 +116,7 @@ class DoAnlt:
|
|
|
117
116
|
|
|
118
117
|
return _an_mode, _lt_mode, _timeout_mode
|
|
119
118
|
|
|
120
|
-
def __builder__(self) ->
|
|
119
|
+
def __builder__(self) -> Generator[Token, None, None]:
|
|
121
120
|
"""Defining commands sequence"""
|
|
122
121
|
|
|
123
122
|
# # Set autoneg timeout
|
|
@@ -169,7 +168,7 @@ class DoAnlt:
|
|
|
169
168
|
|
|
170
169
|
|
|
171
170
|
async def anlt_start(
|
|
172
|
-
port:
|
|
171
|
+
port: "Z800FreyaPort",
|
|
173
172
|
should_do_an: bool,
|
|
174
173
|
should_do_lt: bool,
|
|
175
174
|
an_allow_loopback: bool,
|
|
@@ -180,12 +179,10 @@ async def anlt_start(
|
|
|
180
179
|
should_enable_lt_timeout: bool,
|
|
181
180
|
) -> None:
|
|
182
181
|
"""
|
|
183
|
-
.. versionchanged:: 2.5
|
|
184
|
-
|
|
185
182
|
Start ANLT on a port
|
|
186
183
|
|
|
187
184
|
:param port: the port object
|
|
188
|
-
:type port: :class:`~xoa_driver.ports.
|
|
185
|
+
:type port: :class:`~xoa_driver.ports.Z800FreyaPort`
|
|
189
186
|
:param should_do_an: should the port do autoneg?
|
|
190
187
|
:type should_do_an: bool
|
|
191
188
|
:param should_do_lt: should the port do link training?
|
|
@@ -218,14 +215,12 @@ async def anlt_start(
|
|
|
218
215
|
await anlt.run()
|
|
219
216
|
|
|
220
217
|
|
|
221
|
-
async def autoneg_status(port:
|
|
218
|
+
async def autoneg_status(port: "Z800FreyaPort") -> dict[str, Any]:
|
|
222
219
|
"""
|
|
223
|
-
.. versionchanged:: 2.5
|
|
224
|
-
|
|
225
220
|
Get the auto-negotiation status
|
|
226
221
|
|
|
227
222
|
:param port: the port object
|
|
228
|
-
:type port: :class:`~xoa_driver.ports.
|
|
223
|
+
:type port: :class:`~xoa_driver.ports.Z800FreyaPort`
|
|
229
224
|
:return:
|
|
230
225
|
:rtype: typing.Dict[str, typing.Any]
|
|
231
226
|
"""
|
|
@@ -240,7 +235,7 @@ async def autoneg_status(port: GenericL23Port) -> dict[str, t.Any]:
|
|
|
240
235
|
return dictionize_autoneg_status(loopback, auto_neg_info, status)
|
|
241
236
|
|
|
242
237
|
|
|
243
|
-
LinkTrainType =
|
|
238
|
+
LinkTrainType = Union[
|
|
244
239
|
enums.LinkTrainCoeffs,
|
|
245
240
|
enums.LinkTrainPresets,
|
|
246
241
|
enums.LinkTrainEncoding,
|
|
@@ -249,7 +244,7 @@ LinkTrainType = t.Union[
|
|
|
249
244
|
|
|
250
245
|
|
|
251
246
|
async def __lt_coeff(
|
|
252
|
-
port:
|
|
247
|
+
port: "Z800FreyaPort",
|
|
253
248
|
serdes: int,
|
|
254
249
|
arg: LinkTrainType,
|
|
255
250
|
*,
|
|
@@ -268,7 +263,7 @@ async def __lt_coeff(
|
|
|
268
263
|
|
|
269
264
|
|
|
270
265
|
async def lt_coeff_inc(
|
|
271
|
-
port:
|
|
266
|
+
port: "Z800FreyaPort",
|
|
272
267
|
serdes: int,
|
|
273
268
|
emphasis: enums.LinkTrainCoeffs
|
|
274
269
|
) -> enums.LinkTrainCmdResults:
|
|
@@ -276,7 +271,7 @@ async def lt_coeff_inc(
|
|
|
276
271
|
Ask the remote port to increase coeff of the specified serdes.
|
|
277
272
|
|
|
278
273
|
:param port: the port object
|
|
279
|
-
:type port: :class:`~xoa_driver.ports.
|
|
274
|
+
:type port: :class:`~xoa_driver.ports.Z800FreyaPort`
|
|
280
275
|
:param serdes: the serdes index, starting from 0
|
|
281
276
|
:type serdes: int
|
|
282
277
|
:param emphasis: the emphasis to increase
|
|
@@ -288,7 +283,7 @@ async def lt_coeff_inc(
|
|
|
288
283
|
|
|
289
284
|
|
|
290
285
|
async def lt_coeff_dec(
|
|
291
|
-
port:
|
|
286
|
+
port: "Z800FreyaPort",
|
|
292
287
|
serdes: int,
|
|
293
288
|
emphasis: enums.LinkTrainCoeffs
|
|
294
289
|
) -> enums.LinkTrainCmdResults:
|
|
@@ -296,7 +291,7 @@ async def lt_coeff_dec(
|
|
|
296
291
|
Ask the remote port to decrease coeff of the specified serdes.
|
|
297
292
|
|
|
298
293
|
:param port: the port object
|
|
299
|
-
:type port: :class:`~xoa_driver.ports.
|
|
294
|
+
:type port: :class:`~xoa_driver.ports.Z800FreyaPort`
|
|
300
295
|
:param serdes: the serdes index, starting from 0
|
|
301
296
|
:type serdes: int
|
|
302
297
|
:param emphasis: the emphasis to decrease
|
|
@@ -308,7 +303,7 @@ async def lt_coeff_dec(
|
|
|
308
303
|
|
|
309
304
|
|
|
310
305
|
async def lt_coeff_no_eq(
|
|
311
|
-
port:
|
|
306
|
+
port: "Z800FreyaPort",
|
|
312
307
|
serdes: int,
|
|
313
308
|
emphasis: enums.LinkTrainCoeffs
|
|
314
309
|
) -> enums.LinkTrainCmdResults:
|
|
@@ -317,7 +312,7 @@ async def lt_coeff_no_eq(
|
|
|
317
312
|
Ask the remote port to set the coeff to NO_EQ on the specified serdes.
|
|
318
313
|
|
|
319
314
|
:param port: the port object
|
|
320
|
-
:type port: :class:`~xoa_driver.ports.
|
|
315
|
+
:type port: :class:`~xoa_driver.ports.Z800FreyaPort`
|
|
321
316
|
:param serdes: the serdes index, starting from 0
|
|
322
317
|
:type serdes: int
|
|
323
318
|
:param emphasis: the emphasis to set to NO_EQ
|
|
@@ -329,7 +324,7 @@ async def lt_coeff_no_eq(
|
|
|
329
324
|
|
|
330
325
|
|
|
331
326
|
async def lt_preset(
|
|
332
|
-
port:
|
|
327
|
+
port: "Z800FreyaPort",
|
|
333
328
|
serdes: int,
|
|
334
329
|
preset: enums.LinkTrainPresets
|
|
335
330
|
) -> enums.LinkTrainCmdResults:
|
|
@@ -337,7 +332,7 @@ async def lt_preset(
|
|
|
337
332
|
Ask the remote port to use the preset of the specified serdes.
|
|
338
333
|
|
|
339
334
|
:param port: the port object
|
|
340
|
-
:type port: :class:`~xoa_driver.ports.
|
|
335
|
+
:type port: :class:`~xoa_driver.ports.Z800FreyaPort`
|
|
341
336
|
:param serdes: the serdes index, starting from 0
|
|
342
337
|
:type serdes: int
|
|
343
338
|
:param preset: preset index to select for the serdes, 0,1,2,3,4,
|
|
@@ -349,7 +344,7 @@ async def lt_preset(
|
|
|
349
344
|
|
|
350
345
|
|
|
351
346
|
async def lt_encoding(
|
|
352
|
-
port:
|
|
347
|
+
port: "Z800FreyaPort",
|
|
353
348
|
serdes: int,
|
|
354
349
|
encoding: enums.LinkTrainEncoding
|
|
355
350
|
) -> enums.LinkTrainCmdResults:
|
|
@@ -357,7 +352,7 @@ async def lt_encoding(
|
|
|
357
352
|
Ask the remote port to use the encoding of the specified serdes.
|
|
358
353
|
|
|
359
354
|
:param port: the port object
|
|
360
|
-
:type port: :class:`~xoa_driver.ports.
|
|
355
|
+
:type port: :class:`~xoa_driver.ports.Z800FreyaPort`
|
|
361
356
|
:param serdes: the serdes index, starting from 0
|
|
362
357
|
:type serdes: int
|
|
363
358
|
:param encoding: link training encoding
|
|
@@ -368,12 +363,12 @@ async def lt_encoding(
|
|
|
368
363
|
return await __lt_coeff(port, serdes, encoding, cmd=enums.LinkTrainCmd.CMD_ENCODING)
|
|
369
364
|
|
|
370
365
|
|
|
371
|
-
async def lt_trained(port:
|
|
366
|
+
async def lt_trained(port: "Z800FreyaPort", serdes: int) -> enums.LinkTrainCmdResults:
|
|
372
367
|
"""
|
|
373
368
|
Tell the remote port that the current serdes is trained.
|
|
374
369
|
|
|
375
370
|
:param port: the port object
|
|
376
|
-
:type port: :class:`~xoa_driver.ports.
|
|
371
|
+
:type port: :class:`~xoa_driver.ports.Z800FreyaPort`
|
|
377
372
|
:param serdes: the serdes index, starting from 0
|
|
378
373
|
:type serdes: int
|
|
379
374
|
:return:
|
|
@@ -387,14 +382,12 @@ async def lt_trained(port: GenericL23Port, serdes: int) -> enums.LinkTrainCmdRes
|
|
|
387
382
|
)
|
|
388
383
|
|
|
389
384
|
|
|
390
|
-
async def lt_status(port:
|
|
385
|
+
async def lt_status(port: "Z800FreyaPort", serdes: int) -> dict[str, Any]:
|
|
391
386
|
"""
|
|
392
|
-
.. versionchanged:: 2.5
|
|
393
|
-
|
|
394
387
|
Show the link training status.
|
|
395
388
|
|
|
396
389
|
:param port: the port object
|
|
397
|
-
:type port: :class:`~xoa_driver.ports.
|
|
390
|
+
:type port: :class:`~xoa_driver.ports.Z800FreyaPort`
|
|
398
391
|
:param serdes: the serdes index, starting from 0
|
|
399
392
|
:type serdes: int
|
|
400
393
|
:return: LT status of the serdes
|
|
@@ -419,12 +412,12 @@ async def lt_status(port: GenericL23Port, serdes: int) -> dict[str, t.Any]:
|
|
|
419
412
|
)
|
|
420
413
|
|
|
421
414
|
|
|
422
|
-
async def txtap_get(port:
|
|
415
|
+
async def txtap_get(port: "Z800FreyaPort", serdes: int) -> dict[str, int]:
|
|
423
416
|
"""
|
|
424
417
|
Get the tap value of the local TX tap.
|
|
425
418
|
|
|
426
419
|
:param port: the port object
|
|
427
|
-
:type port: :class:`~xoa_driver.ports.
|
|
420
|
+
:type port: :class:`~xoa_driver.ports.Z800FreyaPort`
|
|
428
421
|
:param serdes: the serdes index, starting from 0
|
|
429
422
|
:type serdes: int
|
|
430
423
|
:return: tap values of the serdes
|
|
@@ -436,19 +429,19 @@ async def txtap_get(port: GenericL23Port, serdes: int) -> dict[str, int]:
|
|
|
436
429
|
|
|
437
430
|
|
|
438
431
|
async def txtap_set(
|
|
439
|
-
port:
|
|
432
|
+
port: "Z800FreyaPort",
|
|
440
433
|
serdes: int,
|
|
441
434
|
pre3: int,
|
|
442
435
|
pre2: int,
|
|
443
436
|
pre: int,
|
|
444
437
|
main: int,
|
|
445
|
-
|
|
438
|
+
post: int,
|
|
446
439
|
) -> None:
|
|
447
440
|
"""
|
|
448
441
|
Set the tap value of the local TX tap.
|
|
449
442
|
|
|
450
443
|
:param port: the port object
|
|
451
|
-
:type port: :class:`~xoa_driver.ports.
|
|
444
|
+
:type port: :class:`~xoa_driver.ports.Z800FreyaPort`
|
|
452
445
|
:param serdes: the serdes index, starting from 0
|
|
453
446
|
:type serdes: int
|
|
454
447
|
:param pre3: pre3 value
|
|
@@ -459,29 +452,22 @@ async def txtap_set(
|
|
|
459
452
|
:type pre: int
|
|
460
453
|
:param main: main value
|
|
461
454
|
:type main: int
|
|
462
|
-
:param
|
|
463
|
-
:type
|
|
455
|
+
:param post: post value
|
|
456
|
+
:type post: int
|
|
464
457
|
:return:
|
|
465
458
|
:rtype: None
|
|
466
459
|
"""
|
|
467
460
|
conn, mid, pid = get_ctx(port)
|
|
468
461
|
cmd_ = commands.PP_PHYTXEQ(conn, mid, pid, serdes)
|
|
469
|
-
await cmd_.set(
|
|
470
|
-
pre=pre,
|
|
471
|
-
main=main,
|
|
472
|
-
post=post1,
|
|
473
|
-
pre2=pre2,
|
|
474
|
-
pre3_post2=pre3,
|
|
475
|
-
post3=0,
|
|
476
|
-
)
|
|
462
|
+
await cmd_.set(tap_values=[pre, main, post, pre2, pre3])
|
|
477
463
|
|
|
478
464
|
|
|
479
|
-
async def anlt_link_recovery(port:
|
|
465
|
+
async def anlt_link_recovery(port: "Z800FreyaPort", restart_link_down: bool, restart_lt_failure: bool) -> None:
|
|
480
466
|
"""
|
|
481
467
|
This command manages the auto-restart features.
|
|
482
468
|
|
|
483
469
|
:param port: the port object
|
|
484
|
-
:type port: :class:`~xoa_driver.ports.
|
|
470
|
+
:type port: :class:`~xoa_driver.ports.Z800FreyaPort`
|
|
485
471
|
:param restart_link_down: enable AN+LT auto-restart when a link down condition is detected. A "link down" state signifies the loss of a valid input signal, which can occur due to events such as cable unplugging and re-plugging, TX disable, or link flap on the link partner's end. The auto-restart process will continue until the link is re-established. Please note that this setting is only effective when AN and/or LT are enabled.
|
|
486
472
|
:type restart_link_down: bool
|
|
487
473
|
:param restart_lt_failure: if LT is enabled and experiences a failure on either side, the port will initiate the AN+LT restart process repeatedly until LT succeeds. This functionality is only applicable when LT is enabled.
|
|
@@ -501,14 +487,12 @@ async def anlt_link_recovery(port: GenericL23Port, restart_link_down: bool, rest
|
|
|
501
487
|
await cmd_.set(values=[param])
|
|
502
488
|
|
|
503
489
|
|
|
504
|
-
async def anlt_status(port:
|
|
490
|
+
async def anlt_status(port: "Z800FreyaPort") -> dict[str, Any]:
|
|
505
491
|
"""
|
|
506
|
-
.. versionchanged:: 2.5
|
|
507
|
-
|
|
508
492
|
Get the overview of ANLT status
|
|
509
493
|
|
|
510
494
|
:param port: the port object
|
|
511
|
-
:type port: :class:`~xoa_driver.ports.
|
|
495
|
+
:type port: :class:`~xoa_driver.ports.Z800FreyaPort`
|
|
512
496
|
:return: AN/LT status of the port
|
|
513
497
|
:rtype: typing.Dict[str, typing.Any]
|
|
514
498
|
"""
|
|
@@ -529,12 +513,12 @@ async def anlt_status(port: GenericL23Port) -> dict[str, t.Any]:
|
|
|
529
513
|
return dictionize_anlt_status(_link_recovery, _anlt_op, _linktrain_cfg, _capabilities, _allow_loopback)
|
|
530
514
|
|
|
531
515
|
|
|
532
|
-
async def anlt_log(port:
|
|
516
|
+
async def anlt_log(port: "Z800FreyaPort") -> str:
|
|
533
517
|
"""
|
|
534
518
|
Get the anlt log messages
|
|
535
519
|
|
|
536
520
|
:param port: the port object
|
|
537
|
-
:type port: :class:`~xoa_driver.ports.
|
|
521
|
+
:type port: :class:`~xoa_driver.ports.Z800FreyaPort`
|
|
538
522
|
:return: AN/LT protocol log traces of the port
|
|
539
523
|
:rtype: str
|
|
540
524
|
"""
|
|
@@ -543,14 +527,12 @@ async def anlt_log(port: GenericL23Port) -> str:
|
|
|
543
527
|
return log.log_string
|
|
544
528
|
|
|
545
529
|
|
|
546
|
-
async def anlt_stop(port:
|
|
530
|
+
async def anlt_stop(port: "Z800FreyaPort") -> None:
|
|
547
531
|
"""
|
|
548
|
-
.. versionchanged:: 2.5
|
|
549
|
-
|
|
550
532
|
Stop AN & LT
|
|
551
533
|
|
|
552
534
|
:param port: the port object
|
|
553
|
-
:type port: :class:`~xoa_driver.ports.
|
|
535
|
+
:type port: :class:`~xoa_driver.ports.Z800FreyaPort`
|
|
554
536
|
"""
|
|
555
537
|
conn, mid, pid = get_ctx(port)
|
|
556
538
|
|
|
@@ -560,12 +542,12 @@ async def anlt_stop(port: GenericL23Port) -> None:
|
|
|
560
542
|
)
|
|
561
543
|
|
|
562
544
|
|
|
563
|
-
async def txtap_autotune(port:
|
|
545
|
+
async def txtap_autotune(port: "Z800FreyaPort", serdes: int) -> None:
|
|
564
546
|
"""
|
|
565
547
|
Auto tune the tap value of the local TX tap.
|
|
566
548
|
|
|
567
549
|
:param port: the port object
|
|
568
|
-
:type port: :class:`~xoa_driver.ports.
|
|
550
|
+
:type port: :class:`~xoa_driver.ports.Z800FreyaPort`
|
|
569
551
|
:param serdes: the serdes index, starting from 0
|
|
570
552
|
:type serdes: int
|
|
571
553
|
:return:
|
|
@@ -577,12 +559,12 @@ async def txtap_autotune(port: GenericL23Port, serdes: int) -> None:
|
|
|
577
559
|
await phy_autotune.set(on_off=enums.OnOff.ON)
|
|
578
560
|
|
|
579
561
|
|
|
580
|
-
async def lt_im_status(port:
|
|
562
|
+
async def lt_im_status(port: "Z800FreyaPort") -> dict[str, Any]:
|
|
581
563
|
"""
|
|
582
564
|
Get LT initial modulation config
|
|
583
565
|
|
|
584
566
|
:param port: the port object
|
|
585
|
-
:type port: :class:`~xoa_driver.ports.
|
|
567
|
+
:type port: :class:`~xoa_driver.ports.Z800FreyaPort`
|
|
586
568
|
:return: LT initial modulation configuration of the port
|
|
587
569
|
:rtype: typing.Dict[str, typing.Any]
|
|
588
570
|
"""
|
|
@@ -599,12 +581,12 @@ async def lt_im_status(port: GenericL23Port) -> dict[str, t.Any]:
|
|
|
599
581
|
return dictionize_lt_im_status(capabilities, initial_mods)
|
|
600
582
|
|
|
601
583
|
|
|
602
|
-
async def lt_algorithm_status(port:
|
|
584
|
+
async def lt_algorithm_status(port: "Z800FreyaPort") -> dict[str, Any]:
|
|
603
585
|
"""
|
|
604
586
|
Get LT initial modulation config
|
|
605
587
|
|
|
606
588
|
:param port: the port object
|
|
607
|
-
:type port: :class:`~xoa_driver.ports.
|
|
589
|
+
:type port: :class:`~xoa_driver.ports.Z800FreyaPort`
|
|
608
590
|
:return: LT initial modulation configuration of the port
|
|
609
591
|
:rtype: typing.Dict[str, typing.Any]
|
|
610
592
|
"""
|
|
@@ -621,12 +603,12 @@ async def lt_algorithm_status(port: GenericL23Port) -> dict[str, t.Any]:
|
|
|
621
603
|
return dictionize_lt_algorithm_status(capabilities, algorithms)
|
|
622
604
|
|
|
623
605
|
|
|
624
|
-
async def anlt_strict(port:
|
|
606
|
+
async def anlt_strict(port: "Z800FreyaPort", enable: bool) -> None:
|
|
625
607
|
"""
|
|
626
608
|
Should ANLT strict mode be enabled
|
|
627
609
|
|
|
628
610
|
:param port: the port object
|
|
629
|
-
:type port: :class:`~xoa_driver.ports.
|
|
611
|
+
:type port: :class:`~xoa_driver.ports.Z800FreyaPort`
|
|
630
612
|
:param enable: should ANLT strict mode be enabled
|
|
631
613
|
:type enable: bool
|
|
632
614
|
:return:
|
|
@@ -645,14 +627,14 @@ async def anlt_strict(port: GenericL23Port, enable: bool) -> None:
|
|
|
645
627
|
).set(values=[param])
|
|
646
628
|
|
|
647
629
|
|
|
648
|
-
async def anlt_log_control(port:
|
|
630
|
+
async def anlt_log_control(port: "Z800FreyaPort", types: List[enums.AnLtLogControl]) -> None:
|
|
649
631
|
"""
|
|
650
632
|
Control what should be logged for ANLT by xenaserver
|
|
651
633
|
|
|
652
634
|
:param port: the port object
|
|
653
|
-
:type port: :class:`~xoa_driver.ports.
|
|
635
|
+
:type port: :class:`~xoa_driver.ports.Z800FreyaPort`
|
|
654
636
|
:param types: control what should be logged for ANLT by xenaserver
|
|
655
|
-
:type types:
|
|
637
|
+
:type types: List[enums.AnLtLogControl]
|
|
656
638
|
:return:
|
|
657
639
|
:rtype: None
|
|
658
640
|
"""
|
|
@@ -671,12 +653,12 @@ async def anlt_log_control(port: GenericL23Port, types: t.List[enums.AnLtLogCont
|
|
|
671
653
|
enums.Layer1ConfigType.ANLT_LOG_CONTROL
|
|
672
654
|
).set(values=[param])
|
|
673
655
|
|
|
674
|
-
async def anlt_log_control_get(port:
|
|
656
|
+
async def anlt_log_control_get(port: "Z800FreyaPort") -> dict[str, bool]:
|
|
675
657
|
"""
|
|
676
658
|
Get ANLT log control config
|
|
677
659
|
|
|
678
660
|
:param port: the port object
|
|
679
|
-
:type port: :class:`~xoa_driver.ports.
|
|
661
|
+
:type port: :class:`~xoa_driver.ports.Z800FreyaPort`
|
|
680
662
|
:return: dict of log control status
|
|
681
663
|
:rtype: dict[str, bool]
|
|
682
664
|
"""
|
|
@@ -136,7 +136,7 @@ async def load_testbed_config(tester: testers.L23Tester, path: str, mode: str =
|
|
|
136
136
|
|
|
137
137
|
# Free the module before applying configuration
|
|
138
138
|
module = tester.modules.obtain(int(module_index))
|
|
139
|
-
await
|
|
139
|
+
await release_modules([module], should_release_ports=True)
|
|
140
140
|
# Reserve the module before applying configuration
|
|
141
141
|
xm.reserve_module(module_index)
|
|
142
142
|
|
|
@@ -142,14 +142,14 @@ class CMD0041hFirmwareManagementFeaturesReply(CMDBaseReply):
|
|
|
142
142
|
Value Maximum Number of Bytes (EPL)
|
|
143
143
|
|
|
144
144
|
* 0: 8 bytes (no extension of general length limit)
|
|
145
|
-
* i: 8
|
|
146
|
-
* 255: 8
|
|
145
|
+
* i: 8 x (1+i) bytes (0 <= i <= 255)
|
|
146
|
+
* 255: 8 x 256 = 2048 bytes
|
|
147
147
|
|
|
148
148
|
Value Maximum Number of Bytes (LPL)
|
|
149
149
|
|
|
150
150
|
* 0: 8 bytes (no extension of general length limit)
|
|
151
|
-
* i: 8
|
|
152
|
-
* i: 8
|
|
151
|
+
* i: 8 x (1+i) bytes (0 <= i <= 15)
|
|
152
|
+
* i: 8 x 16 = 128 bytes (16 <= i <= 256)
|
|
153
153
|
|
|
154
154
|
"""
|
|
155
155
|
self.write_mechanism: int = reply['write_mechanism']
|