更新UCD-API库及文档
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user