tdl-xoa-driver 1.3.0__py3-none-any.whl → 1.5.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.0.dist-info/METADATA +56 -0
- tdl_xoa_driver-1.5.0.dist-info/RECORD +231 -0
- xoa_driver/__init__.py +2 -2
- xoa_driver/enums.py +2 -0
- xoa_driver/exceptions.py +2 -0
- xoa_driver/functions/anlt.py +4 -2
- xoa_driver/functions/anlt_ll_debug.py +2 -0
- xoa_driver/functions/cli/__init__.py +21 -0
- xoa_driver/functions/cli/_cli_manager.py +541 -0
- xoa_driver/functions/cli/_config_block.py +334 -0
- xoa_driver/functions/cli/_socket_driver.py +111 -0
- xoa_driver/functions/cli/port_config.py +116 -0
- xoa_driver/functions/cli/testbed_config.py +179 -0
- xoa_driver/functions/cmis/__init__.py +8 -0
- xoa_driver/functions/cmis/_constants.py +25 -0
- xoa_driver/functions/cmis/_replies.py +600 -0
- xoa_driver/functions/cmis/_utils.py +49 -0
- xoa_driver/functions/cmis/cdb.py +1266 -0
- xoa_driver/functions/exceptions.py +2 -0
- xoa_driver/functions/headers.py +2 -0
- xoa_driver/functions/mgmt.py +48 -34
- xoa_driver/functions/tools.py +9 -3
- xoa_driver/hlfuncs.py +7 -3
- xoa_driver/internals/commands/c_commands.py +6 -10
- xoa_driver/internals/commands/enums.py +25 -1
- xoa_driver/internals/commands/p_commands.py +50 -12
- xoa_driver/internals/commands/pl1_commands.py +130 -73
- xoa_driver/internals/commands/pp_commands.py +44 -55
- xoa_driver/internals/commands/pr_commands.py +17 -16
- xoa_driver/internals/commands/pt_commands.py +21 -1
- xoa_driver/internals/commands/px_commands.py +1686 -6
- xoa_driver/internals/core/transporter/_request_id_counter.py +1 -1
- xoa_driver/internals/core/transporter/logger/__state_on_user.py +1 -1
- xoa_driver/internals/core/transporter/protocol/payload/__init__.py +3 -1
- xoa_driver/internals/core/transporter/protocol/payload/field.py +41 -0
- xoa_driver/internals/core/transporter/protocol/payload/types.py +19 -0
- xoa_driver/internals/exceptions/modules.py +4 -3
- xoa_driver/internals/{hli_v1 → hli}/indices/filter/base_filter.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/indices/length_term.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/indices/macsecscs/base_macsecsc.py +2 -2
- xoa_driver/internals/{hli_v1 → hli}/indices/match_term.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/indices/port_dataset.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/indices/streams/base_stream.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/module_chimera.py +3 -3
- xoa_driver/internals/{hli_v1 → hli}/modules/module_l47.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_combi.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_d.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_e.py +1 -1
- xoa_driver/internals/hli/modules/modules_l23/family_edun.py +82 -0
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_f.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_g.py +17 -2
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_h.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_i.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_j.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_k.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_l.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_l1.py +20 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_m.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/family_n.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/module_l23_base.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/bases/port_l23.py +3 -3
- xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/bases/port_l23_genuine.py +4 -4
- xoa_driver/internals/hli/ports/port_l23/bases/port_transceiver.py +247 -0
- xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/bases/port_transmission_statistics.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/port_chimera.py +1 -1
- xoa_driver/internals/hli/ports/port_l23/edun_l1.py +181 -0
- xoa_driver/internals/hli/ports/port_l23/family_edun.py +82 -0
- xoa_driver/internals/{hli_v2 → hli}/ports/port_l23/family_g.py +5 -0
- xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_l1.py +14 -8
- xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/port_l23ve.py +2 -2
- xoa_driver/internals/{hli_v1 → hli}/ports/port_l47/main.py +2 -2
- xoa_driver/internals/{hli_v1 → hli}/testers/l23_tester.py +1 -1
- xoa_driver/internals/{hli_v1 → hli}/testers/l47_tester.py +2 -2
- xoa_driver/internals/state_storage/modules_state.py +20 -0
- xoa_driver/internals/state_storage/testers_state.py +10 -0
- xoa_driver/lli.py +1 -0
- xoa_driver/misc.py +13 -17
- xoa_driver/modules.py +40 -22
- xoa_driver/ports.py +42 -20
- xoa_driver/testers.py +5 -7
- xoa_driver/utils.py +2 -0
- tdl_xoa_driver-1.3.0.dist-info/METADATA +0 -56
- tdl_xoa_driver-1.3.0.dist-info/RECORD +0 -325
- xoa_driver/functions/cli.py +0 -581
- xoa_driver/internals/hli_v1/ports/port_l23/bases/port_transceiver.py +0 -117
- xoa_driver/internals/hli_v1/ports/port_l23/family_g.py +0 -77
- xoa_driver/internals/hli_v2/__init__.py +0 -0
- xoa_driver/internals/hli_v2/indices/__init__.py +0 -0
- xoa_driver/internals/hli_v2/indices/base_index.py +0 -39
- xoa_driver/internals/hli_v2/indices/connection_group/__init__.py +0 -0
- xoa_driver/internals/hli_v2/indices/connection_group/cg.py +0 -115
- xoa_driver/internals/hli_v2/indices/connection_group/histogram.py +0 -59
- xoa_driver/internals/hli_v2/indices/connection_group/l2.py +0 -71
- xoa_driver/internals/hli_v2/indices/connection_group/l3.py +0 -96
- xoa_driver/internals/hli_v2/indices/connection_group/raw.py +0 -148
- xoa_driver/internals/hli_v2/indices/connection_group/replay.py +0 -89
- xoa_driver/internals/hli_v2/indices/connection_group/tcp.py +0 -261
- xoa_driver/internals/hli_v2/indices/connection_group/tls.py +0 -166
- xoa_driver/internals/hli_v2/indices/connection_group/udp.py +0 -112
- xoa_driver/internals/hli_v2/indices/connection_group/user_state.py +0 -25
- xoa_driver/internals/hli_v2/indices/filter/__init__.py +0 -0
- xoa_driver/internals/hli_v2/indices/filter/base_filter.py +0 -50
- xoa_driver/internals/hli_v2/indices/filter/genuine_filter.py +0 -17
- xoa_driver/internals/hli_v2/indices/length_term.py +0 -44
- xoa_driver/internals/hli_v2/indices/match_term.py +0 -49
- xoa_driver/internals/hli_v2/indices/port_dataset.py +0 -53
- xoa_driver/internals/hli_v2/indices/streams/__init__.py +0 -0
- xoa_driver/internals/hli_v2/indices/streams/base_stream.py +0 -234
- xoa_driver/internals/hli_v2/indices/streams/genuine_stream.py +0 -32
- xoa_driver/internals/hli_v2/modules/__init__.py +0 -0
- xoa_driver/internals/hli_v2/modules/__interfaces.py +0 -21
- xoa_driver/internals/hli_v2/modules/base_module.py +0 -125
- xoa_driver/internals/hli_v2/modules/module_chimera.py +0 -358
- xoa_driver/internals/hli_v2/modules/module_l23ve.py +0 -58
- xoa_driver/internals/hli_v2/modules/module_l47.py +0 -230
- xoa_driver/internals/hli_v2/modules/module_l47ve.py +0 -8
- xoa_driver/internals/hli_v2/modules/modules_l23/__init__.py +0 -0
- xoa_driver/internals/hli_v2/modules/modules_l23/family_combi.py +0 -73
- xoa_driver/internals/hli_v2/modules/modules_l23/family_d.py +0 -75
- xoa_driver/internals/hli_v2/modules/modules_l23/family_e.py +0 -85
- xoa_driver/internals/hli_v2/modules/modules_l23/family_f.py +0 -144
- xoa_driver/internals/hli_v2/modules/modules_l23/family_g.py +0 -84
- xoa_driver/internals/hli_v2/modules/modules_l23/family_h.py +0 -40
- xoa_driver/internals/hli_v2/modules/modules_l23/family_i.py +0 -25
- xoa_driver/internals/hli_v2/modules/modules_l23/family_j.py +0 -25
- xoa_driver/internals/hli_v2/modules/modules_l23/family_k.py +0 -39
- xoa_driver/internals/hli_v2/modules/modules_l23/family_l.py +0 -55
- xoa_driver/internals/hli_v2/modules/modules_l23/family_l1.py +0 -797
- xoa_driver/internals/hli_v2/modules/modules_l23/family_m.py +0 -25
- xoa_driver/internals/hli_v2/modules/modules_l23/family_n.py +0 -40
- xoa_driver/internals/hli_v2/modules/modules_l23/module_l23_base.py +0 -339
- xoa_driver/internals/hli_v2/ports/__init__.py +0 -0
- xoa_driver/internals/hli_v2/ports/base_port.py +0 -105
- xoa_driver/internals/hli_v2/ports/port_l23/__init__.py +0 -0
- xoa_driver/internals/hli_v2/ports/port_l23/bases/__init__.py +0 -0
- xoa_driver/internals/hli_v2/ports/port_l23/bases/port_capture.py +0 -64
- xoa_driver/internals/hli_v2/ports/port_l23/bases/port_l23.py +0 -441
- xoa_driver/internals/hli_v2/ports/port_l23/bases/port_l23_genuine.py +0 -172
- xoa_driver/internals/hli_v2/ports/port_l23/bases/port_reception_statistics.py +0 -156
- xoa_driver/internals/hli_v2/ports/port_l23/bases/port_transceiver.py +0 -117
- xoa_driver/internals/hli_v2/ports/port_l23/bases/port_transmission_statistics.py +0 -59
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/__init__.py +0 -0
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/__init__.py +0 -0
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/_utils.py +0 -15
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/general.py +0 -340
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/shadow.py +0 -99
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/working.py +0 -36
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/pe_custom_distribution.py +0 -116
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/pe_distribution.py +0 -102
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/port_chimera.py +0 -113
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/port_emulation.py +0 -420
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/reception_statistics.py +0 -22
- xoa_driver/internals/hli_v2/ports/port_l23/chimera/transmission_statistics.py +0 -22
- xoa_driver/internals/hli_v2/ports/port_l23/family_combi.py +0 -36
- xoa_driver/internals/hli_v2/ports/port_l23/family_d.py +0 -49
- xoa_driver/internals/hli_v2/ports/port_l23/family_e.py +0 -96
- xoa_driver/internals/hli_v2/ports/port_l23/family_f.py +0 -144
- xoa_driver/internals/hli_v2/ports/port_l23/family_h.py +0 -60
- xoa_driver/internals/hli_v2/ports/port_l23/family_i.py +0 -66
- xoa_driver/internals/hli_v2/ports/port_l23/family_j.py +0 -53
- xoa_driver/internals/hli_v2/ports/port_l23/family_k.py +0 -58
- xoa_driver/internals/hli_v2/ports/port_l23/family_l.py +0 -67
- xoa_driver/internals/hli_v2/ports/port_l23/family_l1.py +0 -149
- xoa_driver/internals/hli_v2/ports/port_l23/family_m.py +0 -28
- xoa_driver/internals/hli_v2/ports/port_l23/fault_jkl.py +0 -22
- xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_ghijkl.py +0 -342
- xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_ijkl_chimera.py +0 -50
- xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_l.py +0 -65
- xoa_driver/internals/hli_v2/ports/port_l23/port_l23ve.py +0 -81
- xoa_driver/internals/hli_v2/ports/port_l47/__init__.py +0 -0
- xoa_driver/internals/hli_v2/ports/port_l47/counters.py +0 -146
- xoa_driver/internals/hli_v2/ports/port_l47/main.py +0 -137
- xoa_driver/internals/hli_v2/ports/port_l47/packet_engine.py +0 -20
- xoa_driver/internals/hli_v2/revisions.py +0 -11
- xoa_driver/internals/hli_v2/testers/__init__.py +0 -0
- xoa_driver/internals/hli_v2/testers/_base_tester.py +0 -207
- xoa_driver/internals/hli_v2/testers/genuine/__init__.py +0 -0
- xoa_driver/internals/hli_v2/testers/genuine/l_23/__init__.py +0 -0
- xoa_driver/internals/hli_v2/testers/genuine/l_23/health.py +0 -16
- xoa_driver/internals/hli_v2/testers/genuine/l_23/rest_api.py +0 -34
- xoa_driver/internals/hli_v2/testers/genuine/l_23/time_keeper.py +0 -50
- xoa_driver/internals/hli_v2/testers/genuine/l_23/upload_file.py +0 -26
- xoa_driver/internals/hli_v2/testers/genuine/management_interface.py +0 -38
- xoa_driver/internals/hli_v2/testers/l23_tester.py +0 -159
- xoa_driver/internals/hli_v2/testers/l23ve_tester.py +0 -98
- xoa_driver/internals/hli_v2/testers/l47_tester.py +0 -95
- xoa_driver/internals/hli_v2/testers/l47ve_tester.py +0 -50
- xoa_driver/v2/__init__.py +0 -11
- xoa_driver/v2/misc.py +0 -77
- xoa_driver/v2/modules.py +0 -308
- xoa_driver/v2/ports.py +0 -232
- xoa_driver/v2/testers.py +0 -24
- {tdl_xoa_driver-1.3.0.dist-info → tdl_xoa_driver-1.5.0.dist-info}/WHEEL +0 -0
- {tdl_xoa_driver-1.3.0.dist-info → tdl_xoa_driver-1.5.0.dist-info}/licenses/LICENSE +0 -0
- {tdl_xoa_driver-1.3.0.dist-info → tdl_xoa_driver-1.5.0.dist-info}/top_level.txt +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/base_index.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/cg.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/histogram.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/l2.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/l3.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/raw.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/replay.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/tcp.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/tls.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/udp.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/connection_group/user_state.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/filter/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/filter/genuine_filter.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/macsecscs/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/macsecscs/genuine_macsecsc.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/streams/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/indices/streams/genuine_stream.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/modules/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/modules/__interfaces.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/modules/base_module.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/modules/module_l23ve.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/modules/module_l47ve.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/modules/modules_l23/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/base_port.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/bases/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/bases/port_capture.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/bases/port_reception_statistics.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/filter_definition/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/filter_definition/_utils.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/filter_definition/general.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/filter_definition/shadow.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/filter_definition/working.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/pe_custom_distribution.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/pe_distribution.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/port_emulation.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/reception_statistics.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/chimera/transmission_statistics.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_combi.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_d.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_e.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_f.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_h.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_i.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_j.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_k.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_l.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/family_m.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/fault_jkl.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/freya_l1.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/pcs_pma_ghijkl.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/pcs_pma_ijkl_chimera.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l23/pcs_pma_l.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l47/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l47/counters.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/ports/port_l47/packet_engine.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/revisions.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/testers/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/testers/_base_tester.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/l_23/__init__.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/l_23/health.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/l_23/rest_api.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/l_23/time_keeper.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/l_23/upload_file.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/testers/genuine/management_interface.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/testers/l23ve_tester.py +0 -0
- /xoa_driver/internals/{hli_v1 → hli}/testers/l47ve_tester.py +0 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING
|
|
2
|
+
if TYPE_CHECKING:
|
|
3
|
+
from xoa_driver.internals.core import interfaces as itf
|
|
4
|
+
from xoa_driver.internals.commands import (
|
|
5
|
+
PX_RW,
|
|
6
|
+
PX_MII,
|
|
7
|
+
PX_TEMPERATURE,
|
|
8
|
+
PX_RW_SEQ,
|
|
9
|
+
PX_I2C_CONFIG,
|
|
10
|
+
PX_RW_SEQ_BANK,
|
|
11
|
+
PX_CDB_SUPPORT,
|
|
12
|
+
PX_CDB_ABORT_PROCESSING,
|
|
13
|
+
PX_CDB_CHANGE_PASSWORD,
|
|
14
|
+
PX_CDB_ENTER_PASSWORD,
|
|
15
|
+
PX_CDB_QUERY_STATUS,
|
|
16
|
+
PX_CDB_EXTERNAL_FEATURES,
|
|
17
|
+
PX_CDB_FW_MGMT_FEATURES,
|
|
18
|
+
PX_CDB_GET_APP_ATTRIBUTES,
|
|
19
|
+
PX_CDB_GET_IF_CODE_DESCR,
|
|
20
|
+
PX_CDB_MODULE_FEATURES,
|
|
21
|
+
PX_CDB_SEC_FEAT_CAPABILITIES,
|
|
22
|
+
PX_CDB_ABORT_FW_DOWNLOAD,
|
|
23
|
+
PX_CDB_COMMIT_FW_IMAGE,
|
|
24
|
+
PX_CDB_COMPLETE_FW_DOWNLOAD,
|
|
25
|
+
PX_CDB_COPY_FW_IMAGE,
|
|
26
|
+
PX_CDB_GET_FW_INFO,
|
|
27
|
+
PX_CDB_READ_FW_BLOCK_EPL,
|
|
28
|
+
PX_CDB_READ_FW_BLOCK_LPL,
|
|
29
|
+
PX_CDB_RUN_FW_IMAGE,
|
|
30
|
+
PX_CDB_START_FW_DOWNLOAD,
|
|
31
|
+
PX_CDB_WRITE_FW_BLOCK_EPL,
|
|
32
|
+
PX_CDB_WRITE_FW_BLOCK_LPL,
|
|
33
|
+
PX_CUST_CMD,
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class PortTransceiver:
|
|
38
|
+
"""Transceiver access class."""
|
|
39
|
+
|
|
40
|
+
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
41
|
+
self.__conn = conn
|
|
42
|
+
self.__module_id = module_id
|
|
43
|
+
self.__port_id = port_id
|
|
44
|
+
|
|
45
|
+
self.i2c_config = PX_I2C_CONFIG(conn, module_id, port_id)
|
|
46
|
+
"""
|
|
47
|
+
Access speed on a transceiver I2C access in the unit of KHz. Default to 100.
|
|
48
|
+
|
|
49
|
+
When the transceiver is plugged out and in again, the speed will be reset to the default value 100. The speed has a minimum and a maximum, which can be obtained from port.capabilities().
|
|
50
|
+
|
|
51
|
+
The I2C speed configuration will not be included in the port configuration file (.xpc). When you load a port configuration to a port, the transceiver I2C access speed will be reset to default.
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
self.temperature = PX_TEMPERATURE(conn, module_id, port_id)
|
|
55
|
+
"""Transceiver temperature in Celsius.
|
|
56
|
+
|
|
57
|
+
Temperature value before the decimal digit, and 1/256th of a degree Celsius after the decimal digit.
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
self.cmis = CMIS(conn, module_id, port_id)
|
|
61
|
+
"""
|
|
62
|
+
Access CMIS interface.
|
|
63
|
+
"""
|
|
64
|
+
|
|
65
|
+
def access_rw(self, page_address: int, register_address: int) -> "PX_RW":
|
|
66
|
+
"""Access to register interface by the transceiver.
|
|
67
|
+
|
|
68
|
+
:param page_address: page address
|
|
69
|
+
:type page_address: int
|
|
70
|
+
:param register_address: register address
|
|
71
|
+
:type register_address: int
|
|
72
|
+
:return: transceiver register values
|
|
73
|
+
:rtype: PX_RW
|
|
74
|
+
"""
|
|
75
|
+
|
|
76
|
+
return PX_RW(
|
|
77
|
+
self.__conn,
|
|
78
|
+
self.__module_id,
|
|
79
|
+
self.__port_id,
|
|
80
|
+
page_address,
|
|
81
|
+
register_address
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
def access_mii(self, register_address: int) -> "PX_MII":
|
|
85
|
+
"""Access to the register interface supported by the media-independent interface (MII) transceiver.
|
|
86
|
+
|
|
87
|
+
:param register_address: register address
|
|
88
|
+
:type register_address: int
|
|
89
|
+
:return: register values
|
|
90
|
+
:rtype: PX_MII
|
|
91
|
+
"""
|
|
92
|
+
return PX_MII(
|
|
93
|
+
self.__conn,
|
|
94
|
+
self.__module_id,
|
|
95
|
+
self.__port_id,
|
|
96
|
+
register_address
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
def access_rw_seq(self, page_address: int, register_address: int, byte_count: int) -> "PX_RW_SEQ":
|
|
100
|
+
"""Sequential read/write a number of bytes to the register interface supported by the media-independent interface (MII) transceiver.
|
|
101
|
+
|
|
102
|
+
:param page_address: page address (0-255)
|
|
103
|
+
:type page_address: int
|
|
104
|
+
:param register_address: register address (0-255)
|
|
105
|
+
:type register_address: int
|
|
106
|
+
:param byte_count: the number of bytes to read/write
|
|
107
|
+
:type byte_count: int
|
|
108
|
+
:return: transceiver register values
|
|
109
|
+
:rtype: PX_RW_SEQ
|
|
110
|
+
"""
|
|
111
|
+
return PX_RW_SEQ(
|
|
112
|
+
self.__conn,
|
|
113
|
+
self.__module_id,
|
|
114
|
+
self.__port_id,
|
|
115
|
+
page_address,
|
|
116
|
+
register_address,
|
|
117
|
+
byte_count
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
def access_rw_seq_bank(self, bank_address: int, page_address: int, register_address: int, byte_count: int) -> "PX_RW_SEQ_BANK":
|
|
121
|
+
"""Sequential read/write a number of bytes to the register interface supported by the media-independent interface (MII) transceiver.
|
|
122
|
+
|
|
123
|
+
:param bank_address: bank address (0-255)
|
|
124
|
+
:type bank_address: int
|
|
125
|
+
:param page_address: page address (0-255)
|
|
126
|
+
:type page_address: int
|
|
127
|
+
:param register_address: register address (0-255)
|
|
128
|
+
:type register_address: int
|
|
129
|
+
:param byte_count: the number of bytes to read/write
|
|
130
|
+
:type byte_count: int
|
|
131
|
+
:return: transceiver register values
|
|
132
|
+
:rtype: PX_RW_SEQ_BANK
|
|
133
|
+
"""
|
|
134
|
+
return PX_RW_SEQ_BANK(
|
|
135
|
+
self.__conn,
|
|
136
|
+
self.__module_id,
|
|
137
|
+
self.__port_id,
|
|
138
|
+
bank_address,
|
|
139
|
+
page_address,
|
|
140
|
+
register_address,
|
|
141
|
+
byte_count
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
class CMIS():
|
|
145
|
+
"""CMIS access class.
|
|
146
|
+
"""
|
|
147
|
+
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
148
|
+
self.__conn = conn
|
|
149
|
+
self.__module_id = module_id
|
|
150
|
+
self.__port_id = port_id
|
|
151
|
+
|
|
152
|
+
self.cdb_instances_supported = PX_CDB_SUPPORT(conn, module_id, port_id)
|
|
153
|
+
"""Return the number of supported CDB instances.
|
|
154
|
+
"""
|
|
155
|
+
|
|
156
|
+
def cdb(self, cdb_instance_id: int) -> "CDB":
|
|
157
|
+
"""Access CMIS CDB command interface.
|
|
158
|
+
|
|
159
|
+
:param cdb_instance_id: 0 for CDB Instance 1, 1 for CDB Instance 2
|
|
160
|
+
:type cdb_instance_id: int
|
|
161
|
+
"""
|
|
162
|
+
return CDB(self.__conn, self.__module_id, self.__port_id, cdb_instance_id)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
class CDB():
|
|
166
|
+
"""CMIS CDB command access class.
|
|
167
|
+
"""
|
|
168
|
+
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, cdb_instance_id: int) -> None:
|
|
169
|
+
|
|
170
|
+
self.__conn = conn
|
|
171
|
+
self.__module_id = module_id
|
|
172
|
+
self.__port_id = port_id
|
|
173
|
+
self.__cdb_instance_id = cdb_instance_id
|
|
174
|
+
|
|
175
|
+
# CDB Module Commands
|
|
176
|
+
self.cmd_0000h_query_status = PX_CDB_QUERY_STATUS(conn, module_id, port_id, cdb_instance_id)
|
|
177
|
+
"""CMD 0000h: Query Status
|
|
178
|
+
"""
|
|
179
|
+
self.cmd_0001h_enter_password = PX_CDB_ENTER_PASSWORD(conn, module_id, port_id, cdb_instance_id)
|
|
180
|
+
"""CMD 0001h: Enter Password
|
|
181
|
+
"""
|
|
182
|
+
self.cmd_0002h_change_password = PX_CDB_CHANGE_PASSWORD(conn, module_id, port_id, cdb_instance_id)
|
|
183
|
+
"""CMD 0002h: Change Password
|
|
184
|
+
"""
|
|
185
|
+
self.cmd_0004h_abort_processing = PX_CDB_ABORT_PROCESSING(conn, module_id, port_id, cdb_instance_id)
|
|
186
|
+
"""CMD 0004h: Abort Processing
|
|
187
|
+
"""
|
|
188
|
+
|
|
189
|
+
# CDB Features and Capabilities Inquiry Commands
|
|
190
|
+
self.cmd_0040h_module_features = PX_CDB_MODULE_FEATURES(conn, module_id, port_id, cdb_instance_id)
|
|
191
|
+
"""CMD 0040h: Module Features
|
|
192
|
+
"""
|
|
193
|
+
self.cmd_0041h_fw_mgmt_features = PX_CDB_FW_MGMT_FEATURES(conn, module_id, port_id, cdb_instance_id)
|
|
194
|
+
"""CMD 0041h: Firmware Management Features
|
|
195
|
+
"""
|
|
196
|
+
self.cmd_0044h_sec_feat_capabilities = PX_CDB_SEC_FEAT_CAPABILITIES(conn, module_id, port_id, cdb_instance_id)
|
|
197
|
+
"""CMD 0044h: Security Features and Capabilities
|
|
198
|
+
"""
|
|
199
|
+
self.cmd_0045h_external_features = PX_CDB_EXTERNAL_FEATURES(conn, module_id, port_id, cdb_instance_id)
|
|
200
|
+
"""CMD 0045h: Externally Defined Features
|
|
201
|
+
"""
|
|
202
|
+
self.cmd_0050h_get_app_attributes = PX_CDB_GET_APP_ATTRIBUTES(conn, module_id, port_id, cdb_instance_id)
|
|
203
|
+
"""CMD 0050h: Get Application Attributes
|
|
204
|
+
"""
|
|
205
|
+
self.cmd_0051h_get_if_code_descr = PX_CDB_GET_IF_CODE_DESCR(conn, module_id, port_id, cdb_instance_id)
|
|
206
|
+
"""CMD 0051h: Get Interface Code Description
|
|
207
|
+
"""
|
|
208
|
+
|
|
209
|
+
# CDB Firmware Management Commands
|
|
210
|
+
self.cmd_0100h_get_firmware_info = PX_CDB_GET_FW_INFO(conn, module_id, port_id, cdb_instance_id)
|
|
211
|
+
"""CMD 0100h: Get Firmware Info
|
|
212
|
+
"""
|
|
213
|
+
self.cmd_0101h_start_firmware_download = PX_CDB_START_FW_DOWNLOAD(conn, module_id, port_id, cdb_instance_id)
|
|
214
|
+
"""CMD 0101h: Start Firmware Download
|
|
215
|
+
"""
|
|
216
|
+
self.cmd_0102h_abort_firmware_download = PX_CDB_ABORT_FW_DOWNLOAD(conn, module_id, port_id, cdb_instance_id)
|
|
217
|
+
"""CMD 0102h: Abort Firmware Download
|
|
218
|
+
"""
|
|
219
|
+
self.cmd_0103h_write_firmware_block_lpl = PX_CDB_WRITE_FW_BLOCK_LPL(conn, module_id, port_id, cdb_instance_id)
|
|
220
|
+
"""CMD 0103h: Write Firmware Block LPL
|
|
221
|
+
"""
|
|
222
|
+
self.cmd_0104h_write_firmware_block_epl = PX_CDB_WRITE_FW_BLOCK_EPL(conn, module_id, port_id, cdb_instance_id)
|
|
223
|
+
"""CMD 0104h: Write Firmware Block EPL
|
|
224
|
+
"""
|
|
225
|
+
self.cmd_0105h_read_firmware_block_lpl = PX_CDB_READ_FW_BLOCK_LPL(conn, module_id, port_id, cdb_instance_id)
|
|
226
|
+
"""CMD 0105h: Read Firmware Block LPL
|
|
227
|
+
"""
|
|
228
|
+
self.cmd_0106h_read_firmware_block_epl = PX_CDB_READ_FW_BLOCK_EPL(conn, module_id, port_id, cdb_instance_id)
|
|
229
|
+
"""CMD 0106h: Read Firmware Block EPL
|
|
230
|
+
"""
|
|
231
|
+
self.cmd_0107h_complete_firmware_download = PX_CDB_COMPLETE_FW_DOWNLOAD(conn, module_id, port_id, cdb_instance_id)
|
|
232
|
+
"""CMD 0107h: Complete Firmware Download
|
|
233
|
+
"""
|
|
234
|
+
self.cmd_0108h_copy_firmware_image = PX_CDB_COPY_FW_IMAGE(conn, module_id, port_id, cdb_instance_id)
|
|
235
|
+
"""CMD 0108h: Copy Firmware Image
|
|
236
|
+
"""
|
|
237
|
+
self.cmd_0109h_run_firmware_image = PX_CDB_RUN_FW_IMAGE(conn, module_id, port_id, cdb_instance_id)
|
|
238
|
+
"""CMD 0109h: Run Firmware Image
|
|
239
|
+
"""
|
|
240
|
+
self.cmd_010ah_commit_firmware_image = PX_CDB_COMMIT_FW_IMAGE(conn, module_id, port_id, cdb_instance_id)
|
|
241
|
+
"""CMD 010Ah: Commit Firmware Image
|
|
242
|
+
"""
|
|
243
|
+
|
|
244
|
+
# Custom Commands
|
|
245
|
+
self.custom_cmd = PX_CUST_CMD(conn, module_id, port_id, cdb_instance_id)
|
|
246
|
+
"""Defnes the custom CDB commdand (CMD and Reply) to be sent to the CDB instance.
|
|
247
|
+
"""
|
|
@@ -4,7 +4,7 @@ from typing import (
|
|
|
4
4
|
)
|
|
5
5
|
if TYPE_CHECKING:
|
|
6
6
|
from xoa_driver.internals.core import interfaces as itf
|
|
7
|
-
from xoa_driver.internals.
|
|
7
|
+
from xoa_driver.internals.hli.indices.streams.genuine_stream import GenuineStreamIdx
|
|
8
8
|
from xoa_driver.internals.commands import (
|
|
9
9
|
PT_TOTAL,
|
|
10
10
|
PT_NOTPLD,
|
|
@@ -14,7 +14,7 @@ from xoa_driver.internals.commands import (
|
|
|
14
14
|
if TYPE_CHECKING:
|
|
15
15
|
from xoa_driver.internals.core import interfaces as itf
|
|
16
16
|
|
|
17
|
-
from xoa_driver.internals.
|
|
17
|
+
from xoa_driver.internals.hli.ports import base_port
|
|
18
18
|
from xoa_driver.internals.utils import attributes as utils
|
|
19
19
|
from xoa_driver.internals.state_storage import ports_state
|
|
20
20
|
from ..pcs_pma_ijkl_chimera import PcsPma
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
from typing import (
|
|
2
|
+
TYPE_CHECKING,
|
|
3
|
+
Tuple,
|
|
4
|
+
)
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from xoa_driver.internals.core import interfaces as itf
|
|
7
|
+
from xoa_driver.internals.commands import (
|
|
8
|
+
PP_PRECODING,
|
|
9
|
+
PP_GRAYCODING,
|
|
10
|
+
PL1_PHYTXEQ_LEVEL,
|
|
11
|
+
PL1_PHYTXEQ_COEFF,
|
|
12
|
+
PL1_PCS_VARIANT,
|
|
13
|
+
PL1_PHYTXEQ,
|
|
14
|
+
PL1_CWE_CYCLE,
|
|
15
|
+
PL1_CWE_ERR_SYM_INDICES,
|
|
16
|
+
PL1_CWE_BIT_ERR_MASK,
|
|
17
|
+
PL1_CWE_FEC_ENGINE,
|
|
18
|
+
PL1_CWE_FEC_STATS,
|
|
19
|
+
PL1_CWE_CONTROL,
|
|
20
|
+
PL1_CWE_FEC_STATS_CLEAR,
|
|
21
|
+
PP_PRBSTYPE,
|
|
22
|
+
PL1_PNSWAP_RX,
|
|
23
|
+
PL1_PNSWAP_TX,
|
|
24
|
+
PP_AUTONEG,
|
|
25
|
+
PP_AUTONEGSTATUS,
|
|
26
|
+
PP_LINKTRAIN,
|
|
27
|
+
)
|
|
28
|
+
from .pcs_pma_ghijkl import (
|
|
29
|
+
Prbs,
|
|
30
|
+
)
|
|
31
|
+
from xoa_driver import enums
|
|
32
|
+
|
|
33
|
+
class EdunPMA:
|
|
34
|
+
"""Edun PMA"""
|
|
35
|
+
|
|
36
|
+
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, serdes_xindex: int) -> None:
|
|
37
|
+
self.precoding = PP_PRECODING(conn, module_id, port_id, serdes_xindex)
|
|
38
|
+
"""GET/SET Pre-Coding Configurations.
|
|
39
|
+
|
|
40
|
+
:type: PP_PRECODING
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
self.graycoding = PP_GRAYCODING(conn, module_id, port_id, serdes_xindex)
|
|
44
|
+
"""GET/SET Gray-Coding Configurations.
|
|
45
|
+
|
|
46
|
+
:type: PP_GRAYCODING
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
self.pn_swap_rx = PL1_PNSWAP_RX(conn, module_id, port_id, serdes_xindex)
|
|
50
|
+
"""GET/SET PN-Swap RX Configurations.
|
|
51
|
+
|
|
52
|
+
:type: PL1_PNSWAP_RX
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
self.pn_swap_tx = PL1_PNSWAP_TX(conn, module_id, port_id, serdes_xindex)
|
|
56
|
+
"""GET/SET PN-Swap TX Configurations.
|
|
57
|
+
|
|
58
|
+
:type: PL1_PNSWAP_TX
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
class EdunTxTap:
|
|
62
|
+
"""Edun Tx Tap"""
|
|
63
|
+
|
|
64
|
+
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, serdes_xindex: int) -> None:
|
|
65
|
+
self.native = PL1_PHYTXEQ(conn, module_id, port_id, serdes_xindex)
|
|
66
|
+
"""TX tap native value. (only for Edun)
|
|
67
|
+
|
|
68
|
+
:type: PL1_PHYTXEQ
|
|
69
|
+
"""
|
|
70
|
+
|
|
71
|
+
self.level = PL1_PHYTXEQ_LEVEL(conn, module_id, port_id, serdes_xindex)
|
|
72
|
+
"""TX tap mV/dB value. (only for Edun)
|
|
73
|
+
|
|
74
|
+
:type: PL1_PHYTXEQ_LEVEL
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
self.ieee = PL1_PHYTXEQ_COEFF(conn, module_id, port_id, serdes_xindex)
|
|
78
|
+
"""TX tap IEEE coefficient value. (only for Edun)
|
|
79
|
+
|
|
80
|
+
:type: PL1_PHYTXEQ_COEFF
|
|
81
|
+
"""
|
|
82
|
+
|
|
83
|
+
# class EdunRxTap:
|
|
84
|
+
# """Edun Rx tap
|
|
85
|
+
# """
|
|
86
|
+
# def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, serdes_xindex: int) -> None:
|
|
87
|
+
# self.status = P_EDUN_RX_STATUS(conn, module_id, port_id, serdes_xindex)
|
|
88
|
+
# """Edun Rx tap status
|
|
89
|
+
# """
|
|
90
|
+
|
|
91
|
+
class EdunMedium:
|
|
92
|
+
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, serdes_xindex: int) -> None:
|
|
93
|
+
self.tx = EdunTxTap(conn, module_id, port_id, serdes_xindex)
|
|
94
|
+
"""Edun Tx tap
|
|
95
|
+
"""
|
|
96
|
+
# self.rx = EdunRxTap(conn, module_id, port_id, serdes_xindex)
|
|
97
|
+
# """Edun Rx tap
|
|
98
|
+
# """
|
|
99
|
+
|
|
100
|
+
class SerDesEdun:
|
|
101
|
+
"""L23 high-speed port SerDes configuration and status."""
|
|
102
|
+
|
|
103
|
+
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, serdes_xindex: int) -> None:
|
|
104
|
+
|
|
105
|
+
self.prbs = Prbs(conn, module_id, port_id, serdes_xindex)
|
|
106
|
+
"""PRBS
|
|
107
|
+
:type: Prbs
|
|
108
|
+
"""
|
|
109
|
+
|
|
110
|
+
self.pma = EdunPMA(conn, module_id, port_id, serdes_xindex)
|
|
111
|
+
"""Edun PMA
|
|
112
|
+
|
|
113
|
+
:type: EdunPMA
|
|
114
|
+
"""
|
|
115
|
+
|
|
116
|
+
self.medium = EdunMedium(conn, module_id, port_id, serdes_xindex)
|
|
117
|
+
"""Edun medium
|
|
118
|
+
|
|
119
|
+
:type: EdunMedium
|
|
120
|
+
"""
|
|
121
|
+
|
|
122
|
+
class EdunAutoneg:
|
|
123
|
+
"""Edun port-level autoneg. For per-serdes configuration and status, use serdes[x]
|
|
124
|
+
"""
|
|
125
|
+
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
126
|
+
self.config = PP_AUTONEG(conn, module_id, port_id)
|
|
127
|
+
"""Autoneg config and status
|
|
128
|
+
"""
|
|
129
|
+
self.status = PP_AUTONEGSTATUS(conn, module_id, port_id)
|
|
130
|
+
"""Autoneg status
|
|
131
|
+
"""
|
|
132
|
+
|
|
133
|
+
class EdunFecCodewordErrorInject:
|
|
134
|
+
"""Edun FEC Codeword Error Injection
|
|
135
|
+
"""
|
|
136
|
+
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
137
|
+
self.cycle = PL1_CWE_CYCLE(conn, module_id, port_id)
|
|
138
|
+
"""FEC codeword error injection cycle.
|
|
139
|
+
"""
|
|
140
|
+
self.err_symbols = PL1_CWE_ERR_SYM_INDICES(conn, module_id, port_id)
|
|
141
|
+
"""The positions of the errored symbols in errored codewords.
|
|
142
|
+
"""
|
|
143
|
+
self.bit_err_mask = PL1_CWE_BIT_ERR_MASK(conn, module_id, port_id)
|
|
144
|
+
"""The bit error mask for the errored symbols.
|
|
145
|
+
"""
|
|
146
|
+
self.engine = PL1_CWE_FEC_ENGINE(conn, module_id, port_id)
|
|
147
|
+
"""The FEC engines to use.
|
|
148
|
+
"""
|
|
149
|
+
self.statistics = PL1_CWE_FEC_STATS(conn, module_id, port_id)
|
|
150
|
+
"""FEC error injection statistics
|
|
151
|
+
"""
|
|
152
|
+
self.clear_stats = PL1_CWE_FEC_STATS_CLEAR(conn, module_id, port_id)
|
|
153
|
+
"""Clear FEC codeword injection stats
|
|
154
|
+
"""
|
|
155
|
+
self.control = PL1_CWE_CONTROL(conn, module_id, port_id)
|
|
156
|
+
"""Control the FEC codeword error injection
|
|
157
|
+
"""
|
|
158
|
+
|
|
159
|
+
class Layer1:
|
|
160
|
+
def __init__(self, conn: "itf.IConnection", port) -> None:
|
|
161
|
+
self.serdes: Tuple[SerDesEdun, ...] = tuple(
|
|
162
|
+
SerDesEdun(conn, *port.kind, serdes_xindex=idx)
|
|
163
|
+
for idx in range(port.info.capabilities.serdes_count)
|
|
164
|
+
)
|
|
165
|
+
self.autoneg = EdunAutoneg(conn, *port.kind)
|
|
166
|
+
"""Edun port-level autoneg. For per-serdes configuration and status, use serdes[x]
|
|
167
|
+
"""
|
|
168
|
+
self.lt = PP_LINKTRAIN(conn, *port.kind)
|
|
169
|
+
"""Edun Link Training on serdes level
|
|
170
|
+
|
|
171
|
+
:type: PP_LINKTRAIN
|
|
172
|
+
"""
|
|
173
|
+
self.pcs_variant = PL1_PCS_VARIANT(conn, *port.kind)
|
|
174
|
+
"""PCS variant configuration
|
|
175
|
+
"""
|
|
176
|
+
self.fec_error_inject = EdunFecCodewordErrorInject(conn, *port.kind)
|
|
177
|
+
"""FEC codeword error injection
|
|
178
|
+
"""
|
|
179
|
+
self.prbs_config = PP_PRBSTYPE(conn, *port.kind)
|
|
180
|
+
"""PRBS configuration, including PRBS polynomial, invert mode, and statistic collection mode (for RX).
|
|
181
|
+
"""
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
|
|
2
|
+
import functools
|
|
3
|
+
from typing import TYPE_CHECKING, Tuple
|
|
4
|
+
from typing import Self
|
|
5
|
+
from xoa_driver.internals.commands import (
|
|
6
|
+
P_DYNAMIC,
|
|
7
|
+
)
|
|
8
|
+
from xoa_driver import enums
|
|
9
|
+
from xoa_driver.internals.utils import attributes as utils
|
|
10
|
+
if TYPE_CHECKING:
|
|
11
|
+
from xoa_driver.internals.core import interfaces as itf
|
|
12
|
+
|
|
13
|
+
from .bases.port_l23_genuine import BasePortL23Genuine
|
|
14
|
+
from .pcs_pma_ijkl_chimera import PcsPma as PcsPma1
|
|
15
|
+
from .pcs_pma_ghijkl import (
|
|
16
|
+
PcsPma as PcsPma2,
|
|
17
|
+
SerDes,
|
|
18
|
+
)
|
|
19
|
+
from .pcs_pma_l import PcsPma as PcsPma3
|
|
20
|
+
from .edun_l1 import Layer1
|
|
21
|
+
|
|
22
|
+
class PcsPma(PcsPma1, PcsPma2, PcsPma3):
|
|
23
|
+
"""Edun PCS/PMA
|
|
24
|
+
"""
|
|
25
|
+
def __init__(self, conn: "itf.IConnection", port) -> None:
|
|
26
|
+
PcsPma1.__init__(self, conn, port)
|
|
27
|
+
PcsPma2.__init__(self, conn, port)
|
|
28
|
+
PcsPma3.__init__(self, conn, port)
|
|
29
|
+
|
|
30
|
+
class L1(Layer1):
|
|
31
|
+
"""Edun L1
|
|
32
|
+
"""
|
|
33
|
+
def __init__(self, conn: "itf.IConnection", port) -> None:
|
|
34
|
+
Layer1.__init__(self, conn, port)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class FamilyEdun(BasePortL23Genuine):
|
|
38
|
+
pcs_pma: PcsPma
|
|
39
|
+
"""PCS/PMA layer
|
|
40
|
+
|
|
41
|
+
:type: PcsPma
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
# serdes: Tuple[SerDes, ...]
|
|
45
|
+
# """SerDes index
|
|
46
|
+
|
|
47
|
+
# :type: Tuple[SerDes, ...]
|
|
48
|
+
# """
|
|
49
|
+
|
|
50
|
+
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
51
|
+
super().__init__(conn, module_id, port_id)
|
|
52
|
+
self.dynamic = P_DYNAMIC(conn, module_id, port_id)
|
|
53
|
+
"""L23 port's dynamic traffic change.
|
|
54
|
+
|
|
55
|
+
:type: P_DYNAMIC
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
# self.fault = Fault(conn, module_id, port_id)
|
|
59
|
+
|
|
60
|
+
async def _setup(self) -> Self:
|
|
61
|
+
await super()._setup()
|
|
62
|
+
self.pcs_pma = PcsPma(self._conn, self)
|
|
63
|
+
# self.serdes = tuple(
|
|
64
|
+
# SerDes(self._conn, *self.kind, serdes_xindex=serdes_xindex)
|
|
65
|
+
# for serdes_xindex in range(self.info.capabilities.serdes_count)
|
|
66
|
+
# )
|
|
67
|
+
self.l1 = L1(self._conn, self)
|
|
68
|
+
return self
|
|
69
|
+
|
|
70
|
+
on_dynamic_change = functools.partialmethod(utils.on_event, P_DYNAMIC)
|
|
71
|
+
"""Register a callback to the event that the port's dynamic traffic setting changes."""
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
class PEdun800G3S1PSMPX_a(FamilyEdun):
|
|
75
|
+
"""L23 port on Edun-800G-3S-1P-SMPX[a] module.
|
|
76
|
+
"""
|
|
77
|
+
...
|
|
78
|
+
|
|
79
|
+
class PEdun1600G4S1POSFP_a(FamilyEdun):
|
|
80
|
+
"""L23 port on Edun-1600G-4S-1P-OSFP[a] module.
|
|
81
|
+
"""
|
|
82
|
+
...
|
|
@@ -41,11 +41,11 @@ class FamilyFreya(BasePortL23Genuine):
|
|
|
41
41
|
:type: PcsPma
|
|
42
42
|
"""
|
|
43
43
|
|
|
44
|
-
serdes: Tuple[SerDes, ...]
|
|
45
|
-
"""SerDes index
|
|
44
|
+
# serdes: Tuple[SerDes, ...]
|
|
45
|
+
# """SerDes index
|
|
46
46
|
|
|
47
|
-
:type: Tuple[SerDes, ...]
|
|
48
|
-
"""
|
|
47
|
+
# :type: Tuple[SerDes, ...]
|
|
48
|
+
# """
|
|
49
49
|
|
|
50
50
|
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
51
51
|
super().__init__(conn, module_id, port_id)
|
|
@@ -60,10 +60,10 @@ class FamilyFreya(BasePortL23Genuine):
|
|
|
60
60
|
async def _setup(self) -> Self:
|
|
61
61
|
await super()._setup()
|
|
62
62
|
self.pcs_pma = PcsPma(self._conn, self)
|
|
63
|
-
self.serdes = tuple(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
)
|
|
63
|
+
# self.serdes = tuple(
|
|
64
|
+
# SerDes(self._conn, *self.kind, serdes_xindex=serdes_xindex)
|
|
65
|
+
# for serdes_xindex in range(self.info.capabilities.serdes_count)
|
|
66
|
+
# )
|
|
67
67
|
self.l1 = L1(self._conn, self)
|
|
68
68
|
return self
|
|
69
69
|
|
|
@@ -130,6 +130,12 @@ class PFreya800G4S1P_f(FamilyFreya):
|
|
|
130
130
|
...
|
|
131
131
|
|
|
132
132
|
|
|
133
|
+
class PFreya800G4S2P_a(FamilyFreya):
|
|
134
|
+
"""L23 port on Freya-800G-4S-2P[a] module.
|
|
135
|
+
"""
|
|
136
|
+
...
|
|
137
|
+
|
|
138
|
+
|
|
133
139
|
class PFreya800G4S1POSFP_a(FamilyFreya):
|
|
134
140
|
"""L23 port on Freya-800G-4S-1P-OSFP[a] module.
|
|
135
141
|
"""
|
|
@@ -11,8 +11,8 @@ from xoa_driver.internals.commands import (
|
|
|
11
11
|
if TYPE_CHECKING:
|
|
12
12
|
from xoa_driver.internals.core import interfaces as itf
|
|
13
13
|
from xoa_driver.internals.utils.indices import index_manager as idx_mgr
|
|
14
|
-
from xoa_driver.internals.
|
|
15
|
-
from xoa_driver.internals.
|
|
14
|
+
from xoa_driver.internals.hli.indices.streams.base_stream import BaseStreamIdx
|
|
15
|
+
from xoa_driver.internals.hli.indices.filter.base_filter import BaseFilterIdx
|
|
16
16
|
from xoa_driver.internals.state_storage import ports_state
|
|
17
17
|
|
|
18
18
|
VEStreamIndices = idx_mgr.IndexManager[BaseStreamIdx]
|
|
@@ -30,11 +30,11 @@ from xoa_driver.internals.commands import (
|
|
|
30
30
|
if TYPE_CHECKING:
|
|
31
31
|
from xoa_driver.internals.core import interfaces as itf
|
|
32
32
|
|
|
33
|
-
from xoa_driver.internals.
|
|
33
|
+
from xoa_driver.internals.hli.ports import base_port
|
|
34
34
|
from xoa_driver.internals.state_storage import ports_state
|
|
35
35
|
from xoa_driver.internals.utils import attributes as utils
|
|
36
36
|
from xoa_driver.internals.utils.indices import index_manager as im
|
|
37
|
-
from xoa_driver.internals.
|
|
37
|
+
from xoa_driver.internals.hli.indices.connection_group.cg import ConnectionGroupIdx
|
|
38
38
|
|
|
39
39
|
from .counters import PCounters
|
|
40
40
|
from .packet_engine import PacketEngine
|
|
@@ -27,7 +27,7 @@ if TYPE_CHECKING:
|
|
|
27
27
|
|
|
28
28
|
from xoa_driver.internals.core.transporter.logger import CustomLogger
|
|
29
29
|
from xoa_driver.internals.state_storage import testers_state
|
|
30
|
-
from xoa_driver.internals.
|
|
30
|
+
from xoa_driver.internals.hli import revisions
|
|
31
31
|
from xoa_driver.internals import exceptions
|
|
32
32
|
|
|
33
33
|
|
|
@@ -10,10 +10,10 @@ from xoa_driver.internals.commands import (
|
|
|
10
10
|
)
|
|
11
11
|
from xoa_driver.internals.core.transporter.logger import CustomLogger
|
|
12
12
|
from xoa_driver.internals.utils.managers import modules_manager as mm
|
|
13
|
-
from xoa_driver.internals.
|
|
13
|
+
from xoa_driver.internals.hli import revisions
|
|
14
14
|
from xoa_driver.internals import exceptions
|
|
15
15
|
if TYPE_CHECKING:
|
|
16
|
-
from xoa_driver.internals.
|
|
16
|
+
from xoa_driver.internals.hli.modules import module_l47 as ml47
|
|
17
17
|
|
|
18
18
|
from xoa_driver.internals.state_storage import testers_state
|
|
19
19
|
from ._base_tester import BaseTester
|
|
@@ -23,26 +23,46 @@ class ModuleLocalState:
|
|
|
23
23
|
"reservation",
|
|
24
24
|
"reserved_by",
|
|
25
25
|
"model",
|
|
26
|
+
"model_name",
|
|
27
|
+
"serial_number",
|
|
28
|
+
"version_string",
|
|
29
|
+
"revision",
|
|
26
30
|
)
|
|
27
31
|
|
|
28
32
|
def __init__(self) -> None:
|
|
29
33
|
self.reservation: enums.ReservedStatus = enums.ReservedStatus.RELEASED
|
|
30
34
|
self.reserved_by: str = ""
|
|
31
35
|
self.model: str = ""
|
|
36
|
+
self.model_name: str = ""
|
|
37
|
+
self.serial_number: str = ""
|
|
38
|
+
self.version_string: str = ""
|
|
39
|
+
self.revision: str = ""
|
|
32
40
|
|
|
33
41
|
async def initiate(self, module) -> None:
|
|
34
42
|
(
|
|
35
43
|
reservation_r,
|
|
36
44
|
reserved_by_r,
|
|
37
45
|
model_r,
|
|
46
|
+
model_name_r,
|
|
47
|
+
serial_number_r,
|
|
48
|
+
version_string_r,
|
|
49
|
+
revision_r,
|
|
38
50
|
) = await funcs.apply(
|
|
39
51
|
module.reservation.get(),
|
|
40
52
|
module.reserved_by.get(),
|
|
41
53
|
module.model.get(),
|
|
54
|
+
module.model_name.get(),
|
|
55
|
+
module.serial_number.get(),
|
|
56
|
+
module.version_str.get(),
|
|
57
|
+
module.revision.get(),
|
|
42
58
|
)
|
|
43
59
|
self.reservation = enums.ReservedStatus(reservation_r.operation)
|
|
44
60
|
self.reserved_by = reserved_by_r.username
|
|
45
61
|
self.model = model_r.model
|
|
62
|
+
self.model_name = enums.ModuleModelName(model_name_r.name).name
|
|
63
|
+
self.serial_number = serial_number_r.serial_number
|
|
64
|
+
self.version_string = version_string_r.version_str
|
|
65
|
+
self.revision = revision_r.revision
|
|
46
66
|
|
|
47
67
|
def register_subscriptions(self, module) -> None:
|
|
48
68
|
module._conn.subscribe(M_RESERVEDBY, utils.Update(self, "reserved_by", "username", module._check_identity))
|