From 9fa811a9eb2a9c9ccd5d19458a58ee0c8d2a4f0f Mon Sep 17 00:00:00 2001
From: "xinzhu.yin"
Date: Thu, 2 Jul 2026 17:16:18 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0UCD-API=E5=BA=93=E5=8F=8A?=
=?UTF-8?q?=E6=96=87=E6=A1=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
UniTAP/common/audio_mode.py | 3 +-
UniTAP/dev/dev_3xx_roles.py | 91 ++-
UniTAP/dev/dev_4xx_roles.py | 249 +++++-
UniTAP/dev/dev_5xx_roles.py | 17 +-
UniTAP/dev/dev_base_roles.py | 28 +
UniTAP/dev/device.py | 42 +-
UniTAP/dev/modules/capturer/capture.py | 179 +++--
.../cfg/[0x03]src_dut_dp_8b10b_ll_cts.json | 34 -
.../cfg/[0x04]src_dut_link_config.json | 14 -
.../cfg/[0x08]src_dut_dp_128b132b_ll_cts.json | 50 +-
.../cfg/[0x21]snk_dut_hdmi_dsc_cts.json | 6 +-
.../cfg/[0x23]snk_dut_hdmi_gaming.json | 191 ++---
.../dut_tests/cfg/[0x2D]src_dut_timings.json | 197 +++++
...2E]branch_dut_dp_128b_132b_mst_ll_cts.json | 67 ++
.../dut_tests/dut_default_params/__init__.py | 17 +-
.../dut_default_params/dp2_1_source_tests.py | 13 +
.../dut_default_params/dp_2_1_branch_mst.py | 210 +++++
.../dp_2_1_common_video_modes.py | 6 +-
.../dp_2_1_dsc_video_modes.py | 8 -
.../dut_default_params/dp_2_1_mst.py | 46 ++
.../dp_2_1_source_general_tab.py | 168 ++--
.../dut_default_params/hdmi_hdcp_1a_tests.py | 27 +
.../dut_default_params/hdmi_hdcp_1b_tests.py | 27 +
.../dut_default_params/hdmi_hdcp_2c_tests.py | 60 ++
.../dut_default_params/hdmi_hdcp_3a_tests.py | 27 +
.../dut_default_params/hdmi_hdcp_3b_tests.py | 27 +
.../dut_default_params/hdmi_hdcp_3c_tests.py | 27 +
UniTAP/dev/modules/dut_tests/dut_tests.py | 146 ++--
UniTAP/dev/modules/dut_tests/parser/parser.py | 20 +-
UniTAP/dev/modules/dut_tests/private_info.py | 65 +-
.../dut_tests/report/report_edid_extractor.py | 102 +++
.../modules/dut_tests/report/report_maker.py | 51 +-
.../dut_tests/report/report_template.py | 186 ++++-
.../dut_tests/test_group_params_types.py | 24 +-
UniTAP/dev/modules/dut_tests/test_info.py | 20 +
.../modules/memory_manager/memory_manager.py | 20 +-
UniTAP/dev/modules/opf/handler.py | 12 +-
UniTAP/dev/modules/opf/handlers/internal.py | 6 +
.../dev/modules/opf/handlers/opf_functions.py | 651 +++++++++++-----
UniTAP/dev/modules/opf/parsers/main_handle.py | 11 +-
UniTAP/dev/modules/opf/parsers/opf_utils.py | 77 +-
UniTAP/dev/modules/terminal/dev_terminal.py | 6 +-
UniTAP/dev/ports/__init__.py | 1 +
UniTAP/dev/ports/dprx.py | 10 +-
UniTAP/dev/ports/dprx4xx.py | 3 +-
UniTAP/dev/ports/dptx.py | 10 +-
UniTAP/dev/ports/dptx4xx.py | 4 +-
UniTAP/dev/ports/hdrx.py | 5 +-
UniTAP/dev/ports/hdrx_earc.py | 30 +
UniTAP/dev/ports/hdtx.py | 6 +-
UniTAP/dev/ports/modules/__init__.py | 2 +
UniTAP/dev/ports/modules/ag/ag.py | 54 +-
UniTAP/dev/ports/modules/ag/ag_utils.py | 6 +-
UniTAP/dev/ports/modules/ag/earc.py | 158 ++++
UniTAP/dev/ports/modules/ag/private_types.py | 9 +
UniTAP/dev/ports/modules/ag/types.py | 3 +-
.../modules/capturer/event/event_capturer.py | 12 +-
.../modules/capturer/event/event_types.py | 94 +--
.../modules/capturer/event/event_utils.py | 2 +-
.../capturer/event/private_event_types.py | 15 +-
.../modules/capturer/event/result_event.py | 4 +-
.../modules/capturer/video/video_capturer.py | 88 +--
UniTAP/dev/ports/modules/cec/cec_rx.py | 44 +-
UniTAP/dev/ports/modules/cec/cec_tx.py | 44 +-
UniTAP/dev/ports/modules/dpcd/dpcd.py | 5 +-
UniTAP/dev/ports/modules/earc/__init__.py | 2 +
UniTAP/dev/ports/modules/earc/earc_tx.py | 83 ++
UniTAP/dev/ports/modules/earc/earc_types.py | 112 +++
UniTAP/dev/ports/modules/edid/edid.py | 29 +-
UniTAP/dev/ports/modules/fec/fec_rx.py | 16 +-
UniTAP/dev/ports/modules/fec/fec_tx.py | 51 +-
UniTAP/dev/ports/modules/hdcp/hdcp_rx.py | 18 +-
UniTAP/dev/ports/modules/hdcp/hdcp_tx.py | 63 +-
UniTAP/dev/ports/modules/hdcp/types.py | 31 +-
UniTAP/dev/ports/modules/link/dp/link_rx.py | 12 +-
.../modules/link/dp/link_rx_aux_controller.py | 45 +-
.../dev/ports/modules/link/dp/link_rx_caps.py | 90 +--
.../ports/modules/link/dp/link_rx_status.py | 75 +-
.../ports/modules/link/dp/link_rx_types.py | 20 +-
UniTAP/dev/ports/modules/link/dp/link_tx.py | 38 +-
.../ports/modules/link/dp/link_tx_config.py | 83 +-
.../modules/link/dp/link_tx_force_config.py | 14 +-
.../ports/modules/link/dp/link_tx_status.py | 55 +-
UniTAP/dev/ports/modules/link/hdmi/arc_rx.py | 6 +-
.../ports/modules/link/hdmi/frl_caps_rx.py | 12 +-
.../ports/modules/link/hdmi/frl_control_tx.py | 17 +-
UniTAP/dev/ports/modules/link/hdmi/link.py | 6 +-
.../dev/ports/modules/link/hdmi/status_rx.py | 26 +-
.../dev/ports/modules/link/hdmi/status_tx.py | 17 +-
UniTAP/dev/ports/modules/link/hdmi/tmds_rx.py | 10 +-
UniTAP/dev/ports/modules/link/hdmi/tmds_tx.py | 11 +-
.../modules/packet_generator/__init__.py | 1 +
.../packet_generator/packet_generator.py | 92 +++
UniTAP/dev/ports/modules/panel_replay/pr.py | 7 +-
.../ports/modules/panel_replay/pr_config.py | 16 +-
.../modules/panel_replay/pr_sink_caps.py | 14 +-
.../modules/panel_replay/pr_sink_status.py | 7 +-
.../ports/modules/panel_replay/pr_status.py | 7 +-
UniTAP/dev/ports/modules/pdc/pdc_controls.py | 6 +
UniTAP/dev/ports/modules/pdc/pdc_io.py | 73 +-
UniTAP/dev/ports/modules/vtg/pg.py | 153 ++--
.../ports/modules/vtg/pg_pattern_params.py | 12 +-
UniTAP/dev/ports/modules/vtg/pg_utils.py | 27 +-
UniTAP/dev/ports/modules/vtg/private_types.py | 7 +-
UniTAP/dev/ports/tx.py | 13 +
UniTAP/libs/__init__.py | 5 +-
UniTAP/libs/lib_dscl/DSCL.dll | Bin 775896 -> 814296 bytes
UniTAP/libs/lib_dscl/Dsc.exe | Bin 152280 -> 152280 bytes
UniTAP/libs/lib_tsi/TSI.dll | Bin 7519448 -> 8288472 bytes
UniTAP/libs/lib_tsi/__init__.py | 5 +-
UniTAP/libs/lib_tsi/bundle.information | Bin 0 -> 517 bytes
UniTAP/libs/lib_tsi/tsi.py | 222 +++---
UniTAP/libs/lib_tsi/tsi_io.py | 154 ++--
UniTAP/libs/lib_tsi/tsi_private_types.py | 159 ++--
UniTAP/libs/lib_tsi/tsi_types.py | 40 +-
UniTAP/libs/lib_uicl/UICL.dll | Bin 533208 -> 573656 bytes
UniTAP/libs/lib_uicl/uicl.py | 6 +-
UniTAP/tsi_lib.py | 17 +-
UniTAP/utils/bit_ops.py | 69 ++
UniTAP/utils/uicl_api.py | 2 +-
UniTAP/version.py | 2 +-
docs/UCD-API文档/content/search.js | 46 --
.../{ => documentation}/UniTAP.html | 0
.../content/DUT_TEST_GROUPS_INFO.html | 6 +-
.../{ => documentation}/content/Examples.html | 49 +-
.../{ => documentation}/content/Quickstart.html | 6 +-
.../content/UniTAP/common/audio_mode.html | 25 +-
.../content/UniTAP/common/color_info.html | 6 +-
.../content/UniTAP/common/data_info.html | 6 +-
.../UniTAP/common/dsc_compression_info.html | 8 +-
.../content/UniTAP/common/dsc_video_frame.html | 6 +-
.../content/UniTAP/common/timestamp.html | 6 +-
.../content/UniTAP/common/timing.html | 6 +-
.../content/UniTAP/common/video_frame.html | 8 +-
.../content/UniTAP/common/video_mode.html | 6 +-
.../content/UniTAP/dev/dev_3xx_roles.html | 240 +++++-
.../content/UniTAP/dev/dev_4xx_roles.html | 726 +++++++++++++++++-
.../content/UniTAP/dev/dev_5xx_roles.html | 68 +-
.../content/UniTAP/dev/device.html | 44 +-
.../dev/modules/capturer/result_object.html | 6 +-
.../dut_default_params/audio_test.html | 6 +-
.../dut_tests/dut_default_params/cec_tests.html | 6 +-
.../dut_default_params/crc_video_tests.html | 8 +-
.../dut_default_params/dp1_4_sink_tests.html | 38 +-
.../dut_default_params/dp1_4_source_tests.html | 6 +-
.../dut_default_params/dp2_1_source_tests.html | 29 +-
.../dp_1_4_source_general_tab.html | 18 +-
.../dp_2_1_source_general_tab.html | 124 ++-
.../dut_default_params/dp_electrical_tests.html | 8 +-
.../dp_source_adaptive_sync_tab.html | 12 +-
.../dut_default_params/dp_source_audio_tab.html | 14 +-
.../dp_source_display_id_tab.html | 28 +-
.../dut_default_params/dp_source_dsc_tab.html | 34 +-
.../dut_default_params/hdcp_1a_tests.html | 6 +-
.../dut_default_params/hdcp_1b_tests.html | 6 +-
.../dut_default_params/hdcp_2c_tests.html | 6 +-
.../dut_default_params/hdcp_3a_tests.html | 6 +-
.../dut_default_params/hdcp_3b_tests.html | 6 +-
.../dut_default_params/hdcp_3c_tests.html | 6 +-
.../hdmi_electrical_tests.html | 6 +-
.../hdmi_sink_cable_check_tests.html | 12 +-
.../hdmi_sink_continuity_tests.html | 6 +-
.../dut_default_params/hdmi_sink_tests.html | 16 +-
.../dut_default_params/hdr10_tests.html | 6 +-
.../dut_default_params/link_config_test.html | 6 +-
.../dut_default_params/pixel_video_test.html | 6 +-
.../usbc_electrical_tests.html | 10 +-
.../dut_tests/dut_default_params/vrr_tests.html | 10 +-
.../UniTAP/dev/modules/dut_tests/dut_tests.html | 21 +-
.../UniTAP/dev/modules/dut_tests/test_info.html | 310 +++++++-
.../content/UniTAP/dev/modules/opf/handler.html | 6 +-
.../content/UniTAP/dev/ports/dprx.html | 6 +-
.../content/UniTAP/dev/ports/dprx4xx.html | 6 +-
.../content/UniTAP/dev/ports/dprx5xx.html | 6 +-
.../content/UniTAP/dev/ports/dptx.html | 7 +-
.../content/UniTAP/dev/ports/dptx4xx.html | 7 +-
.../content/UniTAP/dev/ports/dptx5xx.html | 7 +-
.../content/UniTAP/dev/ports/hdrx.html | 6 +-
.../content/UniTAP/dev/ports/hdrx4xx.html | 6 +-
.../content/UniTAP/dev/ports/hdtx.html | 7 +-
.../content/UniTAP/dev/ports/hdtx4xx.html | 7 +-
.../content/UniTAP/dev/ports/modules/ag/ag.html | 6 +-
.../UniTAP/dev/ports/modules/ag/ag_utils.html | 6 +-
.../UniTAP/dev/ports/modules/ag/types.html | 23 +-
.../modules/capturer/audio/audio_capturer.html | 6 +-
.../modules/capturer/audio/result_audio.html | 6 +-
.../modules/capturer/bulk/bulk_capturer.html | 6 +-
.../ports/modules/capturer/bulk/bulk_types.html | 36 +-
.../modules/capturer/bulk/result_bulk.html | 6 +-
.../modules/capturer/event/event_capturer.html | 6 +-
.../modules/capturer/event/event_types.html | 18 +-
.../modules/capturer/event/result_event.html | 6 +-
.../modules/capturer/video/result_video.html | 6 +-
.../modules/capturer/video/video_capturer.html | 81 +-
.../UniTAP/dev/ports/modules/dpcd/dpcd.html | 10 +-
.../UniTAP/dev/ports/modules/edid/edid.html | 6 +-
.../dev/ports/modules/edid/edid_types.html | 6 +-
.../UniTAP/dev/ports/modules/fec/fec_rx.html | 6 +-
.../dev/ports/modules/fec/fec_shared.html | 6 +-
.../UniTAP/dev/ports/modules/fec/fec_tx.html | 6 +-
.../UniTAP/dev/ports/modules/hdcp/hdcp_rx.html | 12 +-
.../UniTAP/dev/ports/modules/hdcp/hdcp_tx.html | 12 +-
.../UniTAP/dev/ports/modules/hdcp/types.html | 10 +-
.../dev/ports/modules/link/dp/link_rx.html | 6 +-
.../modules/link/dp/link_rx_aux_controller.html | 6 +-
.../dev/ports/modules/link/dp/link_rx_caps.html | 6 +-
.../ports/modules/link/dp/link_rx_status.html | 6 +-
.../ports/modules/link/dp/link_rx_types.html | 20 +-
.../modules/link/dp/link_status_common.html | 6 +-
.../dev/ports/modules/link/dp/link_tx.html | 6 +-
.../ports/modules/link/dp/link_tx_config.html | 6 +-
.../ports/modules/link/dp/link_tx_status.html | 6 +-
.../ports/modules/link/dp/link_tx_types.html | 6 +-
.../dev/ports/modules/link/hdmi/arc_rx.html | 8 +-
.../ports/modules/link/hdmi/capabilities.html | 6 +-
.../ports/modules/link/hdmi/frl_caps_rx.html | 6 +-
.../ports/modules/link/hdmi/frl_control_tx.html | 8 +-
.../dev/ports/modules/link/hdmi/link.html | 6 +-
.../dev/ports/modules/link/hdmi/status_rx.html | 6 +-
.../dev/ports/modules/link/hdmi/status_tx.html | 6 +-
.../dev/ports/modules/link/hdmi/tmds_rx.html | 6 +-
.../dev/ports/modules/link/hdmi/tmds_tx.html | 6 +-
.../dev/ports/modules/link/hdmi/types.html | 14 +-
.../dev/ports/modules/panel_replay/pr.html | 6 +-
.../ports/modules/panel_replay/pr_config.html | 6 +-
.../ports/modules/panel_replay/pr_status.html | 6 +-
.../ports/modules/panel_replay/pr_types.html | 16 +-
.../dev/ports/modules/pdc/pdc_bus_status.html | 6 +-
.../dev/ports/modules/pdc/pdc_capabilities.html | 8 +-
.../ports/modules/pdc/pdc_contract_control.html | 6 +-
.../dev/ports/modules/pdc/pdc_controls.html | 24 +-
.../dev/ports/modules/pdc/pdc_dp_alt_mode.html | 16 +-
.../dev/ports/modules/pdc/pdc_dpam_types.html | 6 +-
.../dev/ports/modules/pdc/pdc_power_sink.html | 6 +-
.../dev/ports/modules/pdc/pdc_power_source.html | 6 +-
.../UniTAP/dev/ports/modules/pdc/pdc_types.html | 6 +-
.../UniTAP/dev/ports/modules/pdc/pdo.html | 6 +-
.../UniTAP/dev/ports/modules/pdc/pdo_types.html | 16 +-
.../UniTAP/dev/ports/modules/vtg/pg.html | 14 +-
.../ports/modules/vtg/pg_pattern_params.html | 6 +-
.../dev/ports/modules/vtg/timing_manager.html | 6 +-
.../UniTAP/dev/ports/modules/vtg/types.html | 6 +-
.../content/UniTAP/dev/ports/pdc_port.html | 6 +-
.../content/UniTAP/dev/ports/port.html | 6 +-
.../content/UniTAP/dev/ports/rx.html | 6 +-
.../content/UniTAP/dev/ports/tx.html | 28 +-
.../content/UniTAP/tsi_lib.html | 8 +-
.../content/UniTAP/utils/dscl_api.html | 6 +-
.../content/UniTAP/utils/function_wrapper.html | 6 +-
.../{ => documentation}/content/index.html | 10 +-
.../documentation/content/search.js | 46 ++
.../examples/calculate_crc_from_file.py | 78 ++
.../examples/check_crc_rx_and_tx_sides.py | 152 ++++
.../examples/generate_custom_dsc_and_load.py | 95 +++
docs/UCD-API文档/examples/opf_18.py | 193 +++++
docs/UCD-API文档/examples/reset_device.py | 69 ++
docs/UCD-API文档/examples/work_with_ag_pg.py | 212 +++++
.../examples/work_with_as_and_scrolling_pg.py | 66 ++
.../examples/work_with_audio_capturer.py | 51 ++
.../examples/work_with_buffered_capture.py | 47 ++
.../examples/work_with_bulk_capturer.py | 66 ++
.../examples/work_with_bulk_different_modes.py | 259 +++++++
docs/UCD-API文档/examples/work_with_cec.py | 87 +++
.../examples/work_with_display_id.py | 55 ++
.../examples/work_with_dp_aux_controller.py | 51 ++
docs/UCD-API文档/examples/work_with_dpcd.py | 40 +
docs/UCD-API文档/examples/work_with_dsc.py | 44 ++
.../UCD-API文档/examples/work_with_earc_tx.py | 56 ++
docs/UCD-API文档/examples/work_with_edid.py | 34 +
.../examples/work_with_event_capturer.py | 49 ++
.../examples/work_with_force_link_tx.py | 46 ++
.../examples/work_with_fw_version_check.py | 35 +
docs/UCD-API文档/examples/work_with_hdcp.py | 101 +++
.../UCD-API文档/examples/work_with_link_rx.py | 94 +++
.../UCD-API文档/examples/work_with_link_tx.py | 100 +++
docs/UCD-API文档/examples/work_with_mst_pg.py | 92 +++
.../examples/work_with_packet_generation.py | 44 ++
.../examples/work_with_panel_replay.py | 60 ++
.../examples/work_with_pdc_capabilities.py | 42 +
.../examples/work_with_pdc_controls.py | 45 ++
.../examples/work_with_pdc_dpam.py | 51 ++
.../UCD-API文档/examples/work_with_pdc_pdo.py | 65 ++
.../examples/work_with_pdc_pdo_config.py | 64 ++
.../examples/work_with_pdc_pr_swap.py | 36 +
.../examples/work_with_sink_panel_replay.py | 55 ++
.../examples/work_with_solid_color.py | 42 +
docs/UCD-API文档/examples/work_with_tests.py | 76 ++
.../examples/work_with_tests_from_file.py | 44 ++
.../examples/work_with_video_capturer.py | 52 ++
test.py | 280 +++++++
290 files changed, 9558 insertions(+), 2306 deletions(-)
create mode 100644 UniTAP/dev/dev_base_roles.py
create mode 100644 UniTAP/dev/modules/dut_tests/cfg/[0x2D]src_dut_timings.json
create mode 100644 UniTAP/dev/modules/dut_tests/cfg/[0x2E]branch_dut_dp_128b_132b_mst_ll_cts.json
create mode 100644 UniTAP/dev/modules/dut_tests/dut_default_params/dp_2_1_branch_mst.py
create mode 100644 UniTAP/dev/modules/dut_tests/dut_default_params/dp_2_1_mst.py
create mode 100644 UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_hdcp_1a_tests.py
create mode 100644 UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_hdcp_1b_tests.py
create mode 100644 UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_hdcp_2c_tests.py
create mode 100644 UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_hdcp_3a_tests.py
create mode 100644 UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_hdcp_3b_tests.py
create mode 100644 UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_hdcp_3c_tests.py
create mode 100644 UniTAP/dev/modules/dut_tests/report/report_edid_extractor.py
create mode 100644 UniTAP/dev/ports/hdrx_earc.py
create mode 100644 UniTAP/dev/ports/modules/ag/earc.py
create mode 100644 UniTAP/dev/ports/modules/earc/__init__.py
create mode 100644 UniTAP/dev/ports/modules/earc/earc_tx.py
create mode 100644 UniTAP/dev/ports/modules/earc/earc_types.py
create mode 100644 UniTAP/dev/ports/modules/packet_generator/__init__.py
create mode 100644 UniTAP/dev/ports/modules/packet_generator/packet_generator.py
create mode 100644 UniTAP/libs/lib_tsi/bundle.information
create mode 100644 UniTAP/utils/bit_ops.py
delete mode 100644 docs/UCD-API文档/content/search.js
rename docs/UCD-API文档/{ => documentation}/UniTAP.html (100%)
rename docs/UCD-API文档/{ => documentation}/content/DUT_TEST_GROUPS_INFO.html (86%)
rename docs/UCD-API文档/{ => documentation}/content/Examples.html (94%)
rename docs/UCD-API文档/{ => documentation}/content/Quickstart.html (84%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/common/audio_mode.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/common/color_info.html (91%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/common/data_info.html (89%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/common/dsc_compression_info.html (87%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/common/dsc_video_frame.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/common/timestamp.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/common/timing.html (90%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/common/video_frame.html (87%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/common/video_mode.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/dev_3xx_roles.html (81%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/dev_4xx_roles.html (58%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/dev_5xx_roles.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/device.html (81%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/capturer/result_object.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/audio_test.html (86%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/cec_tests.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/crc_video_tests.html (90%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/dp1_4_sink_tests.html (91%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/dp1_4_source_tests.html (86%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/dp2_1_source_tests.html (84%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/dp_1_4_source_general_tab.html (97%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/dp_2_1_source_general_tab.html (89%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/dp_electrical_tests.html (90%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/dp_source_adaptive_sync_tab.html (89%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/dp_source_audio_tab.html (89%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/dp_source_display_id_tab.html (94%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/dp_source_dsc_tab.html (90%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/hdcp_1a_tests.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/hdcp_1b_tests.html (84%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/hdcp_2c_tests.html (84%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/hdcp_3a_tests.html (84%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/hdcp_3b_tests.html (84%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/hdcp_3c_tests.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_electrical_tests.html (88%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_sink_cable_check_tests.html (88%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_sink_continuity_tests.html (86%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_sink_tests.html (94%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/hdr10_tests.html (84%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/link_config_test.html (87%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/pixel_video_test.html (92%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/usbc_electrical_tests.html (90%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_default_params/vrr_tests.html (90%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/dut_tests.html (88%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/dut_tests/test_info.html (79%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/modules/opf/handler.html (84%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/dprx.html (86%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/dprx4xx.html (86%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/dprx5xx.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/dptx.html (86%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/dptx4xx.html (86%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/dptx5xx.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/hdrx.html (86%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/hdrx4xx.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/hdtx.html (86%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/hdtx4xx.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/ag/ag.html (86%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/ag/ag_utils.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/ag/types.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/capturer/audio/audio_capturer.html (86%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/capturer/audio/result_audio.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/capturer/bulk/bulk_capturer.html (87%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/capturer/bulk/bulk_types.html (94%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/capturer/bulk/result_bulk.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/capturer/event/event_capturer.html (88%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/capturer/event/event_types.html (95%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/capturer/event/result_event.html (86%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/capturer/video/result_video.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/capturer/video/video_capturer.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/dpcd/dpcd.html (87%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/edid/edid.html (91%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/edid/edid_types.html (87%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/fec/fec_rx.html (86%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/fec/fec_shared.html (88%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/fec/fec_tx.html (87%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/hdcp/hdcp_rx.html (87%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/hdcp/hdcp_tx.html (87%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/hdcp/types.html (93%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/link/dp/link_rx.html (87%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/link/dp/link_rx_aux_controller.html (86%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/link/dp/link_rx_caps.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/link/dp/link_rx_status.html (89%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/link/dp/link_rx_types.html (89%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/link/dp/link_status_common.html (90%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/link/dp/link_tx.html (89%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/link/dp/link_tx_config.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/link/dp/link_tx_status.html (90%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/link/dp/link_tx_types.html (94%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/link/hdmi/arc_rx.html (87%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/link/hdmi/capabilities.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/link/hdmi/frl_caps_rx.html (86%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/link/hdmi/frl_control_tx.html (88%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/link/hdmi/link.html (87%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/link/hdmi/status_rx.html (86%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/link/hdmi/status_tx.html (86%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/link/hdmi/tmds_rx.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/link/hdmi/tmds_tx.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/link/hdmi/types.html (92%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/panel_replay/pr.html (86%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/panel_replay/pr_config.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/panel_replay/pr_status.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/panel_replay/pr_types.html (90%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/pdc/pdc_bus_status.html (86%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/pdc/pdc_capabilities.html (92%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/pdc/pdc_contract_control.html (88%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/pdc/pdc_controls.html (90%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/pdc/pdc_dp_alt_mode.html (91%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/pdc/pdc_dpam_types.html (89%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/pdc/pdc_power_sink.html (87%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/pdc/pdc_power_source.html (87%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/pdc/pdc_types.html (93%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/pdc/pdo.html (86%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/pdc/pdo_types.html (92%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/vtg/pg.html (93%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/vtg/pg_pattern_params.html (88%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/vtg/timing_manager.html (87%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/modules/vtg/types.html (93%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/pdc_port.html (89%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/port.html (84%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/rx.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/dev/ports/tx.html (83%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/tsi_lib.html (88%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/utils/dscl_api.html (85%)
rename docs/UCD-API文档/{ => documentation}/content/UniTAP/utils/function_wrapper.html (84%)
rename docs/UCD-API文档/{ => documentation}/content/index.html (75%)
create mode 100644 docs/UCD-API文档/documentation/content/search.js
create mode 100644 docs/UCD-API文档/examples/calculate_crc_from_file.py
create mode 100644 docs/UCD-API文档/examples/check_crc_rx_and_tx_sides.py
create mode 100644 docs/UCD-API文档/examples/generate_custom_dsc_and_load.py
create mode 100644 docs/UCD-API文档/examples/opf_18.py
create mode 100644 docs/UCD-API文档/examples/reset_device.py
create mode 100644 docs/UCD-API文档/examples/work_with_ag_pg.py
create mode 100644 docs/UCD-API文档/examples/work_with_as_and_scrolling_pg.py
create mode 100644 docs/UCD-API文档/examples/work_with_audio_capturer.py
create mode 100644 docs/UCD-API文档/examples/work_with_buffered_capture.py
create mode 100644 docs/UCD-API文档/examples/work_with_bulk_capturer.py
create mode 100644 docs/UCD-API文档/examples/work_with_bulk_different_modes.py
create mode 100644 docs/UCD-API文档/examples/work_with_cec.py
create mode 100644 docs/UCD-API文档/examples/work_with_display_id.py
create mode 100644 docs/UCD-API文档/examples/work_with_dp_aux_controller.py
create mode 100644 docs/UCD-API文档/examples/work_with_dpcd.py
create mode 100644 docs/UCD-API文档/examples/work_with_dsc.py
create mode 100644 docs/UCD-API文档/examples/work_with_earc_tx.py
create mode 100644 docs/UCD-API文档/examples/work_with_edid.py
create mode 100644 docs/UCD-API文档/examples/work_with_event_capturer.py
create mode 100644 docs/UCD-API文档/examples/work_with_force_link_tx.py
create mode 100644 docs/UCD-API文档/examples/work_with_fw_version_check.py
create mode 100644 docs/UCD-API文档/examples/work_with_hdcp.py
create mode 100644 docs/UCD-API文档/examples/work_with_link_rx.py
create mode 100644 docs/UCD-API文档/examples/work_with_link_tx.py
create mode 100644 docs/UCD-API文档/examples/work_with_mst_pg.py
create mode 100644 docs/UCD-API文档/examples/work_with_packet_generation.py
create mode 100644 docs/UCD-API文档/examples/work_with_panel_replay.py
create mode 100644 docs/UCD-API文档/examples/work_with_pdc_capabilities.py
create mode 100644 docs/UCD-API文档/examples/work_with_pdc_controls.py
create mode 100644 docs/UCD-API文档/examples/work_with_pdc_dpam.py
create mode 100644 docs/UCD-API文档/examples/work_with_pdc_pdo.py
create mode 100644 docs/UCD-API文档/examples/work_with_pdc_pdo_config.py
create mode 100644 docs/UCD-API文档/examples/work_with_pdc_pr_swap.py
create mode 100644 docs/UCD-API文档/examples/work_with_sink_panel_replay.py
create mode 100644 docs/UCD-API文档/examples/work_with_solid_color.py
create mode 100644 docs/UCD-API文档/examples/work_with_tests.py
create mode 100644 docs/UCD-API文档/examples/work_with_tests_from_file.py
create mode 100644 docs/UCD-API文档/examples/work_with_video_capturer.py
create mode 100644 test.py
diff --git a/UniTAP/common/audio_mode.py b/UniTAP/common/audio_mode.py
index 3ecb91d..edbe6fa 100644
--- a/UniTAP/common/audio_mode.py
+++ b/UniTAP/common/audio_mode.py
@@ -19,6 +19,7 @@ class AudioFormat(IntEnum):
- PCMAudio.
"""
Unknown = -1
+ Compressed = 0x0
L_PCM = 0xFFFF
@@ -218,7 +219,7 @@ class AudioFrameData:
Args:
sample_format (int) - must be more than 0
"""
- if sample_format <= 0:
+ if sample_format < 0:
raise ValueError(f"Sample format must be more than 0.")
self.__sample_format = AudioFormat(sample_format)
diff --git a/UniTAP/dev/dev_3xx_roles.py b/UniTAP/dev/dev_3xx_roles.py
index d510aa7..e0be0d8 100644
--- a/UniTAP/dev/dev_3xx_roles.py
+++ b/UniTAP/dev/dev_3xx_roles.py
@@ -1,6 +1,7 @@
-from .ports import DPRX, DPTX, HDRX, HDTX, PDC340
+from .ports import DPRX, DPTX, HDRX, HDRX_eARC, HDTX, PDC340
from .modules import MemoryManager, Capturer, DUTTests
-from UniTAP.libs.lib_tsi.tsi_io import DeviceIO, PortProtocol
+from UniTAP.libs.lib_tsi.tsi_io import PortProtocol
+from .dev_base_roles import DevBase, DeviceIO
class UCD340:
@@ -9,7 +10,8 @@ class UCD340:
- 'USB-C, DP Alt Mode Reference Sink' `USBCSink`
- 'USB-C, DP Alt Mode Reference Source' `USBCSource`.
"""
- class USBCSink:
+
+ class USBCSink(DevBase):
"""
Class `USBCSink` contains information of available functionality modules for role USB-C Sink (RX - receiver)
role:
@@ -17,7 +19,9 @@ class UCD340:
- `DUTTests`.
- `PDC`.
"""
+
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
+ super().__init__(dev_io)
self.__port_io = dev_io.create_port_io(0, PortProtocol.DisplayPortThrowUSBC)
self.__dprx = DPRX(self.__port_io, memory_manager, capturer)
self.__dut_tests = DUTTests(dev_io)
@@ -63,7 +67,7 @@ class UCD340:
"""
return list(UCD340.ROLE_DICT.keys())[list(UCD340.ROLE_DICT.values()).index(type(self))]
- class USBCSource:
+ class USBCSource(DevBase):
"""
Class `USBCSource` contains information of available functionality modules for role USB-C Source
(TX - transmitter) role:
@@ -71,7 +75,9 @@ class UCD340:
- `DUTTests`.
- `PDC`.
"""
+
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
+ super().__init__(dev_io)
self.__port_io = dev_io.create_port_io(0, PortProtocol.DisplayPortThrowUSBC)
self.__dptx = DPTX(self.__port_io, memory_manager, capturer)
self.__dut_tests = DUTTests(dev_io)
@@ -140,13 +146,16 @@ class UCD323:
- 'HDMI Reference Sink (HDCP 2.3)' `HDMISink`
- 'HDMI Reference Source (HDCP 2.3)' `HDMISource`
"""
- class DPSink:
+
+ class DPSink(DevBase):
"""
Class `DPSink` contains information of available functionality modules for role DP Sink (RX - receiver) role:
- `DPRX`.
- `DUTTests`.
"""
+
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
+ super().__init__(dev_io)
self.__dprx = DPRX(dev_io.create_port_io(0, PortProtocol.DisplayPort), memory_manager, capturer)
self.__dut_tests = DUTTests(dev_io)
@@ -180,14 +189,16 @@ class UCD323:
"""
return list(UCD323.ROLE_DICT.keys())[list(UCD323.ROLE_DICT.values()).index(type(self))]
- class DPSource:
+ class DPSource(DevBase):
"""
Class `DPSink` contains information of available functionality modules for role DP Source (TX - transmitter)
role:
- `DPTX`.
- `DUTTests`.
"""
+
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
+ super().__init__(dev_io)
self.__dptx = DPTX(dev_io.create_port_io(0, PortProtocol.DisplayPort), memory_manager, capturer)
self.__dut_tests = DUTTests(dev_io)
@@ -221,19 +232,21 @@ class UCD323:
"""
return list(UCD323.ROLE_DICT.keys())[list(UCD323.ROLE_DICT.values()).index(type(self))]
- class HDMISink:
+ class HDMISink(DevBase):
"""
Class `HDMISink` contains information of available functionality modules for role HDMI Sink (RX - receiver)
role:
- `HDRX`.
- `DUTTests`.
"""
+
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
- self.__hdrx = HDRX(dev_io.create_port_io(0, PortProtocol.HDMI), memory_manager, capturer)
+ super().__init__(dev_io)
+ self.__hdrx = HDRX_eARC(dev_io.create_port_io(0, PortProtocol.HDMI), memory_manager, capturer)
self.__dut_tests = DUTTests(dev_io)
@property
- def hdrx(self) -> HDRX:
+ def hdrx(self) -> HDRX_eARC:
"""
Returns HDMI Sink (RX - receiver) role.
@@ -262,14 +275,16 @@ class UCD323:
"""
return list(UCD323.ROLE_DICT.keys())[list(UCD323.ROLE_DICT.values()).index(type(self))]
- class HDMISource:
+ class HDMISource(DevBase):
"""
Class `HDMISource` contains information of available functionality modules for role HDMI Source
(TX - transmitter) role:
- `HDTX`.
- `DUTTests`.
"""
+
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
+ super().__init__(dev_io)
self.__hdtx = HDTX(dev_io.create_port_io(0, PortProtocol.HDMI), memory_manager, capturer)
self.__dut_tests = DUTTests(dev_io)
@@ -302,12 +317,56 @@ class UCD323:
object of str type.
"""
return list(UCD323.ROLE_DICT.keys())[list(UCD323.ROLE_DICT.values()).index(type(self))]
+
+ class HDMISinkEARC(DevBase):
+ """
+ Class `HDMISink` contains information of available functionality modules for role HDMI Sink (RX - receiver)
+ role:
+ - `HDRX`.
+ - `DUTTests`.
+ """
+
+ def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
+ super().__init__(dev_io)
+ self.__hdrx = HDRX_eARC(dev_io.create_port_io(0, PortProtocol.HDMI), memory_manager, capturer)
+ self.__dut_tests = DUTTests(dev_io)
+
+ @property
+ def hdrx(self) -> HDRX_eARC:
+ """
+ Returns HDMI Sink (RX - receiver) role.
+
+ Returns:
+ object of HDRX type.
+ """
+ return self.__hdrx
+
+ @property
+ def dut_tests(self) -> DUTTests:
+ """
+ Returns DUT Test module.
+
+ Returns:
+ object of DUTTests type.
+ """
+ return self.__dut_tests
+
+ @property
+ def name(self) -> str:
+ """
+ Returns name of role.
+
+ Returns:
+ object of str type.
+ """
+ return list(UCD323.ROLE_DICT.keys())[list(UCD323.ROLE_DICT.values()).index(type(self))]
ROLE_DICT = {
"DisplayPort Reference Sink (SST, HDCP 2.3)": DPSink,
"DisplayPort Reference Source (SST, HDCP 2.3)": DPSource,
"HDMI Reference Sink (HDCP 2.3)": HDMISink,
"HDMI Reference Source (HDCP 2.3)": HDMISource,
+ "HDMI Reference Sink (eARC)": HDMISinkEARC,
}
@@ -317,13 +376,16 @@ class UCD301:
- 'DisplayPort Reference Sink (SST, HDCP 2.3)' `DPSink`
- 'HDMI Reference Sink (HDCP 2.3)' `HDMISink`
"""
- class DPSink:
+
+ class DPSink(DevBase):
"""
Class `DPSink` contains information of available functionality modules for role DP Sink (RX - receiver) role:
- `DPRX`.
- `DUTTests`.
"""
+
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
+ super().__init__(dev_io)
self.__dprx = DPRX(dev_io.create_port_io(0, PortProtocol.DisplayPort), memory_manager, capturer)
self.__dut_tests = DUTTests(dev_io)
@@ -357,14 +419,16 @@ class UCD301:
"""
return list(UCD301.ROLE_DICT.keys())[list(UCD301.ROLE_DICT.values()).index(type(self))]
- class HDMISink:
+ class HDMISink(DevBase):
"""
Class `HDMISink` contains information of available functionality modules for role HDMI Sink (RX - receiver)
role:
- `HDRX`.
- `DUTTests`.
"""
+
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
+ super().__init__(dev_io)
self.__hdrx = HDRX(dev_io.create_port_io(0, PortProtocol.HDMI), memory_manager, capturer)
self.__dut_tests = DUTTests(dev_io)
@@ -398,7 +462,7 @@ class UCD301:
"""
return list(UCD301.ROLE_DICT.keys())[list(UCD301.ROLE_DICT.values()).index(type(self))]
- class DPSinkHDMISink:
+ class DPSinkHDMISink(DevBase):
"""
Class `DPSinkHDMISink` contains information of available functionality modules for role DP and HDMI Sink
(RX - receiver) role:
@@ -408,6 +472,7 @@ class UCD301:
"""
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
+ super().__init__(dev_io)
self.__dprx = DPRX(dev_io.create_port_io(0, PortProtocol.DisplayPort), memory_manager, capturer)
self.__hdrx = HDRX(dev_io.create_port_io(0, PortProtocol.HDMI), memory_manager, capturer)
self.__dut_tests = DUTTests(dev_io)
diff --git a/UniTAP/dev/dev_4xx_roles.py b/UniTAP/dev/dev_4xx_roles.py
index 3a4b27a..a067286 100644
--- a/UniTAP/dev/dev_4xx_roles.py
+++ b/UniTAP/dev/dev_4xx_roles.py
@@ -1,6 +1,7 @@
from UniTAP.dev.ports import DPRX4xx, DPTX4xx, HDRX4xx, HDTX4xx, PDC424
from .modules import MemoryManager, Capturer, DUTTests
-from UniTAP.libs.lib_tsi.tsi_io import DeviceIO, PortProtocol
+from UniTAP.libs.lib_tsi.tsi_io import PortProtocol
+from .dev_base_roles import DevBase, DeviceIO
class UCD400:
@@ -8,7 +9,7 @@ class UCD400:
Class `UCD400` describes of device UCD-400. Device has one possible role:
- 'DisplayPort Source and Sink' `DPSourceDPSink`
"""
- class DPSourceDPSink:
+ class DPSourceDPSink(DevBase):
"""
Class `DPSourceDPSink` contains information of available functionality modules for role DP Sink
(RX - receiver) and DP Source (TX - transmitter) roles:
@@ -17,7 +18,7 @@ class UCD400:
- `DUTTests`.
"""
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
- super().__init__()
+ super().__init__(dev_io)
self.__dprx = DPRX4xx(dev_io.create_port_io(0, PortProtocol.DisplayPort), memory_manager, capturer)
self.__dptx = DPTX4xx(dev_io.create_port_io(1, PortProtocol.DisplayPort), memory_manager, capturer)
self.__dut_tests = DUTTests(dev_io)
@@ -72,7 +73,7 @@ class UCD422:
Class `UCD422` describes of device UCD-422. Device has one possible role:
- 'HDMI Source and Sink' `HDMISourceHDMISink`
"""
- class HDMISourceHDMISink:
+ class HDMISourceHDMISink(DevBase):
"""
Class `DPSourceDPSink` contains information of available functionality modules for role HDMI Sink
(RX - receiver) and HDMI Source (TX - transmitter) roles:
@@ -81,7 +82,7 @@ class UCD422:
- `DUTTests`.
"""
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
- super().__init__()
+ super().__init__(dev_io)
self.__hdrx = HDRX4xx(dev_io.create_port_io(0, PortProtocol.HDMI), memory_manager, capturer)
self.__hdtx = HDTX4xx(dev_io.create_port_io(1, PortProtocol.HDMI), memory_manager, capturer)
self.__dut_tests = DUTTests(dev_io)
@@ -136,7 +137,7 @@ class UCD424:
Class `UCD424` describes of device UCD-424. Device has one possible role:
- 'USB-C Source and Sink' `USBCSourceUSBCSink`.
"""
- class USBCSourceUSBCSink:
+ class USBCSourceUSBCSink(DevBase):
"""
Class `DPSourceDPSink` contains information of available functionality modules for role HDMI Sink
(RX - receiver) and HDMI Source (TX - transmitter) roles:
@@ -146,7 +147,7 @@ class UCD424:
- `PDC`.
"""
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
- super().__init__()
+ super().__init__(dev_io)
self.__port_rx = dev_io.create_port_io(0, PortProtocol.DisplayPortThrowUSBC)
self.__port_tx = dev_io.create_port_io(1, PortProtocol.DisplayPortThrowUSBC)
self.__dprx = DPRX4xx(self.__port_rx, memory_manager, capturer)
@@ -218,3 +219,237 @@ class UCD424:
ROLE_DICT = {
"USB-C Source and Sink": USBCSourceUSBCSink
}
+
+
+class UCD451:
+ """
+ Class `UCD451` describes of device UCD-451. Device has one possible role:
+ - 'DP Source' `DPSource`
+ """
+
+ class DPSource(DevBase):
+ """
+ Class `DPSourceDPSink` contains information of available functionality modules for role
+ DP Source (TX - transmitter) roles:
+ - `DPTX4xx`.
+ - `DUTTests`.
+ """
+
+ def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
+ super().__init__(dev_io)
+ self.__dptx = DPTX4xx(dev_io.create_port_io(0, PortProtocol.DisplayPort), memory_manager, capturer)
+ self.__dut_tests = DUTTests(dev_io)
+
+ @property
+ def dptx(self) -> DPTX4xx:
+ """
+ Returns DP Source (TX - transmitter) role.
+
+ Returns:
+ object of DPTX4xx type.
+ """
+ return self.__dptx
+
+ @property
+ def dut_tests(self) -> DUTTests:
+ """
+ Returns DUT Test module.
+
+ Returns:
+ object of DUTTests type.
+ """
+ return self.__dut_tests
+
+ @property
+ def name(self) -> str:
+ """
+ Returns name of role.
+
+ Returns:
+ object of str type.
+ """
+ return list(UCD451.ROLE_DICT.keys())[list(UCD451.ROLE_DICT.values()).index(type(self))]
+
+ ROLE_DICT = {
+ "DisplayPort Source": DPSource
+ }
+
+
+class UCD461:
+ """
+ Class `UCD461` describes of device UCD-461. Device has one possible role:
+ - 'DisplayPort Source and Sink' `DPSourceDPSink`
+ """
+ class DPSourceDPSink(DevBase):
+ """
+ Class `DPSourceDPSink` contains information of available functionality modules for role DP Sink
+ (RX - receiver) and DP Source (TX - transmitter) roles:
+ - `DPRX4xx`.
+ - `DPTX4xx`.
+ - `DUTTests`.
+ """
+ def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
+ super().__init__(dev_io)
+ self.__dprx = DPRX4xx(dev_io.create_port_io(0, PortProtocol.DisplayPort), memory_manager, capturer)
+ self.__dptx = DPTX4xx(dev_io.create_port_io(1, PortProtocol.DisplayPort), memory_manager, capturer)
+ self.__dut_tests = DUTTests(dev_io)
+
+ @property
+ def dprx(self) -> DPRX4xx:
+ """
+ Returns DP Sink (RX - receiver) role.
+
+ Returns:
+ object of DPRX4xx type.
+ """
+ return self.__dprx
+
+ @property
+ def dptx(self) -> DPTX4xx:
+ """
+ Returns DP Source (TX - transmitter) role.
+
+ Returns:
+ object of DPTX4xx type.
+ """
+ return self.__dptx
+
+ @property
+ def dut_tests(self) -> DUTTests:
+ """
+ Returns DUT Test module.
+
+ Returns:
+ object of DUTTests type.
+ """
+ return self.__dut_tests
+
+ @property
+ def name(self) -> str:
+ """
+ Returns name of role.
+
+ Returns:
+ object of str type.
+ """
+ return list(UCD461.ROLE_DICT.keys())[list(UCD461.ROLE_DICT.values()).index(type(self))]
+
+ ROLE_DICT = {
+ "DisplayPort Source and Sink": DPSourceDPSink
+ }
+
+
+class UCD452:
+ """
+ Class `UCD452` describes of device UCD-452. Device has one possible role:
+ - 'HDMI Source' `HDMISource`
+ """
+ class HDMISource(DevBase):
+ """
+ Class `DPSourceDPSink` contains information of available functionality modules for role
+ HDMI Source (TX - transmitter) roles:
+ - `HDTX4xx`.
+ - `DUTTests`.
+ """
+ def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
+ super().__init__(dev_io)
+ self.__hdtx = HDTX4xx(dev_io.create_port_io(0, PortProtocol.HDMI), memory_manager, capturer)
+ self.__dut_tests = DUTTests(dev_io)
+
+ @property
+ def hdtx(self) -> HDTX4xx:
+ """
+ Returns HDMI Source (TX - transmitter) role.
+
+ Returns:
+ object of HDTX4xx type.
+ """
+ return self.__hdtx
+
+ @property
+ def dut_tests(self) -> DUTTests:
+ """
+ Returns DUT Test module.
+
+ Returns:
+ object of DUTTests type.
+ """
+ return self.__dut_tests
+
+ @property
+ def name(self) -> str:
+ """
+ Returns name of role.
+
+ Returns:
+ object of str type.
+ """
+ return list(UCD452.ROLE_DICT.keys())[list(UCD452.ROLE_DICT.values()).index(type(self))]
+
+ ROLE_DICT = {
+ "HDMI Source": HDMISource
+ }
+
+
+class UCD462:
+ """
+ Class `UCD462` describes of device UCD-462. Device has one possible role:
+ - 'HDMI Source and Sink' `HDMISourceHDMISink`
+ """
+ class HDMISourceHDMISink(DevBase):
+ """
+ Class `DPSourceDPSink` contains information of available functionality modules for role HDMI Sink
+ (RX - receiver) and HDMI Source (TX - transmitter) roles:
+ - `HDRX4xx`.
+ - `HDTX4xx`.
+ - `DUTTests`.
+ """
+ def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
+ super().__init__(dev_io)
+ self.__hdrx = HDRX4xx(dev_io.create_port_io(0, PortProtocol.HDMI), memory_manager, capturer)
+ self.__hdtx = HDTX4xx(dev_io.create_port_io(1, PortProtocol.HDMI), memory_manager, capturer)
+ self.__dut_tests = DUTTests(dev_io)
+
+ @property
+ def hdtx(self) -> HDTX4xx:
+ """
+ Returns HDMI Source (TX - transmitter) role.
+
+ Returns:
+ object of HDTX4xx type.
+ """
+ return self.__hdtx
+
+ @property
+ def hdrx(self) -> HDRX4xx:
+ """
+ Returns HDMI Sink (RX - receiver) role.
+
+ Returns:
+ object of HDRX4xx type.
+ """
+ return self.__hdrx
+
+ @property
+ def dut_tests(self) -> DUTTests:
+ """
+ Returns DUT Test module.
+
+ Returns:
+ object of DUTTests type.
+ """
+ return self.__dut_tests
+
+ @property
+ def name(self) -> str:
+ """
+ Returns name of role.
+
+ Returns:
+ object of str type.
+ """
+ return list(UCD462.ROLE_DICT.keys())[list(UCD462.ROLE_DICT.values()).index(type(self))]
+
+ ROLE_DICT = {
+ "HDMI Source and Sink": HDMISourceHDMISink
+ }
diff --git a/UniTAP/dev/dev_5xx_roles.py b/UniTAP/dev/dev_5xx_roles.py
index fcde995..87fa3c7 100644
--- a/UniTAP/dev/dev_5xx_roles.py
+++ b/UniTAP/dev/dev_5xx_roles.py
@@ -1,6 +1,7 @@
from UniTAP.dev.ports import DPRX5xx, DPTX5xx, PDC500
from .modules import MemoryManager, Capturer, DUTTests
-from UniTAP.libs.lib_tsi.tsi_io import DeviceIO, PortProtocol
+from UniTAP.libs.lib_tsi.tsi_io import PortProtocol
+from .dev_base_roles import DevBase, DeviceIO
class UCD500:
@@ -11,7 +12,8 @@ class UCD500:
- 'DisplayPort Sink and USB-C, DP Alt Mode Source' `USBCSourceDPSink`.
- 'USB-C, DP Alt Mode Source and Sink' `USBCSourceUSBCSink`.
"""
- class DPSourceDPSink:
+
+ class DPSourceDPSink(DevBase):
"""
Class `DPSourceDPSink` contains information of available functionality modules for role DP Sink
(RX - receiver) and DP Source (TX - transmitter) roles:
@@ -19,7 +21,9 @@ class UCD500:
- `DPTX5xx`.
- `DUTTests`.
"""
+
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
+ super().__init__(dev_io)
self.__dprx = DPRX5xx(dev_io.create_port_io(0, PortProtocol.DisplayPort), memory_manager, capturer)
self.__dptx = DPTX5xx(dev_io.create_port_io(1, PortProtocol.DisplayPort), memory_manager, capturer)
self.__dut_tests = DUTTests(dev_io)
@@ -64,8 +68,9 @@ class UCD500:
"""
return list(UCD500.ROLE_DICT.keys())[list(UCD500.ROLE_DICT.values()).index(type(self))]
- class DPSourceUSBCSink:
+ class DPSourceUSBCSink(DevBase):
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
+ super().__init__(dev_io)
self.__port_rx = dev_io.create_port_io(0, PortProtocol.DisplayPortThrowUSBC)
self.__dptx = DPTX5xx(dev_io.create_port_io(1, PortProtocol.DisplayPort), memory_manager, capturer)
self.__dprx = DPRX5xx(self.__port_rx, memory_manager, capturer)
@@ -122,8 +127,9 @@ class UCD500:
"""
return list(UCD500.ROLE_DICT.keys())[list(UCD500.ROLE_DICT.values()).index(type(self))]
- class USBCSourceDPSink:
+ class USBCSourceDPSink(DevBase):
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
+ super().__init__(dev_io)
self.__port_tx = dev_io.create_port_io(1, PortProtocol.DisplayPortThrowUSBC)
self.__dptx = DPTX5xx(self.__port_tx, memory_manager, capturer)
self.__dprx = DPRX5xx(dev_io.create_port_io(0, PortProtocol.DisplayPort), memory_manager, capturer)
@@ -180,8 +186,9 @@ class UCD500:
"""
return list(UCD500.ROLE_DICT.keys())[list(UCD500.ROLE_DICT.values()).index(type(self))]
- class USBCSourceUSBCSink:
+ class USBCSourceUSBCSink(DevBase):
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
+ super().__init__(dev_io)
self.__port_rx = dev_io.create_port_io(0, PortProtocol.DisplayPortThrowUSBC)
self.__port_tx = dev_io.create_port_io(1, PortProtocol.DisplayPortThrowUSBC)
self.__dprx = DPRX5xx(self.__port_rx, memory_manager, capturer)
diff --git a/UniTAP/dev/dev_base_roles.py b/UniTAP/dev/dev_base_roles.py
new file mode 100644
index 0000000..91be895
--- /dev/null
+++ b/UniTAP/dev/dev_base_roles.py
@@ -0,0 +1,28 @@
+from UniTAP.libs.lib_tsi.tsi_io import DeviceIO
+
+
+class DevBase:
+ """
+ Class `DevBase`.
+ """
+
+ def __init__(self, dev_io: DeviceIO):
+ self.__dev_io = dev_io
+
+ def is_fw_update_available(self) -> bool:
+ """
+ Checks if there is a firmware update available for the current device.
+
+ Returns:
+ object of bool type.
+ """
+ return self.__dev_io.is_fw_update_available()
+
+ def get_fw_update_info(self) -> str:
+ """
+ Returns a list of modules to update on the current device and also displays the current version.
+
+ Returns:
+ object of str type.
+ """
+ return self.__dev_io.get_fw_update_info()
diff --git a/UniTAP/dev/device.py b/UniTAP/dev/device.py
index feece27..086ae58 100644
--- a/UniTAP/dev/device.py
+++ b/UniTAP/dev/device.py
@@ -3,7 +3,7 @@ import weakref
from typing import TypeVar, Type, List
from .dev_5xx_roles import UCD500
-from .dev_4xx_roles import UCD400, UCD422, UCD424
+from .dev_4xx_roles import UCD400, UCD422, UCD424, UCD451, UCD452, UCD461, UCD462
from .dev_3xx_roles import UCD240, UCD340, UCD323, UCD301
from .modules import *
@@ -16,6 +16,11 @@ RoleType = TypeVar("RoleType",
UCD500.USBCSourceUSBCSink,
UCD500.USBCSourceDPSink,
+ UCD462.HDMISourceHDMISink,
+ UCD461.DPSourceDPSink,
+ UCD452.HDMISource,
+ UCD451.DPSource,
+
UCD424.USBCSourceUSBCSink,
UCD422.HDMISourceHDMISink,
UCD400.DPSourceDPSink,
@@ -26,6 +31,7 @@ RoleType = TypeVar("RoleType",
UCD323.DPSink,
UCD323.DPSource,
UCD323.HDMISink,
+ UCD323.HDMISinkEARC,
UCD323.HDMISource,
UCD301.DPSink,
@@ -36,6 +42,10 @@ RoleType = TypeVar("RoleType",
MODEL_TO_CLASS = {
"UCD-500": UCD500,
+ "UCD-462": UCD462,
+ "UCD-461": UCD461,
+ "UCD-452": UCD452,
+ "UCD-451": UCD451,
"UCD-424": UCD424,
"UCD-422": UCD422,
"UCD-400": UCD400,
@@ -90,9 +100,10 @@ class TSIDevice:
def __define_internal_handler(self, role, role_type):
if role_type in [UCD500.DPSourceUSBCSink, UCD500.DPSourceDPSink, UCD500.USBCSourceUSBCSink,
- UCD500.USBCSourceDPSink, UCD424.USBCSourceUSBCSink, UCD400.DPSourceDPSink]:
+ UCD500.USBCSourceDPSink, UCD424.USBCSourceUSBCSink, UCD400.DPSourceDPSink,
+ UCD461.DPSourceDPSink]:
self.opf_handler._set_roles(role.dptx, role.dprx)
- elif role_type in [UCD422.HDMISourceHDMISink]:
+ elif role_type in [UCD422.HDMISourceHDMISink, UCD462.HDMISourceHDMISink]:
self.opf_handler._set_roles(role.hdtx, role.hdrx)
def select_role(self, role_type: Type[RoleType]) -> RoleType:
@@ -152,3 +163,28 @@ class TSIDevice:
@property
def _terminal(self) -> Terminal:
return self.__terminal
+
+ def reset(self):
+ """
+ Reset Device NIOS FPGA.
+ """
+ role = self.__io.get_role_type()
+
+ if role is None:
+ logging.error("[UniTAP] Cannot reset device without selected role")
+ return
+
+ if role not in (UCD500.DPSourceUSBCSink,
+ UCD500.DPSourceDPSink,
+ UCD500.USBCSourceUSBCSink,
+ UCD500.USBCSourceDPSink):
+ logging.error(f"[UniTAP] Reset functionality is not supported for selected role {role}.")
+ return
+
+ self.__io.reset()
+
+ def close(self):
+ """
+ Close Device (only with using TSI function `TSIX_DEV_CloseDevice`)
+ """
+ self.__io.close()
diff --git a/UniTAP/dev/modules/capturer/capture.py b/UniTAP/dev/modules/capturer/capture.py
index 3a96b14..923d541 100644
--- a/UniTAP/dev/modules/capturer/capture.py
+++ b/UniTAP/dev/modules/capturer/capture.py
@@ -1,8 +1,10 @@
import time
-from typing import Union
+from ctypes import c_int, c_uint, c_int32
+from typing import Union, List
from UniTAP.libs.lib_tsi.tsi_io import DeviceIO
-from UniTAP.libs.lib_tsi.tsi import *
+import UniTAP.libs.lib_tsi.tsi_types as ci
+import UniTAP.libs.lib_tsi.tsi_private_types as p_ci
from UniTAP.dev.modules.capturer.statuses import CaptureStatus, AudioCaptureStatus, EventCaptureStatus, \
VideoCaptureStatus, BulkCaptureStatus
from UniTAP.common import AudioFrameData, VideoFrameDSC, create_from_pps
@@ -12,6 +14,8 @@ from UniTAP.utils import function_scheduler
from UniTAP.dev.ports.modules.capturer.bulk.private_bulk_types import *
from UniTAP.dev.ports.modules.capturer.bulk.bulk_types import *
from .types import *
+from UniTAP.utils import tsi_logging as logging
+
TIMEOUT = 10
@@ -84,27 +88,27 @@ class Capturer:
@property
def video_capturer_status(self) -> VideoCaptureStatus:
- return VideoCaptureStatus(self.__io.get(TSI_VIDCAP_CAPTURE_STATUS_R, c_int)[1])
+ return VideoCaptureStatus(self.__io.get(p_ci.TSI_VIDCAP_CAPTURE_STATUS_R, c_int)[1])
@property
def audio_capturer_status(self) -> AudioCaptureStatus:
- return AudioCaptureStatus(self.__io.get(TSI_R_AUDCAP_STATUS, c_int)[1])
+ return AudioCaptureStatus(self.__io.get(ci.TSI_R_AUDCAP_STATUS, c_int)[1])
@property
def event_capturer_status(self) -> EventCaptureStatus:
- return EventCaptureStatus(self.__io.get(TSI_EVCAP_CTRL, c_uint32)[1] & 0xFF)
+ return EventCaptureStatus(self.__io.get(ci.TSI_EVCAP_CTRL, c_uint32)[1] & 0xFF)
@property
def bulk_capturer_status(self) -> BulkCaptureStatus:
- return BulkCaptureStatus(self.__io.get(TSI_BULK_CAPTURE_STATUS_R, c_uint32)[1] & 0x3)
+ return BulkCaptureStatus(self.__io.get(ci.TSI_BULK_CAPTURE_STATUS_R, c_uint32)[1] & 0x3)
def start_capture(self, config: CaptureConfig):
self.__mutex.acquire()
self.__config.from_int(self.__current_config().to_int() | config.to_int())
- self.__io.set(TSI_CAP_CONFIG, self.__config.to_int())
+ self.__io.set(ci.TSI_CAP_CONFIG, self.__config.to_int())
- if self.__io.set(TSI_W_CAP_COMMAND, 1) == 0:
+ if self.__io.set(ci.TSI_W_CAP_COMMAND, 1) == 0:
self.__status = CaptureStatus.Running
else:
self.__status = CaptureStatus.Unknown
@@ -115,9 +119,9 @@ class Capturer:
self.__mutex.acquire()
self.__config.from_int(self.__current_config().to_int() & ~config.to_int())
- self.__io.set(TSI_CAP_CONFIG, self.__config.to_int())
+ self.__io.set(ci.TSI_CAP_CONFIG, self.__config.to_int())
- if self.__io.set(TSI_W_CAP_COMMAND, 2) == 0:
+ if self.__io.set(ci.TSI_W_CAP_COMMAND, 2) == 0:
self.__status = CaptureStatus.Stop
else:
self.__status = CaptureStatus.Unknown
@@ -128,22 +132,22 @@ class Capturer:
event = EventData()
if event_count > 0:
- event_size = self.__io.get(TSI_R_EVCAP_DATA, None, 0)[0]
+ event_size = self.__io.get(ci.TSI_R_EVCAP_DATA, None, 0)[0]
if event_size > 0:
- event.data = bytearray(self.__io.get(TSI_R_EVCAP_DATA, c_ubyte, event_size)[1])
+ event.data = bytearray(self.__io.get(ci.TSI_R_EVCAP_DATA, c_ubyte, event_size)[1])
return event
def get_buffer_capacity(self, stream_number: int = None):
if stream_number is not None:
- self.__io.set(TSI_DPRX_STREAM_SELECT, stream_number, c_uint32)
- self.__io.set(TSI_DPRX_MSA_COMMAND_W, 2, c_uint32)
+ self.__io.set(ci.TSI_DPRX_STREAM_SELECT, stream_number, c_uint32)
+ self.__io.set(ci.TSI_DPRX_MSA_COMMAND_W, 2, c_uint32)
- width = self.__io.get(TSI_R_INPUT_WIDTH , c_uint32)[1]
- height = self.__io.get(TSI_R_INPUT_HEIGHT , c_uint32)[1]
- total_memory_bytes = self.__io.get(TSI_MEMORY_SIZE_R, c_uint64)[1]
- bpc = self.__io.get(TSI_INPUT_COLOR_DEPTH_R , c_uint32)[1]
- color_format = self.__io.get(TSI_INPUT_COLOR_MODE_R , c_uint32)[1]
+ width = self.__io.get(ci.TSI_R_INPUT_WIDTH, c_uint32)[1]
+ height = self.__io.get(ci.TSI_R_INPUT_HEIGHT, c_uint32)[1]
+ total_memory_bytes = self.__io.get(ci.TSI_MEMORY_SIZE_R, c_uint64)[1]
+ bpc = self.__io.get(ci.TSI_INPUT_COLOR_DEPTH_R, c_uint32)[1]
+ color_format = self.__io.get(ci.TSI_INPUT_COLOR_MODE_R, c_uint32)[1]
bpp = self._get_bits_per_pixel(bpc, color_format)
line_alignment = 1023
@@ -186,7 +190,7 @@ class Capturer:
return (value + alignment) & ~alignment
def get_available_events_count(self) -> int:
- return self.__io.get(TSI_R_EVCAP_COUNT, c_uint32)[1]
+ return self.__io.get(ci.TSI_R_EVCAP_COUNT, c_uint32)[1]
def capture_n_events(self, events_count: int):
if events_count <= 0:
@@ -215,19 +219,21 @@ class Capturer:
audio_frame = AudioFrameData()
- audio_frame.channel_count = self.__io.get(TSI_R_AUDCAP_CHANNEL_COUNT, c_int)[1]
- audio_frame.sample_size = self.__io.get(TSI_R_AUDCAP_SAMPLE_SIZE, c_int)[1] * 8
- audio_frame.sample_rate = self.__io.get(TSI_R_AUDCAP_SAMPLE_RATE, c_int)[1]
- audio_frame.timestamp = self.__io.get(TSI_R_AUDCAP_TIMESTAMP, c_uint64)[1]
- audio_frame.samples = self.__io.get(TSI_R_AUDCAP_SAMPLE_COUNT, c_int)[1]
- audio_frame.frame_counter = self.__io.get(TSI_R_AUDCAP_FRAME_COUNTER, c_int)[1]
- audio_frame.sample_format = self.__io.get(TSI_R_AUDCAP_SAMPLE_FORMAT, c_int)[1]
+ audio_frame.channel_count = self.__io.get(ci.TSI_AUDCAP_CHANNEL_COUNT_R, c_int)[1]
+ audio_frame.sample_size = self.__io.get(ci.TSI_AUDCAP_SAMPLE_BITS_SIZE_R, c_int)[1]
+ audio_frame.sample_rate = self.__io.get(ci.TSI_R_AUDCAP_SAMPLE_RATE, c_int)[1]
+ audio_frame.timestamp = self.__io.get(ci.TSI_R_AUDCAP_TIMESTAMP, c_uint64)[1]
+ audio_frame.samples = self.__io.get(ci.TSI_R_AUDCAP_SAMPLE_COUNT, c_int)[1]
+ audio_frame.frame_counter = self.__io.get(ci.TSI_R_AUDCAP_FRAME_COUNTER, c_int)[1]
+ audio_frame.sample_format = self.__io.get(ci.TSI_R_AUDCAP_SAMPLE_FORMAT, c_int)[1]
- min_buff_size = self.__io.get(TSI_R_AUDCAP_MIN_BUFFER_SIZE, c_uint32)[1]
- audio_frame.data = self.__io.get(TSI_R_AUDCAP_SAMPLE_DATA, c_uint8, min_buff_size)[1]
+ min_buff_size = self.__io.get(ci.TSI_R_AUDCAP_MIN_BUFFER_SIZE, c_uint32)[1]
+ audio_frame.data = self.__io.get(ci.TSI_R_AUDCAP_SAMPLE_DATA, c_uint8, min_buff_size)[1]
- m_sec -= 1000 * len(audio_frame.data) / 2 / audio_frame.channel_count / audio_frame.sample_rate
+ captured_sample_count = len(audio_frame.data) / (audio_frame.sample_size / 8) / audio_frame.channel_count
+ captured_m_sec_count = int(captured_sample_count * 1000 / audio_frame.sample_rate)
+ m_sec -= captured_m_sec_count
return audio_frame, m_sec
def capture_audio_by_n_frames(self, frames_count: int, timeout: int = None):
@@ -263,29 +269,32 @@ class Capturer:
raise ValueError(f"Seconds count must be more than 0.")
buffer = []
- time_break = False
-
- while m_sec > 0 and not time_break:
- captured = 0
+ last_data_time = time.time()
+ while m_sec > 0:
start_time = time.time()
- while captured < 10 and m_sec > 0:
- status = self.audio_capturer_status
- current_time = time.time()
- if current_time - start_time > TIMEOUT:
- time_break = True
- break
- if status == AudioCaptureStatus.Stop:
- continue
+ while self.audio_capturer_status != AudioCaptureStatus.Running:
+ if time.time() - start_time > TIMEOUT:
+ logging.error(f"Audio capture device not running for {TIMEOUT} seconds. Aborting.")
+ return buffer
+ logging.debug(f"Audio capture device not running yet: {self.audio_capturer_status}")
+ time.sleep(0.5)
- audio_frame, m_sec = self.__capture_audio(m_sec=m_sec)
- if len(audio_frame.data) > 0:
- captured += 1
- buffer.append(audio_frame)
+ audio_frame, m_sec = self.__capture_audio(m_sec=m_sec)
+ if len(audio_frame.data) > 0:
+ buffer.append(audio_frame)
+ last_data_time = time.time()
+ else:
+ if time.time() - last_data_time > TIMEOUT:
+ logging.error(
+ f"No audio data captured within {TIMEOUT} seconds. "
+ f"Interrupting capture process."
+ )
+ break
return buffer
def get_available_video_frame_count(self):
- return self.__io.get(TSI_VIDCAP_AVAILABLE_FRAME_COUNT, c_int)[1]
+ return self.__io.get(p_ci.TSI_VIDCAP_AVAILABLE_FRAME_COUNT, c_int)[1]
def __check_available_video(self, timeout) -> bool:
def is_video_available(capturer):
@@ -322,27 +331,27 @@ class Capturer:
f"Cannot start to capture video. Current video capture status {self.video_capturer_status.name}")
try:
- result = self.__io.set(TSI_VIDCAP_CAPTURE_NEXT_W, 0)
- if result == TSI_ERROR_DATA_PROTECTION_ENABLED:
+ result = self.__io.set(ci.TSI_VIDCAP_CAPTURE_NEXT_W, 0)
+ if result == ci.TSI_ERROR_DATA_PROTECTION_ENABLED:
raise CaptureError("Video data is HDCP protected. Capturing is not available.")
except AssertionError as e:
raise CaptureError(f"Error: {e}")
try:
- min_buffer_size = self.__io.get(TSI_R_VIDCAP_MIN_BUFFER_SIZE, c_int)[1]
+ min_buffer_size = self.__io.get(ci.TSI_R_VIDCAP_MIN_BUFFER_SIZE, c_int)[1]
if min_buffer_size <= 0:
raise ValueError("Minimum buffer size must be more than 0")
except AssertionError as e:
raise CaptureError(f"Error: {e}")
try:
- frame_data = bytearray(self.__io.get(TSI_R_VIDCAP_FRAME_DATA, c_uint8, min_buffer_size)[1])
+ frame_data = bytearray(self.__io.get(ci.TSI_R_VIDCAP_FRAME_DATA, c_uint8, min_buffer_size)[1])
if len(frame_data) <= 0:
raise ValueError("Minimum length of captured data must be more than 0")
except AssertionError as e:
raise CaptureError(f"Error: {e}")
- frame_attributes = self.__io.get(TSI_VIDCAP_FRAME_HEADER_R, VideoFrameHeader)[1]
+ frame_attributes = self.__io.get(ci.TSI_VIDCAP_FRAME_HEADER_R, VideoFrameHeader)[1]
if frame_attributes.is_dsc() and len(frame_data) > 128:
vf = VideoFrameDSC()
@@ -397,12 +406,12 @@ class Capturer:
def set_video_stream_number(self, number: int):
self.__mutex.acquire()
- self.__io.set(TSI_DPRX_STREAM_SELECT, number, c_uint32)
+ self.__io.set(ci.TSI_DPRX_STREAM_SELECT, number, c_uint32)
self.__mutex.release()
def __current_config(self) -> CaptureConfig:
config = CaptureConfig()
- config.from_int(self.__io.get(TSI_CAP_CONFIG, c_uint)[1])
+ config.from_int(self.__io.get(ci.TSI_CAP_CONFIG, c_uint)[1])
return config
# Capture CRC
@@ -410,7 +419,7 @@ class Capturer:
if crc_frame_count <= 0:
raise ValueError(f"Incorrect crc frame count: {crc_frame_count}")
- crc_values = self.__io.get(TSI_VIDCAP_SIGNAL_CRC_R, CrcStruct, crc_frame_count)[1]
+ crc_values = self.__io.get(ci.TSI_VIDCAP_SIGNAL_CRC_R, CrcStruct, crc_frame_count)[1]
crc_list = []
if crc_frame_count == 1:
crc_list = [(crc_values.r, crc_values.g, crc_values.b)]
@@ -420,15 +429,15 @@ class Capturer:
# Bulk Capturer
def read_bulk_capture_caps(self) -> CaptureCaps:
- return self.__io.get(TSI_BULK_CAPTURE_CAPS_R, CaptureCaps)[1]
+ return self.__io.get(ci.TSI_BULK_CAPTURE_CAPS_R, CaptureCaps)[1]
def read_bulk_trigger_caps(self) -> int:
- return self.__io.get(TSI_BULK_TRIGGER_CAPS_R, c_uint32)[1]
+ return self.__io.get(ci.TSI_BULK_TRIGGER_CAPS_R, c_uint32)[1]
def write_bulk_trigger_settings(self, trigger_mask: int, trigger_config: list, trigger_config_ext: list):
- self.__io.set(TSI_BULK_TRIGGER_MASK_W, trigger_mask, c_uint32)
- self.__io.set(TSI_BULK_TRIGGER_CONFIGURATION_W, trigger_config, c_uint32, data_count=len(trigger_config))
- self.__io.set(TSI_BULK_TRIGGER_CONFIGURATION_EXT_W, trigger_config_ext, c_uint32,
+ self.__io.set(ci.TSI_BULK_TRIGGER_MASK_W, trigger_mask, c_uint32)
+ self.__io.set(ci.TSI_BULK_TRIGGER_CONFIGURATION_W, trigger_config, c_uint32, data_count=len(trigger_config))
+ self.__io.set(ci.TSI_BULK_TRIGGER_CONFIGURATION_EXT_W, trigger_config_ext, c_uint32,
data_count=len(trigger_config_ext))
def write_bulk_size(self, size: int):
@@ -436,56 +445,56 @@ class Capturer:
data.BLOCK = 0
data.OFFSET = 0
data.SIZE = size
- self.__io.set(TSI_BULK_CAPTURE_BLOCK, data, SBlock)
+ self.__io.set(ci.TSI_BULK_CAPTURE_BLOCK, data, SBlock)
def write_encoding_type(self, value: EncodingTypeEnum):
- self.__io.set(TSI_BULK_CAPTURE_TYPE, value.value, c_uint32)
+ self.__io.set(ci.TSI_BULK_CAPTURE_TYPE, value.value, c_uint32)
def read_encoding_type(self) -> EncodingTypeEnum:
- return EncodingTypeEnum(self.__io.get(TSI_BULK_CAPTURE_TYPE, c_uint32)[1])
+ return EncodingTypeEnum(self.__io.get(ci.TSI_BULK_CAPTURE_TYPE, c_uint32)[1])
def write_lane_count(self, value: LaneCountEnum):
- self.__io.set(TSI_BULK_CAPTURE_LANE_COUNT, value.value, c_uint32)
+ self.__io.set(ci.TSI_BULK_CAPTURE_LANE_COUNT, value.value, c_uint32)
def read_lane_count(self) -> LaneCountEnum:
- return LaneCountEnum(self.__io.get(TSI_BULK_CAPTURE_LANE_COUNT, c_uint32)[1])
+ return LaneCountEnum(self.__io.get(ci.TSI_BULK_CAPTURE_LANE_COUNT, c_uint32)[1])
def write_bulk_gpio(self, gpio: bool):
- self.__io.set(TSI_BULK_CAPTURE_GPIO_W, TSI_BULK_CAPTURE_GPIO_5BIT if gpio else TSI_BULK_CAPTURE_GPIO_OFF,
+ self.__io.set(ci.TSI_BULK_CAPTURE_GPIO_W, ci.TSI_BULK_CAPTURE_GPIO_5BIT if gpio else ci.TSI_BULK_CAPTURE_GPIO_OFF,
c_uint32)
def write_bulk_trigger_position(self, position: int):
- self.__io.set(TSI_BULK_TRIGGER_POS, position)
+ self.__io.set(ci.TSI_BULK_TRIGGER_POS, position)
def start_bulk_capture(self):
self.__mutex.acquire()
- self.__io.set(TSI_EVCAP_CTRL, 1)
- self.__io.set(TSI_BULK_CAPTURE_CONTROL_W, TSI_BULK_CAPTURE_START)
+ self.__io.set(ci.TSI_EVCAP_CTRL, 1)
+ self.__io.set(ci.TSI_BULK_CAPTURE_CONTROL_W, ci.TSI_BULK_CAPTURE_START)
self.__mutex.release()
def stop_bulk_capture(self):
self.__mutex.acquire()
- self.__io.set(TSI_EVCAP_CTRL, 0)
- self.__io.set(TSI_BULK_CAPTURE_CONTROL_W, TSI_BULK_CAPTURE_STOP)
+ self.__io.set(ci.TSI_EVCAP_CTRL, 0)
+ self.__io.set(ci.TSI_BULK_CAPTURE_CONTROL_W, ci.TSI_BULK_CAPTURE_STOP)
self.__mutex.release()
def start_event_capture(self):
self.__mutex.acquire()
- self.__io.set(TSI_EVCAP_CTRL, 1)
- self.__io.set(TSI_EVCAP_EVENT_SRC_EN, UCD_ALL_EVENTS)
+ self.__io.set(ci.TSI_EVCAP_CTRL, 1)
+ self.__io.set(ci.TSI_EVCAP_EVENT_SRC_EN, ci.UCD_ALL_EVENTS)
self.__mutex.release()
def stop_event_capture(self):
self.__mutex.acquire()
- self.__io.set(TSI_EVCAP_CTRL, 0)
+ self.__io.set(ci.TSI_EVCAP_CTRL, 0)
self.__mutex.release()
@@ -494,9 +503,9 @@ class Capturer:
value = -1
time_waited = time.time()
- while value != TSI_BULK_STATUS_IDLE and time.time() - time_waited < max_time_waiting:
- self.__io.set(TSI_BULK_CAPTURE_CLEAR_W, 0)
- value = self.__io.get(TSI_BULK_CAPTURE_STATUS_R)[1]
+ while value != ci.TSI_BULK_STATUS_IDLE and time.time() - time_waited < max_time_waiting:
+ self.__io.set(ci.TSI_BULK_CAPTURE_CLEAR_W, 0)
+ value = self.__io.get(ci.TSI_BULK_CAPTURE_STATUS_R)[1]
def bulk_capture(self, all_size: int, trigger_enabled: Optional[TriggerVarType]) -> list:
buffer = []
@@ -504,16 +513,16 @@ class Capturer:
prev_status = 0
last_bulk_capture_time = time.time()
for i in range(iterations):
- event_count = self.__io.get(TSI_EVCAP_COUNT_R, c_uint32)[1]
+ event_count = self.__io.get(ci.TSI_EVCAP_COUNT_R, c_uint32)[1]
if event_count > 0:
event_number = 0
prev_timestamp = 0
events_captured = 0
while event_count > 0 and events_captured < 500:
- event_size = self.__io.get(TSI_R_EVCAP_DATA, None, 0)[0]
+ event_size = self.__io.get(ci.TSI_R_EVCAP_DATA, None, 0)[0]
if event_size > 0:
cap_data = CapturedData()
- cap_data.data = bytearray(self.__io.get(TSI_R_EVCAP_DATA, c_ubyte, event_size)[1])
+ cap_data.data = bytearray(self.__io.get(ci.TSI_R_EVCAP_DATA, c_ubyte, event_size)[1])
cap_data.data = cap_data.data[3:]
cap_data.type = CapturedDataType.Event
cap_data.timestamp = int.from_bytes(bytes=cap_data.data[:8], byteorder='big')
@@ -526,8 +535,8 @@ class Capturer:
events_captured += 1
event_count -= 1
- bulk_status = self.__io.get(TSI_BULK_CAPTURE_STATUS_R, c_int32)[1]
- if bulk_status == TSI_BULK_STATUS_IDLE and prev_status == TSI_BULK_STATUS_TRANSFERRING:
+ bulk_status = self.__io.get(ci.TSI_BULK_CAPTURE_STATUS_R, c_int32)[1]
+ if bulk_status == ci.TSI_BULK_STATUS_IDLE and prev_status == ci.TSI_BULK_STATUS_TRANSFERRING:
return buffer
prev_status = bulk_status
@@ -538,12 +547,12 @@ class Capturer:
if not self.__check_available_bulk_data(TIMEOUT):
return buffer
- self.__io.set(TSI_EVCAP_CTRL, 0)
+ self.__io.set(ci.TSI_EVCAP_CTRL, 0)
cap_data = CapturedData()
cap_data.type = CapturedDataType.Bulk
- result, data, _ = self.__io.get(TSI_BULK_CAPTURE_DATA_R, c_ubyte, 1024 * 1024)
+ result, data, _ = self.__io.get(ci.TSI_BULK_CAPTURE_DATA_R, c_ubyte, 1024 * 1024)
cap_data.data = bytearray(data)
- if result >= TSI_SUCCESS and len(cap_data.data) > 0:
+ if result >= ci.TSI_SUCCESS and len(cap_data.data) > 0:
buffer.append(cap_data)
last_bulk_capture_time = time.time()
diff --git a/UniTAP/dev/modules/dut_tests/cfg/[0x03]src_dut_dp_8b10b_ll_cts.json b/UniTAP/dev/modules/dut_tests/cfg/[0x03]src_dut_dp_8b10b_ll_cts.json
index 6717eb2..9161601 100644
--- a/UniTAP/dev/modules/dut_tests/cfg/[0x03]src_dut_dp_8b10b_ll_cts.json
+++ b/UniTAP/dev/modules/dut_tests/cfg/[0x03]src_dut_dp_8b10b_ll_cts.json
@@ -1996,40 +1996,6 @@
"minValue": 0,
"name": "Maximum refresh rate for supported Adaptive-Sync video timings, in Hz.",
"type": 4
- },
- {
- "configId": "0x10e000d",
- "defaultValue": "0",
- "description": "Reserved for extension.",
- "bitList":
- [
- {"description": "0x10e000d", "defaultValue": "0"},
- {"description": "0x10e000f", "defaultValue": "0"},
- {"description": "0x10e001c", "defaultValue": "0"},
- {"description": "0x10e001d", "defaultValue": "0"},
- {"description": "0x10e001e", "defaultValue": "0"},
- {"description": "0x10e001f", "defaultValue": "0"},
- {"description": "0x10e002f", "defaultValue": "0"},
- {"description": "0x10e0030", "defaultValue": "0"},
- {"description": "0x10e0031", "defaultValue": "0"},
- {"description": "0x10e0032", "defaultValue": "0"},
- {"description": "0x10e0033", "defaultValue": "0"},
- {"description": "0x10e0034", "defaultValue": "0"},
- {"description": "0x10e0035", "defaultValue": "0"},
- {"description": "0x10e0036", "defaultValue": "0"},
- {"description": "0x10e0037", "defaultValue": "0"},
- {"description": "0x10e00b7", "defaultValue": "0"},
- {"description": "0x10e00b8", "defaultValue": "0"},
- {"description": "0x10e00b9", "defaultValue": "0"},
- {"description": "0x10e00ba", "defaultValue": "0"},
- {"description": "0x10e00bb", "defaultValue": "0"},
- {"description": "0x10e00bc", "defaultValue": "0"},
- {"description": "0x10e00bd", "defaultValue": "0"},
- {"description": "0x10e00be", "defaultValue": "0"}
- ],
- "flag": 3,
- "id": "RESERVED",
- "type": 4
}
],
"id": "0x03",
diff --git a/UniTAP/dev/modules/dut_tests/cfg/[0x04]src_dut_link_config.json b/UniTAP/dev/modules/dut_tests/cfg/[0x04]src_dut_link_config.json
index 6c5e90c..8e5a272 100644
--- a/UniTAP/dev/modules/dut_tests/cfg/[0x04]src_dut_link_config.json
+++ b/UniTAP/dev/modules/dut_tests/cfg/[0x04]src_dut_link_config.json
@@ -67,20 +67,6 @@
"minValue": 0,
"name": "Delay between test cycles, in milliseconds",
"type": 4
- },
- {
- "configId": "0x10703",
- "defaultValue": "0",
- "description": "Reserved for DUT Capabilities flags and DUT Test automation capabilities flags.",
- "bitList":
- [
- {"description": "0x10703", "defaultValue": "0"},
- {"description": "0x10704", "defaultValue": "0"}
- ],
- "flag": 3,
- "id": "RESERVED",
- "name": "Reserved",
- "type": 4
}
],
"id": "0x04",
diff --git a/UniTAP/dev/modules/dut_tests/cfg/[0x08]src_dut_dp_128b132b_ll_cts.json b/UniTAP/dev/modules/dut_tests/cfg/[0x08]src_dut_dp_128b132b_ll_cts.json
index 9368997..853e035 100644
--- a/UniTAP/dev/modules/dut_tests/cfg/[0x08]src_dut_dp_128b132b_ll_cts.json
+++ b/UniTAP/dev/modules/dut_tests/cfg/[0x08]src_dut_dp_128b132b_ll_cts.json
@@ -65,7 +65,11 @@
{"mask": "0x01000000", "description": "2x1 tiled display and DisplayID Tiled Display Topology data block supported"},
{"mask": "0x02000000", "description": "Field sequential stereo and DisplayID Tiled Stereo Display Interface data block supported"},
{"mask": "0x04000000", "description": "Stacked frame stereo and DisplayID Tiled Stereo Display Interface data block supported"},
- {"mask": "0x08000000", "description": "Dynamic Refresh Rate with VBlank stretch with MSA_TIMING_PAR_IGNORED supported"}
+ {"mask": "0x08000000", "description": "Dynamic Refresh Rate with VBlank stretch with MSA_TIMING_PAR_IGNORED supported"},
+ {"mask": "0x10000000", "description": "MST transmission supported"},
+ {"mask": "0x20000000", "description": "MST UP_REQUEST supported"},
+ {"mask": "0x40000000", "description": "MST RSN_REQUEST supported"},
+ {"mask": "0x80000000", "description": "MST POWER_UP/DOWN_PHY supported"}
],
"flag": 3,
"id": "TSI_DP20_SRCCTS_DUT_CAPS",
@@ -211,6 +215,17 @@
"name": "Debug mode configuration.",
"type": 12
},
+ {
+ "configId": "0x119000f",
+ "defaultValue": "1028",
+ "description": "Includes: Maximum stream count supported and Maximum daisy chain sink count supported.",
+ "flag": 3,
+ "id": "TSI_DP20_SRCCTS_DUT_MST_CAPS",
+ "maxValue": 2147483647,
+ "minValue": 0,
+ "name": "MST source DUT capabilities.",
+ "type": 4
+ },
{
"configId": "0x1190010",
"defaultValue": "32000",
@@ -2598,39 +2613,6 @@
"name": "Video mode supported by Source DUT (DP2.1 video & DSC tests)",
"type": 4
},
- {
- "configId": "0x119000f",
- "defaultValue": "0",
- "description": "Reserved for extension.",
- "bitList":
- [
- {"description": "0x119000f", "defaultValue": "0"},
- {"description": "0x119001c", "defaultValue": "0"},
- {"description": "0x119001d", "defaultValue": "0"},
- {"description": "0x119001e", "defaultValue": "0"},
- {"description": "0x119001f", "defaultValue": "0"},
- {"description": "0x119002f", "defaultValue": "0"},
- {"description": "0x1190030", "defaultValue": "0"},
- {"description": "0x1190031", "defaultValue": "0"},
- {"description": "0x1190032", "defaultValue": "0"},
- {"description": "0x1190033", "defaultValue": "0"},
- {"description": "0x1190034", "defaultValue": "0"},
- {"description": "0x1190035", "defaultValue": "0"},
- {"description": "0x1190036", "defaultValue": "0"},
- {"description": "0x1190037", "defaultValue": "0"},
- {"description": "0x11900b7", "defaultValue": "0"},
- {"description": "0x11900b8", "defaultValue": "0"},
- {"description": "0x11900b9", "defaultValue": "0"},
- {"description": "0x11900ba", "defaultValue": "0"},
- {"description": "0x11900bb", "defaultValue": "0"},
- {"description": "0x11900bc", "defaultValue": "0"},
- {"description": "0x11900bd", "defaultValue": "0"},
- {"description": "0x11900be", "defaultValue": "0"}
- ],
- "flag": 3,
- "id": "RESERVED",
- "type": 4
- },
{
"configId": "0x11900f4",
"defaultValue": "1920",
diff --git a/UniTAP/dev/modules/dut_tests/cfg/[0x21]snk_dut_hdmi_dsc_cts.json b/UniTAP/dev/modules/dut_tests/cfg/[0x21]snk_dut_hdmi_dsc_cts.json
index acf173c..df8488f 100644
--- a/UniTAP/dev/modules/dut_tests/cfg/[0x21]snk_dut_hdmi_dsc_cts.json
+++ b/UniTAP/dev/modules/dut_tests/cfg/[0x21]snk_dut_hdmi_dsc_cts.json
@@ -132,7 +132,7 @@
],
"flag": 1,
"id": "TSI_HDMI_SNKCTS_DSC_VIDEO_FORMAT",
- "name": "DSC Video formats 1.",
+ "name": "DSC Video formats 1",
"type": 12
},
{
@@ -174,7 +174,7 @@
],
"flag": 1,
"id": "TSI_HDMI_SNKCTS_DSC_VIDEO_FORMAT_2",
- "name": "DSC Video formats 2.",
+ "name": "DSC Video formats 2",
"type": 12
},
{
@@ -197,7 +197,7 @@
"id": "TSI_HDMI_SNKCTS_DSC_TOTAL_CHUNK_BYTES",
"maxValue": 2147483647,
"minValue": 0,
- "name": "DSC Max Slices",
+ "name": "DSC TotalChunkKBytes",
"type": 4
}
],
diff --git a/UniTAP/dev/modules/dut_tests/cfg/[0x23]snk_dut_hdmi_gaming.json b/UniTAP/dev/modules/dut_tests/cfg/[0x23]snk_dut_hdmi_gaming.json
index e7ce346..4cb6c7f 100644
--- a/UniTAP/dev/modules/dut_tests/cfg/[0x23]snk_dut_hdmi_gaming.json
+++ b/UniTAP/dev/modules/dut_tests/cfg/[0x23]snk_dut_hdmi_gaming.json
@@ -1,66 +1,8 @@
{
"descriptions": [
- {
- "configId": "0x2100",
- "defaultValue": "0",
- "description": "Does the Sink support Fast Vactive (FVA), also known as Quick Frame Transport (QFT)?",
- "flag": 3,
- "id": "TSI_HDMI_GAMING_FVA",
- "maxValue": 1,
- "minValue": 0,
- "name": "Sink_Supports_FVA",
- "type": 3,
- "enumerationVariants": "0 # NO\n1 # YES"
- },
- {
- "configId": "0x2101",
- "defaultValue": "1",
- "description": "Does the Sink support Variable Refresh Rate (VRR)",
- "flag": 3,
- "id": "TSI_HDMI_GAMING_VRR",
- "maxValue": 1,
- "minValue": 0,
- "name": "Sink_Supports_VRR",
- "type": 3,
- "enumerationVariants": "0 # NO\n1 # YES"
- },
- {
- "configId": "0x2102",
- "defaultValue": "0",
- "description": "Does the Sink support Negative Mvrr values?",
- "flag": 3,
- "id": "TSI_HDMI_GAMING_NMVRR",
- "maxValue": 1,
- "minValue": 0,
- "name": "Sink_Supports_Negative_MVRR",
- "type": 3,
- "enumerationVariants": "0 # NO\n1 # YES"
- },
- {
- "configId": "0x2103",
- "defaultValue": "40",
- "description": "What is the Sink’s supported VRR Range? Minimum value.\n",
- "flag": 3,
- "id": "TSI_HDMI_GAMING_RANGE_MIN",
- "maxValue": 480,
- "minValue": 20,
- "name": "Sink_Supported_VRR_Range VRRMIN",
- "type": 4
- },
- {
- "configId": "0x2104",
- "defaultValue": "0",
- "description": "What is the Sink’s supported VRR Range? Maximum value or BRR\n",
- "flag": 3,
- "id": "TSI_HDMI_GAMING_RANGE_MAX",
- "maxValue": 480,
- "minValue": 20,
- "name": "Sink_Supported_VRR_Range VRRMAX or 0 for BRR",
- "type": 4
- },
{
"configId": "0x2105",
- "defaultValue": "0",
+ "defaultValue": "1",
"description": "Does the Sink implement Auto Low-Latency Mode (ALLM)?",
"flag": 3,
"id": "TSI_HDMI_GAMING_ALLM",
@@ -72,32 +14,28 @@
},
{
"configId": "0x2106",
- "defaultValue": "0",
+ "defaultValue": "Cinema",
"description": "Which display processing mode is the preferred mode with normal latency?",
"flag": 3,
"id": "TSI_HDMI_GAMING_NLM",
- "maxValue": 2,
- "minValue": 0,
"name": "Sink_Preferred_NLM",
- "type": 4,
- "enumerationVariants": "0 # Cinema\n1 # Vivid\n2 # Normal"
+ "type": 2,
+ "maxLength": 256
},
{
"configId": "0x2107",
- "defaultValue": "0",
+ "defaultValue": "Gaming",
"description": "Which display processing mode is the preferred mode to minimize latency?",
"flag": 3,
"id": "TSI_HDMI_GAMING_LLM",
- "maxValue": 1,
- "minValue": 0,
"name": "Sink_Preferred_LLM",
- "type": 4,
- "enumerationVariants": "0 # Game\n1 # PC"
+ "type": 2,
+ "maxLength": 256
},
- {
+ {
"configId": "0x2108",
"defaultValue": "1",
- "description": "Does the Sink DUT support QMS-VRR?",
+ "description": "Does the Sink supports QMS-VRR?",
"flag": 3,
"id": "TSI_HDMI_GAMING_QMS",
"maxValue": 1,
@@ -106,29 +44,59 @@
"type": 3,
"enumerationVariants": "0 # NO\n1 # YES"
},
- {
- "configId": "0x2109",
- "defaultValue": "97",
- "description": "What is the highest resolution (i.e., width x height) and base refresh rate (BRR) for which all TFRs up to Sink_QMS_Max_TFR_TMDS are supported by the Sink using TMDS?",
+ {
+ "configId": "0x2101",
+ "defaultValue": "1",
+ "description": "Does the Sink supports VRR?",
"flag": 3,
- "id": "TSI_HDMI_GAMING_VIDEO_TMDS",
- "maxValue": 255,
- "minValue": 16,
- "name": "Sink_QMS_Video_Format_TMDS",
- "type": 4,
- "enumerationVariants": "78 # VIC=78; 1920x1080@120\n97 # VIC=97; 3840x2160@60"
+ "id": "TSI_HDMI_GAMING_VRR",
+ "maxValue": 1,
+ "minValue": 0,
+ "name": "Sink_Supports_VRR",
+ "type": 3,
+ "enumerationVariants": "0 # NO\n1 # YES"
+ },
+ {
+ "configId": "0x2103",
+ "defaultValue": "0",
+ "description": "What is the Sink's supported VRR Range?",
+ "bitList": [
+ {
+ "mask": "0xFFFF",
+ "description": "VRR min"
+ },
+ {
+ "mask": "0xFFFF0000",
+ "description": "VRR max (0 for BRR)"
+ }
+ ],
+ "flag": 12,
+ "id": "TSI_HDMI_GAMING_VRR_RANGE",
+ "name": "Sink_Supported_VRR_Range",
+ "type": 12
},
{
"configId": "0x210A",
- "defaultValue": "118",
- "description": "What is the highest resolution (i.e., width x height) and base refresh rate (BRR) for which all TFRs up to Sink_QMS_Max_TFR_FRL are supported by the Sink using FRL?",
- "flag": 3,
+ "defaultValue": "0x0003c0043800780",
+ "description": "What is the highest resolution (i.e., width x height) and base refresh rate (BRR) for which all TFRs up to Sink_QMS_Max_TFR_FRL are supported by the Sink using TMDS?",
+ "bitList": [
+ {
+ "mask": "0xFFFFF",
+ "description": "Width"
+ },
+ {
+ "mask": "0xFFFFF00000",
+ "description": "Height"
+ },
+ {
+ "mask": "0xFFFFF0000000000",
+ "description": "BRR"
+ }
+ ],
+ "flag": 12,
"id": "TSI_HDMI_GAMING_VIDEO_FRL",
- "maxValue": 255,
- "minValue": 16,
"name": "Sink_QMS_Video_Format_FRL",
- "type": 4,
- "enumerationVariants": "0 # N/A\n78 # VIC=78; 1920x1080@120\n97 # VIC=97; 3840x2160@60\n118 # VIC=118; 3840x2160@120"
+ "type": 13
},
{
"configId": "0x210B",
@@ -140,11 +108,11 @@
"minValue": 0,
"name": "Sink_QMS_Min_TFR",
"type": 4,
- "enumerationVariants": "0 # N/A\n1 # TFR=1; 24/1.001\n2 # TFR=2; 24\n3 # TFR=3; 25\n4 # TFR=4; 30/1.001\n5 # TFR=5; 30\n6 # TFR=6; 48/1.001\n7 # TFR=7; 48\n8 # TFR=8; 50\n9 # TFR=9; 60/1.001\n10 # TFR=10; 60\n11 # TFR=11; 100\n12 # TFR=12; 120/1.001\n13 # TFR=13; 120"
+ "enumerationVariants": "0 # N/A\n1 # 1 - 24/1.001\n2 # 2 - 24\n3 # 3 - 25\n4 # 4 - 30/1.001\n5 # 5 - 30\n6 # 6 - 48/1.001\n7 # 7 - 48\n8 # 8 - 50\n9 # 9 - 60/1.001\n10 # 10 - 60\n11 # 11 - 100\n12 # 12 - 120/1.001\n13 # 13 - 120"
},
{
"configId": "0x210C",
- "defaultValue": "10",
+ "defaultValue": "6",
"description": "If the Sink DUT supports QMS-VRR, what is the maximum Next_TFR value supported using TMDS? (Refer to the Next_TFR field definition in HDMI 2.1a Table 10-37.)",
"flag": 3,
"id": "TSI_HDMI_GAMING_MAX_TFR_TMDS",
@@ -152,11 +120,11 @@
"minValue": 0,
"name": "Sink_QMS_Max_TFR_TMDS",
"type": 4,
- "enumerationVariants": "0 # N/A\n1 # TFR=1; 24/1.001\n2 # TFR=2; 24\n3 # TFR=3; 25\n4 # TFR=4; 30/1.001\n5 # TFR=5; 30\n6 # TFR=6; 48/1.001\n7 # TFR=7; 48\n8 # TFR=8; 50\n9 # TFR=9; 60/1.001\n10 # TFR=10; 60\n11 # TFR=11; 100\n12 # TFR=12; 120/1.001\n13 # TFR=13; 120"
+ "enumerationVariants": "0 # N/A\n1 # 1 - 24/1.001\n2 # 2 - 24\n3 # 3 - 25\n4 # 4 - 30/1.001\n5 # 5 - 30\n6 # 6 - 48/1.001\n7 # 7 - 48\n8 # 8 - 50\n9 # 9 - 60/1.001\n10 # 10 - 60\n11 # 11 - 100\n12 # 12 - 120/1.001\n13 # 13 - 120"
},
{
"configId": "0x210D",
- "defaultValue": "13",
+ "defaultValue": "8",
"description": "If the Sink DUT supports QMS-VRR, what is the maximum Next_TFR value supported using FRL? (Refer to the Next_TFR field definition in HDMI 2.1a Table 10-37.)",
"flag": 3,
"id": "TSI_HDMI_GAMING_MAX_TFR_FRL",
@@ -164,9 +132,44 @@
"minValue": 0,
"name": "Sink_QMS_Max_TFR_FRL",
"type": 4,
- "enumerationVariants": "0 # N/A\n1 # TFR=1; 24/1.001\n2 # TFR=2; 24\n3 # TFR=3; 25\n4 # TFR=4; 30/1.001\n5 # TFR=5; 30\n6 # TFR=6; 48/1.001\n7 # TFR=7; 48\n8 # TFR=8; 50\n9 # TFR=9; 60/1.001\n10 # TFR=10; 60\n11 # TFR=11; 100\n12 # TFR=12; 120/1.001\n13 # TFR=13; 120"
+ "enumerationVariants": "0 # N/A\n1 # 1 - 24/1.001\n2 # 2 - 24\n3 # 3 - 25\n4 # 4 - 30/1.001\n5 # 5 - 30\n6 # 6 - 48/1.001\n7 # 7 - 48\n8 # 8 - 50\n9 # 9 - 60/1.001\n10 # 10 - 60\n11 # 11 - 100\n12 # 12 - 120/1.001\n13 # 13 - 120"
+ },
+ {
+ "configId": "0x210E",
+ "defaultValue": "1",
+ "description": "What is the maximum FRL Rate that the product supports? (Set to 0 if the product does not support FRL reception.)",
+ "flag": 3,
+ "id": "TSI_HDMI_GAMING_MAX_FRL",
+ "maxValue": 6,
+ "minValue": 0,
+ "name": "Sink_Max_FRL_Rate",
+ "type": 4,
+ "enumerationVariants": "0 # N/A\n1 # 1\n2 # 2\n3 # 3\n4 # 4\n5 # 5\n6 # 6"
+ },
+ {
+ "configId": "0x210F",
+ "defaultValue": "0x0003c0043800780",
+ "description": "What is the highest resolution (i.e., width x height) and base refresh rate (BRR) for which all TFRs up to Sink_QMS_Max_TFR_TMDS are supported by the Sink using TMDS?",
+ "bitList": [
+ {
+ "mask": "0xFFFFF",
+ "description": "Width"
+ },
+ {
+ "mask": "0xFFFFF00000",
+ "description": "Height"
+ },
+ {
+ "mask": "0xFFFFF0000000000",
+ "description": "BRR"
+ }
+ ],
+ "flag": 12,
+ "id": "TSI_HDMI_GAMING_VIDEO_TMDS",
+ "name": "Sink_QMS_Video_Format_TMDS",
+ "type": 13
}
],
"id": "0x23",
- "name": "HDMI CTS MOI (VRR-QMS)"
+ "name": "HDMI CTS MOI Gaming Features"
}
diff --git a/UniTAP/dev/modules/dut_tests/cfg/[0x2D]src_dut_timings.json b/UniTAP/dev/modules/dut_tests/cfg/[0x2D]src_dut_timings.json
new file mode 100644
index 0000000..61a5817
--- /dev/null
+++ b/UniTAP/dev/modules/dut_tests/cfg/[0x2D]src_dut_timings.json
@@ -0,0 +1,197 @@
+{
+ "descriptions": [
+ {
+ "configId": "0x01260000",
+ "defaultValue": "10000",
+ "description": "Defines timeout for all Timings video tests, in milliseconds. Default setting is 10000ms.\n",
+ "flag": 3,
+ "id": "TSI_TIMINGS_TIMEOUT",
+ "maxValue": 2147483647,
+ "minValue": 0,
+ "name": "Test timeout, in milliseconds",
+ "type": 4
+ },
+ {
+ "configId": "0x01260001",
+ "defaultValue": "200",
+ "description": "Total number of frames to be tested. After timings check for total number of frames test will be completed. If total number is equal to 0, then test will be executing up to test timeout. Default setting is 200.\n",
+ "flag": 3,
+ "id": "TSI_TIMINGS_FRAMES_TO_TEST",
+ "maxValue": 2147483647,
+ "minValue": 0,
+ "name": "Test duration, in frames",
+ "type": 4
+ },
+ {
+ "configId": "0x01260002",
+ "defaultValue": "2",
+ "description": "Number of bad frames allowed in test. Default setting is 2\n",
+ "flag": 3,
+ "id": "TSI_TIMINGS_LIM_FRAME_MISMATCHES",
+ "maxValue": 2147483647,
+ "minValue": 0,
+ "name": "Allowed mismatches, in frames",
+ "type": 4
+ },
+ {
+ "configId": "0x01260003",
+ "defaultValue": "24",
+ "description": "Defines the color depth as bits per pixel. If the input video color depth does not match this setting, the test will fail. Default setting is 24.\n",
+ "enumerationVariants": "12\n15\n16\n18\n20\n21\n24\n30\n32\n36\n48",
+ "flag": 3,
+ "id": "TSI_TIMINGS_REF_COLORDEPTH",
+ "maxValue": 2147480000,
+ "minValue": 0,
+ "name": "Expected color depth, as bits per pixel",
+ "type": 4
+ },
+ {
+ "configId": "0x01260004",
+ "defaultValue": "0",
+ "description": "Defines the required frame rate for timings test, in millihertz. Setting of zero (0) disables the frame-rate requirement. Default setting is 0.\n",
+ "flag": 3,
+ "id": "TSI_TIMINGS_REQUIRED_FRAME_RATE",
+ "maxValue": 2147483647,
+ "minValue": 0,
+ "name": "Expected frame rate, in millihertz (mHz)",
+ "type": 4
+ },
+ {
+ "configId": "0x01260005",
+ "defaultValue": "0",
+ "description": "Defines the maximum allowed deviation of input frame-rate from the required frame rate (TSI_TIMINGS_REQUIRED_FRAME_RATE), in millihertz. When this setting is non-zero, it defines the range of allowed frame rate as requirements ± tolerance. If the frame-rate requirement is set to zero, this setting has no effect. Default setting is 0 mHz.\n",
+ "flag": 3,
+ "id": "TSI_TIMINGS_FRAME_RATE_TOLERANCE",
+ "maxValue": 2147483647,
+ "minValue": 0,
+ "name": "Frame rate tolerance, in millihertz (mHz)",
+ "type": 4
+ },
+ {
+ "configId": "0x01260006",
+ "defaultValue": "2200",
+ "description": "Defined the expected video width, in pixels. If the video being received does not match this setting, the test will fail. Default setting is 1920.\n",
+ "flag": 3,
+ "id": "TSI_TIMINGS_REF_HTOTAL",
+ "maxValue": 2147483647,
+ "minValue": 0,
+ "name": "Expected video width, in pixels",
+ "type": 4
+ },
+ {
+ "configId": "0x01260007",
+ "defaultValue": "1125",
+ "description": "Defined the expected total video height, in pixels. If the video being received does not match this setting, the test will fail. Default setting is 1080.\n",
+ "flag": 3,
+ "id": "TSI_TIMINGS_REF_VTOTAL",
+ "maxValue": 2147483647,
+ "minValue": 0,
+ "name": "Expected total video height, in pixels",
+ "type": 4
+ },
+ {
+ "configId": "0x01260008",
+ "defaultValue": "1920",
+ "description": "Defined the expected active video width, in pixels. If the video being received does not match this setting, the test will fail. Default setting is 1920.\n",
+ "flag": 3,
+ "id": "TSI_TIMINGS_REF_HACTIVE",
+ "maxValue": 2147483647,
+ "minValue": 0,
+ "name": "Expected active video width, in pixels",
+ "type": 4
+ },
+ {
+ "configId": "0x01260009",
+ "defaultValue": "1080",
+ "description": "Defined the expected active video height, in pixels. If the video being received does not match this setting, the test will fail. Default setting is 1080.\n",
+ "flag": 3,
+ "id": "TSI_TIMINGS_REF_VACTIVE",
+ "maxValue": 2147483647,
+ "minValue": 0,
+ "name": "Expected active video height, in pixels",
+ "type": 4
+ },
+ {
+ "configId": "0x0126000a",
+ "defaultValue": "88",
+ "description": "Defined the expected horizontal front porch, in pixels. If the video being received does not match this setting, the test will fail. Default setting is 1920.\n",
+ "flag": 3,
+ "id": "TSI_TIMINGS_REF_HFRONT",
+ "maxValue": 2147483647,
+ "minValue": 0,
+ "name": "Expected horizontal front porch, in pixels",
+ "type": 4
+ },
+ {
+ "configId": "0x0126000b",
+ "defaultValue": "4",
+ "description": "Defined the expected vertical front porch, in pixels. If the video being received does not match this setting, the test will fail. Default setting is 1080.\n",
+ "flag": 3,
+ "id": "TSI_TIMINGS_REF_VFRONT",
+ "maxValue": 2147483647,
+ "minValue": 0,
+ "name": "Expected vertical front porch, in pixels",
+ "type": 4
+ },
+ {
+ "configId": "0x0126000c",
+ "defaultValue": "44",
+ "description": "Defined the expected horizontal sync interval, in pixels. If the video being received does not match this setting, the test will fail. Default setting is 1920.\n",
+ "flag": 3,
+ "id": "TSI_TIMINGS_REF_HSYNC",
+ "maxValue": 2147483647,
+ "minValue": 0,
+ "name": "Expected horizontal sync interval, in pixels",
+ "type": 4
+ },
+ {
+ "configId": "0x0126000d",
+ "defaultValue": "5",
+ "description": "Defined the expected vertical sync interval, in pixels. If the video being received does not match this setting, the test will fail. Default setting is 1080.\n",
+ "flag": 3,
+ "id": "TSI_TIMINGS_REF_VSYNC",
+ "maxValue": 2147483647,
+ "minValue": 0,
+ "name": "Expected vertical sync interval, in pixels",
+ "type": 4
+ },
+ {
+ "configId": "0x0126000e",
+ "defaultValue": "0",
+ "description": "Data transfer timeout in milliseconds. Default setting is 0.\n",
+ "flag": 3,
+ "id": "TSI_TIMINGS_DATA_TRANSFER_TIMEOUT",
+ "maxValue": 2147483647,
+ "minValue": 0,
+ "name": "Data transfer timeout.",
+ "type": 4
+ },
+ {
+ "configId": "0x01260021",
+ "defaultValue": "",
+ "description": "Contains the full path to the folder where failed frames are to be saved without trailing backslash (‘\\’). No default. Failed frame file-name will be “Failed_<#>.ppm”, where <#> is replaced with an auto-incremented number.",
+ "flag": 3,
+ "id": "TSI_FAILED_FRAME_TARGET_FOLDER",
+ "maxLength": 10000,
+ "name": "Location where the failed frames are to be saved",
+ "type": 11
+ },
+ {
+ "configId": "0x01260022",
+ "defaultValue": "0",
+ "description": "Defines the number of failed frames to be exported from the video test. Default setting is 0. If the setting is 0, no frames are exported.",
+ "flag": 3,
+ "id": "TSI_MAX_EXPORT_FAILED",
+ "maxValue": 2147483647,
+ "minValue": 0,
+ "name": "Maximum number of exported frames",
+ "type": 4
+ }
+ ],
+ "id": "0x2d",
+ "name": "Timings Video Tests",
+ "shortName": "Timings Video Tests",
+ "old_names": [
+ "Timings Video Test Set"
+ ]
+}
diff --git a/UniTAP/dev/modules/dut_tests/cfg/[0x2E]branch_dut_dp_128b_132b_mst_ll_cts.json b/UniTAP/dev/modules/dut_tests/cfg/[0x2E]branch_dut_dp_128b_132b_mst_ll_cts.json
new file mode 100644
index 0000000..4fefe32
--- /dev/null
+++ b/UniTAP/dev/modules/dut_tests/cfg/[0x2E]branch_dut_dp_128b_132b_mst_ll_cts.json
@@ -0,0 +1,67 @@
+{
+ "descriptions": [
+ {
+ "configId": "0x1270000",
+ "defaultValue": "5000",
+ "description": "Defines test timeout in milliseconds, default value is 5000ms.",
+ "flag": 3,
+ "id": "TSI_DP20_MST_BRANCH_TIMEOUT",
+ "maxValue": 2147483647,
+ "minValue": 0,
+ "name": "Test timeout in milliseconds.",
+ "reportFormat": "Test timeout = %2ms ",
+ "type": 4
+ },
+ {
+ "configId": "0x1270001",
+ "defaultValue": "0x00000000",
+ "description": "Defines the DUT capabilities as flags.",
+ "bitList":
+ [
+ {"mask": "0x00000001", "description": "DUT supports CSN DFP broadcast", "reportFormat": "- DUT is Type-C device "}
+ ],
+ "flag": 3,
+ "id": "TSI_DP20_MST_BRANCH_DUT_CAPS",
+ "name": "DUT Capability flags.",
+ "reportFormat": "Test DUT capabilities flags: ",
+ "type": 12
+ },
+ {
+ "configId": "0x1270002",
+ "defaultValue": "0x00000010",
+ "description": "Defines the numbers of DUT UFP and DFP ports connected to TE.",
+ "bitList":
+ [
+ {"mask": "0x0000000f", "description": "DUT UFP port connected to TE"},
+ {"mask": "0x000000f0", "description": "DUT DFP port connected to TE"}
+ ],
+ "flag": 3,
+ "id": "TSI_DP20_MST_BRANCH_DUT_UFP_DFP_PORTS",
+ "name": "DUT UFP and DFP ports connected to TE",
+ "reportFormat": "DUT UFP and DFP ports connected to TE: ",
+ "type": 12
+ },
+ {
+ "configId": "0x1270003",
+ "defaultValue": "0x00005432",
+ "description": "Defines the numbers of DUT DFP ports connected to external sinks.",
+ "bitList":
+ [
+ {"mask": "0x0000000f", "description": "DUT DFP port connected to Sink 1"},
+ {"mask": "0x000000f0", "description": "DUT DFP port connected to Sink 2"},
+ {"mask": "0x00000f00", "description": "DUT DFP port connected to Sink 3"},
+ {"mask": "0x0000f000", "description": "DUT DFP port connected to Sink 4"}
+ ],
+ "flag": 3,
+ "id": "TSI_DP20_MST_BRANCH_DUT_SINK_PORTS",
+ "name": "DUT DFP ports connected to external sinks",
+ "reportFormat": "DUT DFP ports connected to external sinks: ",
+ "type": 12
+ }
+ ],
+ "id": "0x2E",
+ "name": "DP 2.1 MST Branch CTS",
+ "old_names": [
+ "DP 2.1 MST Branch CTS"
+ ]
+}
\ No newline at end of file
diff --git a/UniTAP/dev/modules/dut_tests/dut_default_params/__init__.py b/UniTAP/dev/modules/dut_tests/dut_default_params/__init__.py
index 6e3507e..6fff847 100644
--- a/UniTAP/dev/modules/dut_tests/dut_default_params/__init__.py
+++ b/UniTAP/dev/modules/dut_tests/dut_default_params/__init__.py
@@ -26,6 +26,13 @@ from .hdmi_sink_tests import HdmiSinkDUTTestParam, HdmiTestMode, HdmiFrlRate
from .hdmi_source_tests import HdmiSourceDUTTestParam
from .hdmi_sink_continuity_tests import HdmiSinkContinuityDUTTestParam
from .hdmi_sink_cable_check_tests import HdmiSinkCableCheckTestParam
+from .hdmi_hdcp_1a_tests import HdmiHdcp1ATestParam
+from .hdmi_hdcp_1b_tests import HdmiHdcp1BTestParam
+from .hdmi_hdcp_2c_tests import HdmiHdcp2CTestParam
+from .hdmi_hdcp_3a_tests import HdmiHdcp3ATestParam
+from .hdmi_hdcp_3b_tests import HdmiHdcp3BTestParam
+from .hdmi_hdcp_3c_tests import HdmiHdcp3CTestParam
+from .dp_2_1_branch_mst import Dp21BranchMSTSourceDUTTestParam
from ..test_group_params_types import Param, get_param_list
DUTTestParameters = TypeVar("DUTTestParameters",
@@ -53,4 +60,12 @@ DUTTestParameters = TypeVar("DUTTestParameters",
Hdr10TestParam,
HdmiSinkDUTTestParam,
HdmiSinkContinuityDUTTestParam,
- HdmiSinkCableCheckTestParam)
+ HdmiSinkCableCheckTestParam,
+ HdmiHdcp1ATestParam,
+ HdmiHdcp1BTestParam,
+ HdmiHdcp2CTestParam,
+ HdmiHdcp3ATestParam,
+ HdmiHdcp3BTestParam,
+ HdmiHdcp3CTestParam,
+ Dp21BranchMSTSourceDUTTestParam
+ )
diff --git a/UniTAP/dev/modules/dut_tests/dut_default_params/dp2_1_source_tests.py b/UniTAP/dev/modules/dut_tests/dut_default_params/dp2_1_source_tests.py
index e4e0e06..71843b0 100644
--- a/UniTAP/dev/modules/dut_tests/dut_default_params/dp2_1_source_tests.py
+++ b/UniTAP/dev/modules/dut_tests/dut_default_params/dp2_1_source_tests.py
@@ -4,6 +4,7 @@ from UniTAP.dev.modules.dut_tests.dut_default_params.dp_source_adaptive_sync_tab
from UniTAP.dev.modules.dut_tests.dut_default_params.dp_2_1_video_modes import Dp21AvailableVideoModes
from UniTAP.dev.modules.dut_tests.dut_default_params.dp_2_1_dsc_video_modes import Dp21AvailableDscVideoModes
from UniTAP.dev.modules.dut_tests.dut_default_params.dp_source_audio_tab import AudioSourceDp21SettingTab
+from UniTAP.dev.modules.dut_tests.dut_default_params.dp_2_1_mst import Dp21MstSettingsTab
class Dp21SourceDUTTestParam:
@@ -13,6 +14,7 @@ class Dp21SourceDUTTestParam:
- Set and get `DisplayIdDp21ConfigTab`. Allows working with parameters from Display ID part `display_id`.
- Set and get `AdaptiveSyncDp21ConfigTab`. Allows working with parameters from Adaptive-Sync part `adaptive_sync`.
- Set and get `Dp21AvailableVideoModes`. Allows working with parameters from Video modes part `video_modes`.
+ - Set and get `Dp21MstSettingsTab`. Allows working with parameters from MST part `mst`.
"""
def __init__(self, json_obj):
self.__general_tab = GeneralSourceDUTDp21SettingTab(json_obj)
@@ -21,6 +23,7 @@ class Dp21SourceDUTTestParam:
self.__adaptive_sync_tab = AdaptiveSyncDp21ConfigTab(json_obj)
self.__video_modes = Dp21AvailableVideoModes(json_obj)
self.__dsc_video_modes = Dp21AvailableDscVideoModes(json_obj)
+ self.__mst_tab = Dp21MstSettingsTab(json_obj)
@property
def general(self) -> GeneralSourceDUTDp21SettingTab:
@@ -81,3 +84,13 @@ class Dp21SourceDUTTestParam:
object of `Dp21AvailableVideoModes` type
"""
return self.__dsc_video_modes
+
+ @property
+ def mst(self) -> Dp21MstSettingsTab:
+ """
+ Get object of parameters from Video modes source part.
+
+ Returns:
+ object of `Dp21MstSettingsTab` type
+ """
+ return self.__mst_tab
diff --git a/UniTAP/dev/modules/dut_tests/dut_default_params/dp_2_1_branch_mst.py b/UniTAP/dev/modules/dut_tests/dut_default_params/dp_2_1_branch_mst.py
new file mode 100644
index 0000000..6b5a458
--- /dev/null
+++ b/UniTAP/dev/modules/dut_tests/dut_default_params/dp_2_1_branch_mst.py
@@ -0,0 +1,210 @@
+from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
+
+
+class DutCapsMSTBranchFlags:
+ """
+ Class `DutCapsDp21Flags` defines the DUT capabilities as flags.
+
+ Setting:
+ - DUT CSN DFP broadcast supported flag `support_csn_dfp_broadcast`.
+ """
+ def __init__(self, json_obj):
+ self.__value = Param(json_obj)
+
+ @property
+ def support_csn_dfp_broadcast(self) -> bool:
+ """
+ Set and get DUT CSN DFP broadcast flag support.
+
+ Returns:
+ object of bool type
+ """
+ return self.__value._get_by_bitmask(0, bool)
+
+ @support_csn_dfp_broadcast.setter
+ def support_csn_dfp_broadcast(self, support_csn_dfp_broadcast: bool):
+ self.__value._set_by_bitmask(support_csn_dfp_broadcast, 0)
+
+
+class PortsConnectedToTE:
+ """
+ Class `PortsConnectedToTE` which defines the numbers of DUT UFP and DFP ports connected to TE.
+
+ Setting:
+ - Number of DUT UFP ports connected to TE `ufp_ports`.
+ - Number of DUT DFP ports connected to TE `dfp_ports`.
+ """
+ def __init__(self, json_obj):
+ self.__value = Param(json_obj)
+
+ @property
+ def ufp_ports(self) -> int:
+ """
+ Set and get number of DUT UFP ports connected to TE.
+
+ Returns:
+ object of int type
+ """
+ return self.__value._get_by_bitmask(0, int)
+
+ @ufp_ports.setter
+ def ufp_ports(self, ufp_ports: int):
+ self.__value._set_by_bitmask(ufp_ports, 0)
+
+ @property
+ def dfp_ports(self) -> int:
+ """
+ Set and get number of DUT DFP ports connected to TE.
+
+ Returns:
+ object of int type
+ """
+ return self.__value._get_by_bitmask(1, int)
+
+ @dfp_ports.setter
+ def dfp_ports(self, dfp_ports: int):
+ self.__value._set_by_bitmask(dfp_ports, 1)
+
+
+class PortsConnectedToExternalSink:
+ """
+ Class `PortsConnectedToExternalSink` which defines the numbers of DUT DFP ports connected to external sinks.
+
+ Setting:
+ - Number of DUT DFP ports connected to Sink 1 `sink_1`.
+ - Number of DUT DFP ports connected to Sink 2 `sink_2`.
+ - Number of DUT DFP ports connected to Sink 3 `sink_3`.
+ - Number of DUT DFP ports connected to Sink 4 `sink_4`.
+ """
+ def __init__(self, json_obj):
+ self.__value = Param(json_obj)
+
+ @property
+ def sink_1(self) -> int:
+ """
+ Set and get number of DUT DFP ports connected to Sink 1.
+
+ Returns:
+ object of int type
+ """
+ return self.__value._get_by_bitmask(0, int)
+
+ @sink_1.setter
+ def sink_1(self, ports_to_sink_1: int):
+ self.__value._set_by_bitmask(ports_to_sink_1, 0)
+
+ @property
+ def sink_2(self) -> int:
+ """
+ Set and get number of DUT DFP ports connected to Sink 2.
+
+ Returns:
+ object of int type
+ """
+ return self.__value._get_by_bitmask(0, int)
+
+ @sink_2.setter
+ def sink_2(self, ports_to_sink_2: int):
+ self.__value._set_by_bitmask(ports_to_sink_2, 0)
+
+ @property
+ def sink_3(self) -> int:
+ """
+ Set and get number of DUT DFP ports connected to Sink 3.
+
+ Returns:
+ object of int type
+ """
+ return self.__value._get_by_bitmask(0, int)
+
+ @sink_3.setter
+ def sink_3(self, ports_to_sink_3: int):
+ self.__value._set_by_bitmask(ports_to_sink_3, 0)
+
+ @property
+ def sink_4(self) -> int:
+ """
+ Set and get number of DUT DFP ports connected to Sink 4.
+
+ Returns:
+ object of int type
+ """
+ return self.__value._get_by_bitmask(0, int)
+
+ @sink_4.setter
+ def sink_4(self, ports_to_sink_1: int):
+ self.__value._set_by_bitmask(ports_to_sink_1, 0)
+
+
+class Dp21BranchMSTSourceDUTTestParam:
+ """
+ Class `Dp21BranchMSTSourceDUTTestParam` describes requirement parameters for DP 2.1 branch MST tests:
+ - Set and get `timeout`. Describes test timeout, in milliseconds.
+ - DUT MST Branch capabilities flags `dut_caps_flags` type `DutCapsMSTBranchFlags`.
+ - DUT UFP and DFP ports connected to TE `ports_connect_to_te` type `PortsConnectedToTE`.
+ - DUT DFP ports connected to external sinks `ports_connect_to_external_sink` type `PortsConnectedToExternalSink`
+ """
+ def __init__(self, json_obj):
+ self.__timeout = Param(json_obj["TSI_DP20_MST_BRANCH_TIMEOUT"])
+ self.__dut_caps_flags = DutCapsMSTBranchFlags(json_obj["TSI_DP20_MST_BRANCH_DUT_CAPS"])
+ self.__ports_connect_to_te = PortsConnectedToTE(json_obj["TSI_DP20_MST_BRANCH_DUT_UFP_DFP_PORTS"])
+ self.__ports_connect_to_external_sink = PortsConnectedToExternalSink(json_obj["TSI_DP20_MST_BRANCH_DUT_SINK_PORTS"])
+
+ @property
+ def timeout(self) -> int:
+ """
+ Set and get test timeout, in milliseconds.
+
+ Returns:
+ object of int type
+ """
+ return self.__timeout.default_value
+
+ @timeout.setter
+ def timeout(self, timeout: int):
+ if not(self.__timeout.min_value < timeout < self.__timeout.max_value):
+ raise ValueError(f"Timeout cannot be less than {self.__timeout.min_value} and more than "
+ f"{self.__timeout.max_value}.")
+ self.__timeout.default_value = timeout
+
+ @property
+ def dut_caps_flags(self) -> DutCapsMSTBranchFlags:
+ """
+ Set and get DUT capabilities flags.
+
+ Returns:
+ object of `DutCapsMSTBranchFlags` type
+ """
+ return self.__dut_caps_flags
+
+ @dut_caps_flags.setter
+ def dut_caps_flags(self, dut_caps_flags: DutCapsMSTBranchFlags):
+ self.__dut_caps_flags = dut_caps_flags
+
+ @property
+ def ports_connect_to_te(self) -> PortsConnectedToTE:
+ """
+ Set and get numbers DUT UFP and DFP ports connected to TE.
+
+ Returns:
+ object of `PortsConnectedToTE` type
+ """
+ return self.__ports_connect_to_te
+
+ @ports_connect_to_te.setter
+ def ports_connect_to_te(self, ports_connect_to_te: PortsConnectedToTE):
+ self.__ports_connect_to_te = ports_connect_to_te
+
+ @property
+ def ports_connect_to_external_sink(self) -> PortsConnectedToExternalSink:
+ """
+ Set and get numbers DUT UFP and DFP ports connected to External Sinks.
+
+ Returns:
+ object of `PortsConnectedToExternalSink` type
+ """
+ return self.__ports_connect_to_external_sink
+
+ @ports_connect_to_external_sink.setter
+ def ports_connect_to_external_sink(self, ports_connect_to_external_sink: PortsConnectedToExternalSink):
+ self.__ports_connect_to_external_sink = ports_connect_to_external_sink
diff --git a/UniTAP/dev/modules/dut_tests/dut_default_params/dp_2_1_common_video_modes.py b/UniTAP/dev/modules/dut_tests/dut_default_params/dp_2_1_common_video_modes.py
index d6e75fa..4fdb38c 100644
--- a/UniTAP/dev/modules/dut_tests/dut_default_params/dp_2_1_common_video_modes.py
+++ b/UniTAP/dev/modules/dut_tests/dut_default_params/dp_2_1_common_video_modes.py
@@ -276,13 +276,11 @@ class VideoModeInfo:
def __init__(self, json_obj):
self.__value = Param(json_obj)
- self.__standard = VideoModeStandard(self.__value)
- self.__colorimetry = ColorimetryModes(self.__value)
@property
def standard(self) -> VideoModeStandard:
- return self.__standard
+ return VideoModeStandard(self.__value)
@property
def colorimetry(self) -> ColorimetryModes:
- return self.__colorimetry
+ return ColorimetryModes(self.__value)
diff --git a/UniTAP/dev/modules/dut_tests/dut_default_params/dp_2_1_dsc_video_modes.py b/UniTAP/dev/modules/dut_tests/dut_default_params/dp_2_1_dsc_video_modes.py
index 85c4452..77a40e2 100644
--- a/UniTAP/dev/modules/dut_tests/dut_default_params/dp_2_1_dsc_video_modes.py
+++ b/UniTAP/dev/modules/dut_tests/dut_default_params/dp_2_1_dsc_video_modes.py
@@ -7,8 +7,6 @@ class Dp21AvailableDscVideoModes:
- Set and get...
"""
def __init__(self, json_obj):
- self.__is_config_changed = False
-
self.__1920x1080_30hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_DSC_VMT_1920_1080_30"])
self.__1920x1080_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_DSC_VMT_1920_1080_60"])
self.__1920x1080_120hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_DSC_VMT_1920_1080_120"])
@@ -30,12 +28,6 @@ class Dp21AvailableDscVideoModes:
self.__10240x4320_30hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_DSC_VMT_10240_4320_30"])
self.__10240x4320_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_DSC_VMT_10240_4320_60"])
- def __getattribute__(self, name):
- attr = super().__getattribute__(name)
- if "vm_" in name or "_all" in name:
- self.__is_config_changed = True
- return attr
-
@property
def vm_1920x1080_30hz(self) -> VideoModeInfo:
return self.__1920x1080_30hz
diff --git a/UniTAP/dev/modules/dut_tests/dut_default_params/dp_2_1_mst.py b/UniTAP/dev/modules/dut_tests/dut_default_params/dp_2_1_mst.py
new file mode 100644
index 0000000..45f1fb7
--- /dev/null
+++ b/UniTAP/dev/modules/dut_tests/dut_default_params/dp_2_1_mst.py
@@ -0,0 +1,46 @@
+from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
+
+
+class Dp21MstSettingsTab:
+ """
+ Class `Dp21MstSettingsTab` allows working with MST source DUT capabilities.
+ - Set and get Maximum stream count
+ - Set and get Maximum daisy chain sink count
+ """
+ def __init__(self, json_obj):
+ self.__max_stream_count = Param(json_obj["TSI_DP20_SRCCTS_DUT_MST_CAPS"])
+ self.__max_daisy_chain_sink_count = Param(json_obj["TSI_DP20_SRCCTS_DUT_MST_CAPS"])
+
+ @property
+ def max_stream_count(self) -> int:
+ """
+ Set and get max stream count (1-4).
+
+ Returns:
+ object of int type
+ """
+ return self.__max_stream_count.default_value & 0xFF
+
+ @max_stream_count.setter
+ def max_stream_count(self, max_stream_count: int):
+ if not (self.__max_stream_count.min_value <= max_stream_count <= self.__max_stream_count.max_value):
+ raise ValueError(f"Timeout cannot be less than {self.__max_stream_count.min_value} and more than "
+ f"{self.__max_stream_count.max_value}.")
+ self.__max_stream_count.direct_set_bits_value(0xFF, max_stream_count, 0)
+
+ @property
+ def max_daisy_chain_sink_count(self) -> int:
+ """
+ Set and get max daisy chain sink count (1-4).
+
+ Returns:
+ object of int type
+ """
+ return (self.__max_daisy_chain_sink_count.default_value >> 8) & 0xFF
+
+ @max_daisy_chain_sink_count.setter
+ def max_daisy_chain_sink_count(self, max_daisy_chain_sink_count: int):
+ if not (self.__max_stream_count.min_value <= max_daisy_chain_sink_count <= self.__max_stream_count.max_value):
+ raise ValueError(f"Timeout cannot be less than {self.__max_daisy_chain_sink_count.min_value} and more than "
+ f"{self.__max_daisy_chain_sink_count.max_value}.")
+ self.__max_daisy_chain_sink_count.direct_set_bits_value(0xFF00, max_daisy_chain_sink_count, 8)
diff --git a/UniTAP/dev/modules/dut_tests/dut_default_params/dp_2_1_source_general_tab.py b/UniTAP/dev/modules/dut_tests/dut_default_params/dp_2_1_source_general_tab.py
index 9ef398f..56a9a24 100644
--- a/UniTAP/dev/modules/dut_tests/dut_default_params/dp_2_1_source_general_tab.py
+++ b/UniTAP/dev/modules/dut_tests/dut_default_params/dp_2_1_source_general_tab.py
@@ -114,7 +114,7 @@ class LinkRateDp21(Param):
self._set_by_bitmask(support_13_5Gbps, 2)
-class DutCapsDp21Flags(Param):
+class DutCapsDp21Flags:
"""
Class `DutCapsDp21Flags` inherited of class`DutCapsFlags` which defines the DUT capabilities as flags and allows
setting:
@@ -123,7 +123,7 @@ class DutCapsDp21Flags(Param):
Also has all the `DutCapsFlags` functionality.
"""
def __init__(self, json_obj):
- super().__init__(json_obj)
+ self.__value = Param(json_obj)
@property
def voltage_swing_supported(self) -> bool:
@@ -133,11 +133,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
- return self._get_by_bitmask(0, bool)
+ return self.__value._get_by_bitmask(0, bool)
@voltage_swing_supported.setter
def voltage_swing_supported(self, voltage_swing_supported: bool):
- self._set_by_bitmask(voltage_swing_supported, 0)
+ self.__value._set_by_bitmask(voltage_swing_supported, 0)
@property
def pre_emphasis_supported(self) -> bool:
@@ -147,11 +147,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
- return self._get_by_bitmask(1, bool)
+ return self.__value._get_by_bitmask(1, bool)
@pre_emphasis_supported.setter
def pre_emphasis_supported(self, pre_emphasis_supported: bool):
- self._set_by_bitmask(pre_emphasis_supported, 1)
+ self.__value._set_by_bitmask(pre_emphasis_supported, 1)
@property
def fixed_timing_dut_supported(self) -> bool:
@@ -161,11 +161,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
- return self._get_by_bitmask(2, bool)
+ return self.__value._get_by_bitmask(2, bool)
@fixed_timing_dut_supported.setter
def fixed_timing_dut_supported(self, fixed_timing_dut_supported: bool):
- self._set_by_bitmask(fixed_timing_dut_supported, 2)
+ self.__value._set_by_bitmask(fixed_timing_dut_supported, 2)
@property
def spread_spectrum_supported(self) -> bool:
@@ -175,11 +175,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
- return self._get_by_bitmask(3, bool)
+ return self.__value._get_by_bitmask(3, bool)
@spread_spectrum_supported.setter
def spread_spectrum_supported(self, spread_spectrum_supported: bool):
- self._set_by_bitmask(spread_spectrum_supported, 3)
+ self.__value._set_by_bitmask(spread_spectrum_supported, 3)
@property
def change_vf_without_lt_supported(self) -> bool:
@@ -189,11 +189,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
- return self._get_by_bitmask(4, bool)
+ return self.__value._get_by_bitmask(4, bool)
@change_vf_without_lt_supported.setter
def change_vf_without_lt_supported(self, change_vf_without_lt_supported: bool):
- self._set_by_bitmask(change_vf_without_lt_supported, 4)
+ self.__value._set_by_bitmask(change_vf_without_lt_supported, 4)
@property
def e_ddc_protocol_supported(self) -> bool:
@@ -203,11 +203,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
- return self._get_by_bitmask(5, bool)
+ return self.__value._get_by_bitmask(5, bool)
@e_ddc_protocol_supported.setter
def e_ddc_protocol_supported(self, e_ddc_protocol_supported: bool):
- self._set_by_bitmask(e_ddc_protocol_supported, 5)
+ self.__value._set_by_bitmask(e_ddc_protocol_supported, 5)
@property
def audio_transmission_supported(self) -> bool:
@@ -217,11 +217,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
- return self._get_by_bitmask(6, bool)
+ return self.__value._get_by_bitmask(6, bool)
@audio_transmission_supported.setter
def audio_transmission_supported(self, audio_transmission_supported: bool):
- self._set_by_bitmask(audio_transmission_supported, 6)
+ self.__value._set_by_bitmask(audio_transmission_supported, 6)
@property
def dut_is_type_c_device(self) -> bool:
@@ -231,11 +231,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
- return self._get_by_bitmask(7, bool)
+ return self.__value._get_by_bitmask(7, bool)
@dut_is_type_c_device.setter
def dut_is_type_c_device(self, dut_is_type_c_device: bool):
- self._set_by_bitmask(dut_is_type_c_device, 7)
+ self.__value._set_by_bitmask(dut_is_type_c_device, 7)
@property
def fec_supported(self) -> bool:
@@ -245,11 +245,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
- return self._get_by_bitmask(8, bool)
+ return self.__value._get_by_bitmask(8, bool)
@fec_supported.setter
def fec_supported(self, fec_supported: bool):
- self._set_by_bitmask(fec_supported, 8)
+ self.__value._set_by_bitmask(fec_supported, 8)
@property
def fec_disable_sequence_supported(self) -> bool:
@@ -259,11 +259,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
- return self._get_by_bitmask(9, bool)
+ return self.__value._get_by_bitmask(9, bool)
@fec_disable_sequence_supported.setter
def fec_disable_sequence_supported(self, fec_disable_sequence_supported: bool):
- self._set_by_bitmask(fec_disable_sequence_supported, 9)
+ self.__value._set_by_bitmask(fec_disable_sequence_supported, 9)
@property
def audio_without_video_supported(self) -> bool:
@@ -273,11 +273,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
- return self._get_by_bitmask(10, bool)
+ return self.__value._get_by_bitmask(10, bool)
@audio_without_video_supported.setter
def audio_without_video_supported(self, audio_without_video_supported: bool):
- self._set_by_bitmask(audio_without_video_supported, 10)
+ self.__value._set_by_bitmask(audio_without_video_supported, 10)
@property
def dsc_supported(self) -> bool:
@@ -287,11 +287,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
- return self._get_by_bitmask(11, bool)
+ return self.__value._get_by_bitmask(11, bool)
@dsc_supported.setter
def dsc_supported(self, dsc_supported: bool):
- self._set_by_bitmask(dsc_supported, 11)
+ self.__value._set_by_bitmask(dsc_supported, 11)
@property
def dsc_block_prediction_supported(self) -> bool:
@@ -301,11 +301,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
- return self._get_by_bitmask(12, bool)
+ return self.__value._get_by_bitmask(12, bool)
@dsc_block_prediction_supported.setter
def dsc_block_prediction_supported(self, dsc_block_prediction_supported: bool):
- self._set_by_bitmask(dsc_block_prediction_supported, 12)
+ self.__value._set_by_bitmask(dsc_block_prediction_supported, 12)
@property
def max_link_bandwidth_policy_supported(self):
@@ -315,11 +315,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
- return self._get_by_bitmask(13, bool)
+ return self.__value._get_by_bitmask(13, bool)
@max_link_bandwidth_policy_supported.setter
def max_link_bandwidth_policy_supported(self, max_link_bandwidth_policy_supported: bool):
- self._set_by_bitmask(max_link_bandwidth_policy_supported, 13)
+ self.__value._set_by_bitmask(max_link_bandwidth_policy_supported, 13)
@property
def use_3tap_conversion(self):
@@ -329,11 +329,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
- return self._get_by_bitmask(14, bool)
+ return self.__value._get_by_bitmask(14, bool)
@use_3tap_conversion.setter
def use_3tap_conversion(self, use_3tap_filter: bool):
- self._set_by_bitmask(use_3tap_filter, 14)
+ self.__value._set_by_bitmask(use_3tap_filter, 14)
@property
def usb4_tunnel_presented(self):
@@ -343,11 +343,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
- return self._get_by_bitmask(15, bool)
+ return self.__value._get_by_bitmask(15, bool)
@usb4_tunnel_presented.setter
def usb4_tunnel_presented(self, usb4_tunnel_presented: bool):
- self._set_by_bitmask(usb4_tunnel_presented, 15)
+ self.__value._set_by_bitmask(usb4_tunnel_presented, 15)
@property
def native_display_id_read(self) -> bool:
@@ -357,11 +357,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
- return self._get_by_bitmask(16, bool)
+ return self.__value._get_by_bitmask(16, bool)
@native_display_id_read.setter
def native_display_id_read(self, native_display_id_read: bool):
- self._set_by_bitmask(native_display_id_read, 16)
+ self.__value._set_by_bitmask(native_display_id_read, 16)
@property
def display_id_vii_supported(self) -> bool:
@@ -371,11 +371,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
- return self._get_by_bitmask(17, bool)
+ return self.__value._get_by_bitmask(17, bool)
@display_id_vii_supported.setter
def display_id_vii_supported(self, display_id_vii_supported: bool):
- self._set_by_bitmask(display_id_vii_supported, 17)
+ self.__value._set_by_bitmask(display_id_vii_supported, 17)
@property
def display_id_viii_supported(self) -> bool:
@@ -385,12 +385,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
- return self._get_by_bitmask(18, bool)
+ return self.__value._get_by_bitmask(18, bool)
@display_id_viii_supported.setter
def display_id_viii_supported(self, display_id_viii_supported: bool):
- self._set_by_bitmask(display_id_viii_supported, 18)
-
+ self.__value._set_by_bitmask(display_id_viii_supported, 18)
@property
def display_id_ix_supported(self) -> bool:
@@ -400,11 +399,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
- return self._get_by_bitmask(19, bool)
+ return self.__value._get_by_bitmask(19, bool)
@display_id_ix_supported.setter
def display_id_ix_supported(self, display_id_ix_supported: bool):
- self._set_by_bitmask(display_id_ix_supported, 19)
+ self.__value._set_by_bitmask(display_id_ix_supported, 19)
@property
def display_id_x_supported(self) -> bool:
@@ -414,11 +413,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
- return self._get_by_bitmask(20, bool)
+ return self.__value._get_by_bitmask(20, bool)
@display_id_x_supported.setter
def display_id_x_supported(self, display_id_x_supported: bool):
- self._set_by_bitmask(display_id_x_supported, 20)
+ self.__value._set_by_bitmask(display_id_x_supported, 20)
@property
def display_id_tiled_display_topology(self) -> bool:
@@ -428,11 +427,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
- return self._get_by_bitmask(21, bool)
+ return self.__value._get_by_bitmask(21, bool)
@display_id_tiled_display_topology.setter
def display_id_tiled_display_topology(self, display_id_tiled_display_topology: bool):
- self._set_by_bitmask(display_id_tiled_display_topology, 21)
+ self.__value._set_by_bitmask(display_id_tiled_display_topology, 21)
@property
def display_id_tiled_stereo_display(self) -> bool:
@@ -442,11 +441,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
- return self._get_by_bitmask(22, bool)
+ return self.__value._get_by_bitmask(22, bool)
@display_id_tiled_stereo_display.setter
def display_id_tiled_stereo_display(self, display_id_tiled_stereo_display: bool):
- self._set_by_bitmask(display_id_tiled_stereo_display, 22)
+ self.__value._set_by_bitmask(display_id_tiled_stereo_display, 22)
@property
def stacked_frame_stereo_supported(self) -> bool:
@@ -456,11 +455,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
- return self._get_by_bitmask(23, bool)
+ return self.__value._get_by_bitmask(23, bool)
@stacked_frame_stereo_supported.setter
def stacked_frame_stereo_supported(self, stacked_frame_stereo_supported: bool):
- self._set_by_bitmask(stacked_frame_stereo_supported, 23)
+ self.__value._set_by_bitmask(stacked_frame_stereo_supported, 23)
@property
def dynamic_refresh_rate_support(self) -> bool:
@@ -470,11 +469,67 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
- return self._get_by_bitmask(24, bool)
+ return self.__value._get_by_bitmask(24, bool)
@dynamic_refresh_rate_support.setter
def dynamic_refresh_rate_support(self, dynamic_refresh_rate_support: bool):
- self._set_by_bitmask(dynamic_refresh_rate_support, 24)
+ self.__value._set_by_bitmask(dynamic_refresh_rate_support, 24)
+
+ @property
+ def mst_transmission_supported(self) -> bool:
+ """
+ Set and get MST transmission supported flag supported.
+
+ Returns:
+ object of bool type
+ """
+ return self.__value._get_by_bitmask(25, bool)
+
+ @mst_transmission_supported.setter
+ def mst_transmission_supported(self, mst_transmission_supported: bool):
+ self.__value._set_by_bitmask(mst_transmission_supported, 25)
+
+ @property
+ def mst_up_request_supported(self) -> bool:
+ """
+ Set and get MST UP REQUEST supported flag supported.
+
+ Returns:
+ object of bool type
+ """
+ return self.__value._get_by_bitmask(26, bool)
+
+ @mst_up_request_supported.setter
+ def mst_up_request_supported(self, mst_up_request_supported: bool):
+ self.__value._set_by_bitmask(mst_up_request_supported, 26)
+
+ @property
+ def mst_rsn_request_supported(self) -> bool:
+ """
+ Set and get MST RSN REQUEST supported flag supported.
+
+ Returns:
+ object of bool type
+ """
+ return self.__value._get_by_bitmask(27, bool)
+
+ @mst_rsn_request_supported.setter
+ def mst_rsn_request_supported(self, mst_rsn_request_supported: bool):
+ self.__value._set_by_bitmask(mst_rsn_request_supported, 27)
+
+ @property
+ def mst_power_up_request_supported(self) -> bool:
+ """
+ Set and get MST POWER_UP DOWN_PHY supported flag supported.
+
+ Returns:
+ object of bool type
+ """
+ return self.__value._get_by_bitmask(28, bool)
+
+ @mst_power_up_request_supported.setter
+ def mst_power_up_request_supported(self, mst_power_up_request_supported: bool):
+ self.__value._set_by_bitmask(mst_power_up_request_supported, 28)
class DutCapsDp21:
@@ -487,7 +542,7 @@ class DutCapsDp21:
def __init__(self, json_obj):
self.__max_lanes = Param(json_obj["TSI_DP20_SRCCTS_MAX_LANES"])
self.__max_link_rate = Param(json_obj["TSI_DP20_SRCCTS_MAX_LINK_RATE"])
- self.__dut_caps_flags = DutCapsDp21Flags(json_obj["TSI_DP20_SRCCTS_DUT_CAPS"])
+ self.__dut_caps_flags_mst = DutCapsDp21Flags(json_obj["TSI_DP20_SRCCTS_DUT_CAPS"])
@property
def max_lanes(self) -> int:
@@ -529,11 +584,11 @@ class DutCapsDp21:
Returns:
object of `DutCapsFlags` type
"""
- return self.__dut_caps_flags
+ return self.__dut_caps_flags_mst
@dut_caps_flags.setter
def dut_caps_flags(self, dut_caps_flags: DutCapsDp21Flags):
- self.__dut_caps_flags = dut_caps_flags
+ self.__dut_caps_flags_mst = dut_caps_flags
class DebugOptions:
@@ -755,4 +810,3 @@ class GeneralSourceDUTDp21SettingTab:
@debug_options.setter
def debug_options(self, debug_config: DebugOptions):
self.__debug_options = debug_config
-
diff --git a/UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_hdcp_1a_tests.py b/UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_hdcp_1a_tests.py
new file mode 100644
index 0000000..0d0fa15
--- /dev/null
+++ b/UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_hdcp_1a_tests.py
@@ -0,0 +1,27 @@
+from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
+
+
+class HdmiHdcp1ATestParam:
+ """
+ Class `HdmiHdcp1ATestParam` describes requirement parameters for HDMI HDCP 1A tests:
+ - Set and get `timeout`. Describes test timeout, in milliseconds.
+ """
+ def __init__(self, json_obj):
+ self.__timeout = Param(json_obj["TSI_HDMI_HDCP_1A_TIMEOUT"])
+
+ @property
+ def timeout(self) -> int:
+ """
+ Set and get test timeout, in milliseconds.
+
+ Returns:
+ object of int type
+ """
+ return self.__timeout.default_value
+
+ @timeout.setter
+ def timeout(self, timeout: int):
+ if not(self.__timeout.min_value < timeout < self.__timeout.max_value):
+ raise ValueError(f"Timeout cannot be less than {self.__timeout.min_value} and more than "
+ f"{self.__timeout.max_value}.")
+ self.__timeout.default_value = timeout
diff --git a/UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_hdcp_1b_tests.py b/UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_hdcp_1b_tests.py
new file mode 100644
index 0000000..2ce2446
--- /dev/null
+++ b/UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_hdcp_1b_tests.py
@@ -0,0 +1,27 @@
+from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
+
+
+class HdmiHdcp1BTestParam:
+ """
+ Class `HdmiHdcp1BTestParam` describes requirement parameters for HDMI HDCP 1B tests:
+ - Set and get `timeout`. Describes test timeout, in milliseconds.
+ """
+ def __init__(self, json_obj):
+ self.__timeout = Param(json_obj["TSI_HDMI_HDCP_1B_TIMEOUT"])
+
+ @property
+ def timeout(self) -> int:
+ """
+ Set and get test timeout, in milliseconds.
+
+ Returns:
+ object of int type
+ """
+ return self.__timeout.default_value
+
+ @timeout.setter
+ def timeout(self, timeout: int):
+ if not(self.__timeout.min_value < timeout < self.__timeout.max_value):
+ raise ValueError(f"Timeout cannot be less than {self.__timeout.min_value} and more than "
+ f"{self.__timeout.max_value}.")
+ self.__timeout.default_value = timeout
diff --git a/UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_hdcp_2c_tests.py b/UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_hdcp_2c_tests.py
new file mode 100644
index 0000000..c42b790
--- /dev/null
+++ b/UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_hdcp_2c_tests.py
@@ -0,0 +1,60 @@
+from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
+from .hdmi_sink_tests import HdmiFrlRate
+
+
+class HdmiHdcp2CTestParam:
+ """
+ Class `HdmiHdcp2CTestParam` describes requirement parameters for HDMI HDCP 2C tests:
+ - Set and get `timeout`. Describes test timeout, in milliseconds.
+ - Set and get `lt_before_test`.
+ - Set and get `link_rate`.
+ """
+ def __init__(self, json_obj):
+ self.__timeout = Param(json_obj["TSI_HDMI_HDCP_2C_TIMEOUT"])
+ self.__lt_before_test = Param(json_obj["TSI_HDMI_HDCP_2C_LT_BEFORE_TEST"])
+ self.__link_rate = Param(json_obj["TSI_HDMI_HDCP_2C_LINK_RATE"])
+
+ @property
+ def timeout(self) -> int:
+ """
+ Set and get test timeout, in milliseconds.
+
+ Returns:
+ object of int type
+ """
+ return self.__timeout.default_value
+
+ @timeout.setter
+ def timeout(self, timeout: int):
+ if not(self.__timeout.min_value < timeout < self.__timeout.max_value):
+ raise ValueError(f"Timeout cannot be less than {self.__timeout.min_value} and more than "
+ f"{self.__timeout.max_value}.")
+ self.__timeout.default_value = timeout
+
+ @property
+ def lt_before_test(self) -> bool:
+ """
+ Set and get flag to do or not link training before starting test
+
+ Returns:
+ object of bool type
+ """
+ return bool(self.__lt_before_test.default_value)
+
+ @lt_before_test.setter
+ def lt_before_test(self, enable: bool):
+ self.__lt_before_test.default_value = int(enable)
+
+ @property
+ def link_rate(self) -> HdmiFrlRate:
+ """
+ Set and get the Link rate for link training.
+
+ Returns:
+ object of `HdmiFrlRate` type
+ """
+ return HdmiFrlRate(self.__link_rate.default_value)
+
+ @link_rate.setter
+ def link_rate(self, link_rate: HdmiFrlRate):
+ self.__link_rate.default_value = link_rate.value
diff --git a/UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_hdcp_3a_tests.py b/UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_hdcp_3a_tests.py
new file mode 100644
index 0000000..1464637
--- /dev/null
+++ b/UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_hdcp_3a_tests.py
@@ -0,0 +1,27 @@
+from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
+
+
+class HdmiHdcp3ATestParam:
+ """
+ Class `HdmiHdcp3ATestParam` describes requirement parameters for HDMI HDCP 3A tests:
+ - Set and get `timeout`. Describes test timeout, in milliseconds.
+ """
+ def __init__(self, json_obj):
+ self.__timeout = Param(json_obj["TSI_HDMI_HDCP_3A_TIMEOUT"])
+
+ @property
+ def timeout(self) -> int:
+ """
+ Set and get test timeout, in milliseconds.
+
+ Returns:
+ object of int type
+ """
+ return self.__timeout.default_value
+
+ @timeout.setter
+ def timeout(self, timeout: int):
+ if not(self.__timeout.min_value < timeout < self.__timeout.max_value):
+ raise ValueError(f"Timeout cannot be less than {self.__timeout.min_value} and more than "
+ f"{self.__timeout.max_value}.")
+ self.__timeout.default_value = timeout
diff --git a/UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_hdcp_3b_tests.py b/UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_hdcp_3b_tests.py
new file mode 100644
index 0000000..4de51bc
--- /dev/null
+++ b/UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_hdcp_3b_tests.py
@@ -0,0 +1,27 @@
+from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
+
+
+class HdmiHdcp3BTestParam:
+ """
+ Class `HdmiHdcp3BTestParam` describes requirement parameters for HDMI HDCP 3B tests:
+ - Set and get `timeout`. Describes test timeout, in milliseconds.
+ """
+ def __init__(self, json_obj):
+ self.__timeout = Param(json_obj["TSI_HDMI_HDCP_3B_TIMEOUT"])
+
+ @property
+ def timeout(self) -> int:
+ """
+ Set and get test timeout, in milliseconds.
+
+ Returns:
+ object of int type
+ """
+ return self.__timeout.default_value
+
+ @timeout.setter
+ def timeout(self, timeout: int):
+ if not(self.__timeout.min_value < timeout < self.__timeout.max_value):
+ raise ValueError(f"Timeout cannot be less than {self.__timeout.min_value} and more than "
+ f"{self.__timeout.max_value}.")
+ self.__timeout.default_value = timeout
diff --git a/UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_hdcp_3c_tests.py b/UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_hdcp_3c_tests.py
new file mode 100644
index 0000000..b39d66d
--- /dev/null
+++ b/UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_hdcp_3c_tests.py
@@ -0,0 +1,27 @@
+from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
+
+
+class HdmiHdcp3CTestParam:
+ """
+ Class `HdmiHdcp3CTestParam` describes requirement parameters for HDMI HDCP 3C tests:
+ - Set and get `timeout`. Describes test timeout, in milliseconds.
+ """
+ def __init__(self, json_obj):
+ self.__timeout = Param(json_obj["TSI_HDMI_HDCP_3C_TIMEOUT"])
+
+ @property
+ def timeout(self) -> int:
+ """
+ Set and get test timeout, in milliseconds.
+
+ Returns:
+ object of int type
+ """
+ return self.__timeout.default_value
+
+ @timeout.setter
+ def timeout(self, timeout: int):
+ if not(self.__timeout.min_value < timeout < self.__timeout.max_value):
+ raise ValueError(f"Timeout cannot be less than {self.__timeout.min_value} and more than "
+ f"{self.__timeout.max_value}.")
+ self.__timeout.default_value = timeout
diff --git a/UniTAP/dev/modules/dut_tests/dut_tests.py b/UniTAP/dev/modules/dut_tests/dut_tests.py
index 5ddd551..5c1ca7d 100644
--- a/UniTAP/dev/modules/dut_tests/dut_tests.py
+++ b/UniTAP/dev/modules/dut_tests/dut_tests.py
@@ -142,45 +142,25 @@ class DUTTests:
- Make report after testing `make_report`.
- Run test from file `run_from_file` - Not implemented. Will be added later.
"""
+ __DEFAULT_TEST_PARAMETERS = None
def __init__(self, dev_io: DeviceIO):
self.__io = dev_io
self.__opf_device = None
self.__results = []
- self.__default_parameters = {}
self.__test_groups = {}
- self.__parser = Parser()
self.__io.set_test_config(0)
- cfp_path = os.path.join(os.path.dirname(__file__), 'cfg')
- files = os.listdir(cfp_path)
- for file in files:
- try:
- if not os.path.isfile(os.path.join(cfp_path, file)):
- continue
-
- with open(os.path.join(cfp_path, file), encoding='UTF-8') as cfg_json:
- json_obj = json.load(cfg_json)
- item_group = MergedTestGroups(int(json_obj.get('id'), 16))
- group_type = MERGED_GROUP_PARAMS_TYPE.get(item_group, None)
-
- if group_type is None:
- continue
-
- group_parameters_dict = {}
- for parameter in json_obj.get('descriptions'):
- group_parameters_dict[parameter["id"]] = parameter
-
- self.__default_parameters[group_type] = group_type(group_parameters_dict)
- except ValueError:
- logging.info(
- f"[UniTAP] Failed to load {os.path.join(cfp_path, file)}.\n Value {int(json_obj.get('id'), 16)} is missing in MergedTestGroups.")
test_list = self.__io.get_test_list()
for test in test_list:
test_id = test[0] & 0xFFFF
- group_id = TestGroupId(test[0] >> 16)
+ try:
+ group_id = TestGroupId(test[0] >> 16)
+ except BaseException as e:
+ logging.info(e)
+ continue
name = test[2]
if test[2].find(' / ') != -1:
@@ -201,6 +181,49 @@ class DUTTests:
self.__test_groups[group_id]._add_new_test(Test(name=test_name, test_id=test_id))
+ @staticmethod
+ def __enumerate_and_get_default_test_parameters():
+ if DUTTests.__DEFAULT_TEST_PARAMETERS is None:
+ DUTTests.__DEFAULT_TEST_PARAMETERS = {}
+
+ cfp_path = os.path.join(os.path.dirname(__file__), 'cfg')
+ files = os.listdir(cfp_path)
+ for file in files:
+ try:
+ if not os.path.isfile(os.path.join(cfp_path, file)):
+ continue
+
+ with open(os.path.join(cfp_path, file), encoding='UTF-8') as cfg_json:
+ json_obj = json.load(cfg_json)
+ item_group = MergedTestGroups(int(json_obj.get('id'), 16))
+ group_type = MERGED_GROUP_PARAMS_TYPE.get(item_group, None)
+
+ if group_type is None:
+ continue
+
+ group_parameters_dict = {}
+ for parameter in json_obj.get('descriptions'):
+ group_parameters_dict[parameter["id"]] = parameter
+
+ DUTTests.__DEFAULT_TEST_PARAMETERS[group_type] = group_type(group_parameters_dict)
+ except ValueError:
+ logging.info(
+ f"[UniTAP] Failed to load {os.path.join(cfp_path, file)}.\n Value {int(json_obj.get('id'), 16)} is missing in MergedTestGroups.")
+
+ return DUTTests.__DEFAULT_TEST_PARAMETERS
+
+ @staticmethod
+ def __is_dsc_parameters_changed(param: Dp21SourceDUTTestParam):
+ assert isinstance(param, Dp21SourceDUTTestParam)
+
+ result = []
+ dsc_vm_params = vars(param.dsc_video_modes)
+ for key in dsc_vm_params:
+ vm_param_dict = vars(dsc_vm_params[key])
+ result.append(any(vm_param_dict[param_key].is_modified for param_key in vm_param_dict))
+
+ return any(result)
+
def run(self, group_id: TestGroupId, test_id: int, params: Optional[DUTTestParameters] = None,
print_fw_logs: bool = True, test_delay: int = 0) -> SubTestResultObject:
"""
@@ -234,8 +257,11 @@ class DUTTests:
if params is not None:
params_list = get_param_list(params)
- if isinstance(params, Dp21SourceDUTTestParam) and not params.dsc_video_modes._Dp21AvailableDscVideoModes__is_config_changed:
- logging.warning("Detected that used didn't change new DSC config. Copy setting from video config.")
+
+ #
+ # Backward compatibility with old config
+ #
+ if isinstance(params, Dp21SourceDUTTestParam):
dsc_dp2_ci_remapper = {
"TSI_DP20_SRCCTS_DSC_VMT_1920_1080_30": "TSI_DP20_SRCCTS_VMT_1920_1080_30",
"TSI_DP20_SRCCTS_DSC_VMT_1920_1080_60": "TSI_DP20_SRCCTS_VMT_1920_1080_60",
@@ -259,27 +285,33 @@ class DUTTests:
"TSI_DP20_SRCCTS_DSC_VMT_10240_4320_60": "TSI_DP20_SRCCTS_VMT_10240_4320_60"
}
- for key in dsc_dp2_ci_remapper.keys():
- dst = next((obj for obj in params_list if obj.config_id_name == key), None)
- src = next((obj for obj in params_list if obj.config_id_name == dsc_dp2_ci_remapper[key]), None)
+ if not DUTTests.__is_dsc_parameters_changed(params):
+ logging.warn("Detected that user didn't change new DSC config. Copy setting from video config.")
- if dst.default_value != src.default_value:
- logging.warn(f"DSC Config missmatch detected. Apply workaround: {key}:{hex(dst.default_value)}; {dsc_dp2_ci_remapper[key]}:{hex(src.default_value)}")
- dst.default_value = src.default_value
+ for key in dsc_dp2_ci_remapper.keys():
+ dst = next((obj for obj in params_list if obj.config_id_name == key), None)
+ src = next((obj for obj in params_list if obj.config_id_name == dsc_dp2_ci_remapper[key]), None)
+
+ if dst.default_value != src.default_value:
+ logging.warn(
+ f"DSC Config missmatch detected. Apply workaround: {key}:{hex(dst.default_value)}; {dsc_dp2_ci_remapper[key]}:{hex(src.default_value)}")
+ dst.default_value = src.default_value
else:
logging.warn(f"DSC Config modification detected. Skip workaround.")
else:
- params_list = self.__default_parameters[merged_group_id]
+ params_list = DUTTests.__enumerate_and_get_default_test_parameters()[merged_group_id]
for item in params_list:
if group_id == TestGroupId.AUDIO_TEST and item.config_id_name == "TSI_REF1_FRAME_DATA":
if isinstance(item.default_value, str) and os.path.exists(item.default_value):
- image_data = read_image_file(item.default_value)
+ image_data, file_extension = read_image_file(item.default_value)
if len(image_data) > 0:
- item.default_value = uicl_image_preparation(image_data, params)
+ # It is assumed that the bin file already contains prepared data,
+ # otherwise there is no way to determine whether additional conversion is required.
+ item.default_value = uicl_image_preparation(image_data, params, file_extension == ".bin")
elif isinstance(item, bytearray):
# TODO: add 'bytearray' support
- item.default_value = uicl_image_preparation(item.default_value, params)
+ item.default_value = uicl_image_preparation(item.default_value, params, False)
self.__io.set(item.config_id, item.default_value, dict_types.get(item.value_type),
item.data_length)
@@ -315,41 +347,51 @@ class DUTTests:
result_obj.test_delay = test_delay
self.__results.append(result_obj)
-
+
time.sleep(test_delay)
return copy.deepcopy(self.__results[-1])
- def get_params_from_file(self, path: str) -> Tuple[TestGroupId, int, DUTTestParameters]:
+ @staticmethod
+ def get_params_from_file(path: str) -> Tuple[TestGroupId, int, DUTTestParameters]:
"""
Get test parameters from transferred file: td or json (not cdf).
Args:
path ('str') - full path to config file
"""
- self.__parser.set_file_name(path)
- group_id = self.__parser.detect_group()
- test_id = self.__parser.detect_test()
+ parser = Parser()
+
+ parser.set_file_name(path)
+ group_id = parser.detect_group()
+ test_id = parser.detect_test()
group_type = group_params_dict.get(group_id)
- params = self.__parser.parse(self.get_default_parameters(group_type))
+ params = parser.parse(DUTTests.get_default_parameters(group_type))
+
return group_id, test_id, params
# TODO - add support parsing '.td' (other test groups) file extension
- def get_params_from_cdf_file(self, path: str) -> DUTTestParameters:
+ @staticmethod
+ def get_params_from_cdf_file(path: str) -> DUTTestParameters:
"""
Get test parameters from transferred file: json (cdf).
Args:
path ('str') - full path to config file
"""
- self.__parser.set_file_name(path)
- group_id = self.__parser.detect_merged_group()
+
+ parser = Parser()
+
+ parser.set_file_name(path)
+ group_id = parser.detect_merged_group()
group_type = MERGED_GROUP_PARAMS_TYPE.get(group_id)
- params = self.__parser.parse(self.get_default_parameters(group_type))
+ params = parser.parse(DUTTests.get_default_parameters(group_type))
+
return params
- def get_default_parameters(self, group_type: Type[DUTTestParameters]) -> DUTTestParameters:
+ @staticmethod
+ def get_default_parameters(group_type: Type[DUTTestParameters]) -> DUTTestParameters:
"""
Get predefined (default) parameters of test group.
@@ -359,9 +401,9 @@ class DUTTests:
Returns:
object of `DUTTestParameters` type
"""
- for group_id in self.__default_parameters.keys():
- if isinstance(self.__default_parameters.get(group_id), group_type):
- return copy.deepcopy(self.__default_parameters.get(group_id))
+ for group_id in DUTTests.__enumerate_and_get_default_test_parameters().keys():
+ if isinstance(DUTTests.__enumerate_and_get_default_test_parameters().get(group_id), group_type):
+ return copy.deepcopy(DUTTests.__enumerate_and_get_default_test_parameters().get(group_id))
raise ValueError(f"Group {group_type} is not available.")
def number_tests_in_group(self, group_id: TestGroupId) -> int:
diff --git a/UniTAP/dev/modules/dut_tests/parser/parser.py b/UniTAP/dev/modules/dut_tests/parser/parser.py
index 9ed096e..2a66524 100644
--- a/UniTAP/dev/modules/dut_tests/parser/parser.py
+++ b/UniTAP/dev/modules/dut_tests/parser/parser.py
@@ -120,16 +120,16 @@ class ParserJson(ParserFileBase):
CDF = 1
__DSC_VMT_CI_LIST = [ "TSI_DP20_SRCCTS_DSC_VMT_1920_1080_30",
- "TSI_DP20_SRCCTS_DSC_VMT_1920_1080_60",
- "TSI_DP20_SRCCTS_DSC_VMT_1920_1080_120",
- "TSI_DP20_SRCCTS_DSC_VMT_1920_1080_144",
- "TSI_DP20_SRCCTS_DSC_VMT_1920_1080_240",
- "TSI_DP20_SRCCTS_DSC_VMT_3840_2160_30",
- "TSI_DP20_SRCCTS_DSC_VMT_3840_2160_60",
- "TSI_DP20_SRCCTS_DSC_VMT_3840_2160_120",
- "TSI_DP20_SRCCTS_DSC_VMT_3840_2160_144",
- "TSI_DP20_SRCCTS_DSC_VMT_3840_2160_240",
- "TSI_DP20_SRCCTS_DSC_VMT_5120_2160_30",
+ "TSI_DP20_SRCCTS_DSC_VMT_1920_1080_60",
+ "TSI_DP20_SRCCTS_DSC_VMT_1920_1080_120",
+ "TSI_DP20_SRCCTS_DSC_VMT_1920_1080_144",
+ "TSI_DP20_SRCCTS_DSC_VMT_1920_1080_240",
+ "TSI_DP20_SRCCTS_DSC_VMT_3840_2160_30",
+ "TSI_DP20_SRCCTS_DSC_VMT_3840_2160_60",
+ "TSI_DP20_SRCCTS_DSC_VMT_3840_2160_120",
+ "TSI_DP20_SRCCTS_DSC_VMT_3840_2160_144",
+ "TSI_DP20_SRCCTS_DSC_VMT_3840_2160_240",
+ "TSI_DP20_SRCCTS_DSC_VMT_5120_2160_30",
"TSI_DP20_SRCCTS_DSC_VMT_5120_2160_60",
"TSI_DP20_SRCCTS_DSC_VMT_5120_2160_120",
"TSI_DP20_SRCCTS_DSC_VMT_5120_2160_144",
diff --git a/UniTAP/dev/modules/dut_tests/private_info.py b/UniTAP/dev/modules/dut_tests/private_info.py
index b85a673..0440342 100644
--- a/UniTAP/dev/modules/dut_tests/private_info.py
+++ b/UniTAP/dev/modules/dut_tests/private_info.py
@@ -31,7 +31,17 @@ class MergedTestGroups(IntEnum):
HDRX_DSC_CTS = 0x20,
HDTX_DSC_CTS = 0x21,
HDTX_CONTINUITY = 0x22,
- HDTX_CABLE_CHECK = 0x24
+ HDTX_CABLE_CHECK = 0x24,
+ HDMI_HDCP_CTS_1A = 0x25,
+ HDMI_HDCP_CTS_1B = 0x26,
+ HDMI_HDCP_CTS_2C = 0x27,
+ HDMI_HDCP_CTS_3A = 0x28,
+ HDMI_HDCP_CTS_3B = 0x29,
+ HDMI_HDCP_CTS_3C = 0x2A,
+ DPRX_128b132b_LL_CTS_DEMO = 0x2B,
+ DPTX_128b132b_LL_CTS_DEMO = 0x2C,
+ TIMINGS_VIDEO_TEST = 0x2D,
+ BRANCH_128b132b_MST_CTS = 0x2E
MERGED_GROUP_PARAMS_TYPE = {
@@ -60,7 +70,14 @@ MERGED_GROUP_PARAMS_TYPE = {
MergedTestGroups.HDRX_DSC_CTS: HdmiSourceDUTTestParam,
MergedTestGroups.HDTX_DSC_CTS: HdmiSinkDUTTestParam,
MergedTestGroups.HDTX_CONTINUITY: HdmiSinkContinuityDUTTestParam,
- MergedTestGroups.HDTX_CABLE_CHECK: HdmiSinkCableCheckTestParam
+ MergedTestGroups.HDTX_CABLE_CHECK: HdmiSinkCableCheckTestParam,
+ MergedTestGroups.HDMI_HDCP_CTS_1A: HdmiHdcp1ATestParam,
+ MergedTestGroups.HDMI_HDCP_CTS_1B: HdmiHdcp1BTestParam,
+ MergedTestGroups.HDMI_HDCP_CTS_3A: HdmiHdcp3ATestParam,
+ MergedTestGroups.HDMI_HDCP_CTS_3B: HdmiHdcp3BTestParam,
+ MergedTestGroups.HDMI_HDCP_CTS_2C: HdmiHdcp2CTestParam,
+ MergedTestGroups.HDMI_HDCP_CTS_3C: HdmiHdcp3CTestParam,
+ MergedTestGroups.BRANCH_128b132b_MST_CTS: Dp21BranchMSTSourceDUTTestParam
}
group_params_dict = {
@@ -104,7 +121,25 @@ group_params_dict = {
TestGroupId.HD_RX_DSC_CTS: HdmiSourceDUTTestParam,
TestGroupId.HD_TX_DSC_CTS: HdmiSinkDUTTestParam,
TestGroupId.HD_TX_CONTINUITY: HdmiSinkContinuityDUTTestParam,
- TestGroupId.HD_TX_CABLE_CHECK: HdmiSinkCableCheckTestParam
+ TestGroupId.HD_TX_CABLE_CHECK: HdmiSinkCableCheckTestParam,
+ TestGroupId.HDMI_HDCP_CTS_1A: HdmiHdcp1ATestParam,
+ TestGroupId.HDMI_HDCP_CTS_1B: HdmiHdcp1BTestParam,
+ TestGroupId.HDMI_HDCP_CTS_2C: HdmiHdcp2CTestParam,
+ TestGroupId.HDMI_HDCP_CTS_3A: HdmiHdcp3ATestParam,
+ TestGroupId.HDMI_HDCP_CTS_3B: HdmiHdcp3BTestParam,
+ TestGroupId.HDMI_HDCP_CTS_3C: HdmiHdcp3CTestParam,
+ TestGroupId.DEMO_DP_2_1_TX_DISPAYID: Dp21SinkTestParam,
+ TestGroupId.DEMO_DP_2_1_RX_DISPAYID: Dp21SourceDUTTestParam,
+ TestGroupId.DEMO_DP_2_1_TX_ADAPTIVESYNC: Dp21SinkTestParam,
+ TestGroupId.DEMO_DP_2_1_RX_ADAPTIVESYNC: Dp21SourceDUTTestParam,
+ TestGroupId.DEMO_DP_2_1_RX_LL_CTS: Dp21SourceDUTTestParam,
+ TestGroupId.DEMO_DP_2_1_TX_LL_CTS: Dp21SinkTestParam,
+ TestGroupId.DEMO_DP_2_1_RX_LTTPR_CTS: Dp21SourceDUTTestParam,
+ TestGroupId.DEMO_DP_2_1_TX_LTTPR_CTS: Dp21SinkTestParam,
+ TestGroupId.DEMO_DP_2_1_RX_DSC_CTS: Dp21SourceDUTTestParam,
+ TestGroupId.DEMO_DP_2_1_TX_DSC_CTS: Dp21SinkTestParam,
+ TestGroupId.DP_2_1_RX_MST_CTS: Dp21SourceDUTTestParam,
+ TestGroupId.DP_2_1_BRANCH_MST_CTS: Dp21BranchMSTSourceDUTTestParam
}
@@ -127,11 +162,17 @@ def test_group_to_merged_group(fw_group: TestGroupId, test_id: int) -> MergedTes
merged_group_id = MergedTestGroups.CRCVideoTest
elif fw_group in [TestGroupId.DP_2_1_RX_LL_CTS, TestGroupId.DP_2_1_RX_DSC_CTS,
TestGroupId.DP_2_1_RX_LTTPR_CTS, TestGroupId.DP_2_1_RX_DISPAYID,
- TestGroupId.DP_2_1_RX_ADAPTIVESYNC]:
+ TestGroupId.DP_2_1_RX_ADAPTIVESYNC,
+ TestGroupId.DEMO_DP_2_1_RX_LL_CTS, TestGroupId.DEMO_DP_2_1_RX_DSC_CTS,
+ TestGroupId.DEMO_DP_2_1_RX_LTTPR_CTS, TestGroupId.DEMO_DP_2_1_RX_DISPAYID,
+ TestGroupId.DEMO_DP_2_1_RX_ADAPTIVESYNC, TestGroupId.DP_2_1_RX_MST_CTS]:
merged_group_id = MergedTestGroups.DPRX_128b132b_LL_CTS
elif fw_group in [TestGroupId.DP_2_1_TX_LL_CTS, TestGroupId.DP_2_1_TX_DSC_CTS,
TestGroupId.DP_2_1_TX_LTTPR_CTS, TestGroupId.DP_2_1_TX_DISPAYID,
- TestGroupId.DP_2_1_TX_ADAPTIVESYNC]:
+ TestGroupId.DP_2_1_TX_ADAPTIVESYNC,
+ TestGroupId.DEMO_DP_2_1_TX_LL_CTS, TestGroupId.DEMO_DP_2_1_TX_DSC_CTS,
+ TestGroupId.DEMO_DP_2_1_TX_LTTPR_CTS, TestGroupId.DEMO_DP_2_1_TX_DISPAYID,
+ TestGroupId.DEMO_DP_2_1_TX_ADAPTIVESYNC]:
merged_group_id = MergedTestGroups.DPTX_128b132b_LL_CTS
elif fw_group == TestGroupId.DP_2_1_LTTPR_CTS:
merged_group_id = MergedTestGroups.LTTPR_128b132b_LL_CTS
@@ -169,6 +210,20 @@ def test_group_to_merged_group(fw_group: TestGroupId, test_id: int) -> MergedTes
merged_group_id = MergedTestGroups.HDTX_CONTINUITY
elif fw_group == TestGroupId.HD_TX_CABLE_CHECK:
merged_group_id = MergedTestGroups.HDTX_CABLE_CHECK
+ elif fw_group == TestGroupId.HDMI_HDCP_CTS_1A:
+ merged_group_id = MergedTestGroups.HDMI_HDCP_CTS_1A
+ elif fw_group == TestGroupId.HDMI_HDCP_CTS_1B:
+ merged_group_id = MergedTestGroups.HDMI_HDCP_CTS_1B
+ elif fw_group == TestGroupId.HDMI_HDCP_CTS_2C:
+ merged_group_id = MergedTestGroups.HDMI_HDCP_CTS_2C
+ elif fw_group == TestGroupId.HDMI_HDCP_CTS_3A:
+ merged_group_id = MergedTestGroups.HDMI_HDCP_CTS_3A
+ elif fw_group == TestGroupId.HDMI_HDCP_CTS_3B:
+ merged_group_id = MergedTestGroups.HDMI_HDCP_CTS_3B
+ elif fw_group == TestGroupId.HDMI_HDCP_CTS_3C:
+ merged_group_id = MergedTestGroups.HDMI_HDCP_CTS_3C
+ elif fw_group == TestGroupId.DP_2_1_BRANCH_MST_CTS:
+ merged_group_id = MergedTestGroups.BRANCH_128b132b_MST_CTS
else:
merged_group_id = MergedTestGroups.Unknown
return merged_group_id
diff --git a/UniTAP/dev/modules/dut_tests/report/report_edid_extractor.py b/UniTAP/dev/modules/dut_tests/report/report_edid_extractor.py
new file mode 100644
index 0000000..3f0f5a2
--- /dev/null
+++ b/UniTAP/dev/modules/dut_tests/report/report_edid_extractor.py
@@ -0,0 +1,102 @@
+import re
+
+class ReportContentExtractor:
+ """
+ Class `ReportContentExtractor` allows to extract content from test report.
+ - Extracted EDIDs, DisplayIDs from test report.
+ """
+ __EDID_LINE_PATTERN = re.compile(r"\d{4}.\d{3}.\d{3}:\s+[0-9a-f]{4}:\s+([0-9a-f]{2}\s+)+")
+
+ def __init__(self) -> None:
+ self.__extracting = False
+ self.__edid_addr = 0
+ self.__edid_size = 0
+ self.__edid_ready = False
+ self.__data = bytearray()
+
+ def __start_new_edid(self):
+ self.__extracting = True
+ self.__edid_addr = 0
+ self.__edid_size = 0
+ self.__edid_ready = False
+ self.__data = bytearray()
+
+ def extract_content_from_report(self, report):
+ edids = []
+ for log_line in report.fw_logs.splitlines():
+ self.__parse_line(log_line)
+ if self.__edid_ready and self.__edid_size > 0:
+ edids.append(self.__pop_edid())
+ return edids
+
+ def __parse_line(self, line: str):
+ if not self.__extracting:
+ if ("Reference Source reads Sink DUT EDID" in line
+ or "EDID contents:" in line):
+ self.__start_new_edid()
+ return
+
+ if len(line) < 18:
+ return
+
+ view = line[18:]
+
+ if "I2C AUX WR" in line:
+ sub_strs = view.split()
+
+ if len(sub_strs) <= 3:
+ return
+
+ el = sub_strs[-3]
+
+ if "30h" in el:
+ val = int(sub_strs[-1], 16)
+ self.__edid_addr = val * 0x100
+ elif "50h" in el:
+ val = int(sub_strs[-1], 16)
+ self.__edid_addr = val
+
+ return
+
+ if "I2C AUX RD" in line:
+ sub_strs = view.split()
+
+ if len(sub_strs) <= 3:
+ return
+
+ count = int(sub_strs[4])
+
+ for i in range(count):
+ byte_hex = sub_strs[5 + i]
+ self.__data.append(int(byte_hex, 16))
+ self.__edid_addr += 1
+
+ self.__edid_size = max(self.__edid_size, self.__edid_addr)
+ return
+
+ if self.__EDID_LINE_PATTERN.search(line):
+ if len(line) < 20:
+ return
+
+ view = line[line.rfind(':') + 1:]
+ sub_strs = view.split()
+
+ for byte_hex in sub_strs:
+ self.__data.append(int(byte_hex, 16))
+ self.__edid_addr += 1
+
+ self.__edid_size = max(self.__edid_size, self.__edid_addr)
+ return
+
+ self.__edid_ready = True
+ self.__extracting = False
+
+ def __pop_edid(self):
+ if self.__edid_ready and self.__edid_size > 0:
+ edid = self.__data[:self.__edid_size].hex()
+ self.__edid_ready = False
+ self.__edid_size = 0
+ self.__data = bytearray()
+ self.__edid_addr = 0
+ return edid
+ return bytearray()
\ No newline at end of file
diff --git a/UniTAP/dev/modules/dut_tests/report/report_maker.py b/UniTAP/dev/modules/dut_tests/report/report_maker.py
index 7c818af..5de5e05 100644
--- a/UniTAP/dev/modules/dut_tests/report/report_maker.py
+++ b/UniTAP/dev/modules/dut_tests/report/report_maker.py
@@ -1,8 +1,10 @@
+import os
import platform
from datetime import datetime
from enum import IntEnum
from .report_template import *
+from .report_edid_extractor import ReportContentExtractor
class TestResult(IntEnum):
@@ -59,12 +61,48 @@ def replace_additional_info(test_additional_info: TestAdditionalInfo):
return result
+def to_intel_hex(edid_hex: str) -> str:
+ data = bytes.fromhex(edid_hex)
+ lines = []
+ for offset in range(0, len(data), 16):
+ chunk = data[offset:offset + 16]
+ byte_count = len(chunk)
+ addr_hi = (offset >> 8) & 0xFF
+ addr_lo = offset & 0xFF
+ record = [byte_count, addr_hi, addr_lo, 0x00] + list(chunk)
+ checksum = (~sum(record) + 1) & 0xFF
+ hex_str = ''.join(f'{b:02X}' for b in record) + f'{checksum:02X}'
+ lines.append(f':{hex_str}')
+ lines.append(':00000001FF')
+ return ('\r\n'.join(lines) + '\r\n').encode('utf-8').hex().upper()
+
+
def generate_html_report(path: str, test_additional_info: TestAdditionalInfo, reports: list):
result = str()
head = ReportHead
head = head.replace("#count#", str((len(reports) + 2)))
+ for index, report in enumerate(reports):
+ extractor = ReportContentExtractor()
+ edid_displaid_content = extractor.extract_content_from_report(report)
+
+ if edid_displaid_content is None or len(edid_displaid_content) <= 0:
+ continue
+
+ formatted_edids = '["' + '",\n "'.join(edid_displaid_content).upper() + '"]'
+ formatted_edids_intel_hex = '["' + '",\n "'.join(to_intel_hex(edid) for edid in edid_displaid_content) + '"]'
+ test_name_formatted = report.test_name.split(' ')[0].replace('.', '_')
+
+ if len(edid_displaid_content) > 0:
+ head = head.replace("#edid_fill#", f"testsEdidData.set({index}, {{name: \"{test_name_formatted}\", data: {formatted_edids}, dataIntelHex: {formatted_edids_intel_hex}}}); \n#edid_fill#")
+ break
+
+ head = head.replace("#edid_fill#", "")
+ head = head.replace("#jsCode#", report_js)
+ head = head.replace("#count#", str(len(reports) + 2))
+ head = head.replace("#fileNamePrefix#", os.path.splitext(os.path.basename(path))[0])
+
body = ReportBody
body = body.replace("#device_description#", replace_additional_info(test_additional_info))
@@ -105,7 +143,7 @@ def generate_html_report(path: str, test_additional_info: TestAdditionalInfo, re
line = OptionListLine
line = line.replace("#number#", str(i + 2))
line = line.replace("#test_name#", f"{reports[i].group_name} / {reports[i].test_name}")
- line = line.replace("#test_result#", dict_result_2.get(reports[i].test_result))
+ line = line.replace("#test_result#", dict_result_2.get(reports[i].test_result, "UNKNOWN"))
options_list += line + "\n"
body = body.replace("#optionList#", options_list)
@@ -117,7 +155,7 @@ def generate_html_report(path: str, test_additional_info: TestAdditionalInfo, re
line = line.replace("#handler_number#", str(i + 2))
line = line.replace("#test_name#", reports[i].test_name)
line = line.replace("#test_group#", reports[i].group_name)
- line = line.replace("#test_result#", dict_result_2.get(reports[i].test_result))
+ line = line.replace("#test_result#", dict_result_2.get(reports[i].test_result, "UNKNOWN"))
line = line.replace("#error#", f"{reports[i].error_code}" if reports[i].error_code != 0 else "-")
line = line.replace("#ending#", "2" if i % 2 else "")
test_result = dict_result_2.get(reports[i].test_result)
@@ -153,14 +191,17 @@ def generate_html_report(path: str, test_additional_info: TestAdditionalInfo, re
line = line.replace("#test_number#", f"{i + 1}")
line = line.replace("#test_group#", reports[i].group_name)
line = line.replace("#test_name#", reports[i].test_name)
- line = line.replace("#result#", dict_result_2.get(reports[i].test_result))
+ line = line.replace("#result#", dict_result_2.get(reports[i].test_result, "UNKNOWN"))
line = line.replace("#test_delay#", f"{reports[i].test_delay * 1000}")
line = line.replace("#test_parameters#", reports[i].config_info)
- line = line.replace("#warning#", "Debug options enabled!
" if reports[i].debug else "")
- if reports[i].debug:
+ if "demo" in reports[i].group_name.lower():
+ warnings = "Demo Report Only - Not valid for DP Logo Certification.