1.1.0版本
This commit is contained in:
56
UniTAP/dev/modules/dut_tests/dut_default_params/__init__.py
Normal file
56
UniTAP/dev/modules/dut_tests/dut_default_params/__init__.py
Normal file
@@ -0,0 +1,56 @@
|
||||
from typing import TypeVar
|
||||
|
||||
from .audio_test import AudioTestParam
|
||||
from .crc_video_tests import CrcVideoTestParam, BrokenFrameExportFormat, CrcVideoTestBpp
|
||||
from .cec_tests import CecFunctionalTestParam
|
||||
from .dp1_4_sink_tests import Dp14SinkTestParam
|
||||
from .dp2_1_sink_tests import Dp21SinkTestParam
|
||||
from .dp1_4_source_tests import Dp14SourceDUTTestParam, PackedTimings1Lane, PackedTimings2Lane, \
|
||||
PackedTimings4Lane, EventIndication
|
||||
from .dp2_1_source_tests import Dp21SourceDUTTestParam
|
||||
from .dp_electrical_tests import DpElectricalTestParam
|
||||
from .hdmi_electrical_tests import HdmiElectricalTestParam
|
||||
from .usbc_electrical_tests import UsbcElectricalTestParam
|
||||
from .hdcp_1a_tests import Hdcp1ATestParam
|
||||
from .hdcp_1b_tests import Hdcp1BTestParam
|
||||
from .hdcp_2c_tests import Hdcp2CTestParam
|
||||
from .hdcp_3a_tests import Hdcp3ATestParam
|
||||
from .hdcp_3b_tests import Hdcp3BTestParam
|
||||
from .hdcp_3c_tests import Hdcp3CTestParam
|
||||
from .hdr10_tests import Hdr10TestParam
|
||||
from .pixel_video_test import VideoPixelTestParam
|
||||
from .link_config_test import LinkConfigTestParam
|
||||
from .vrr_tests import VrrSinkDUTTestParam, VrrSourceDUTTestParam
|
||||
from .lttpr_tests import DpLttprTestParam
|
||||
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 ..test_group_params_types import Param, get_param_list
|
||||
|
||||
DUTTestParameters = TypeVar("DUTTestParameters",
|
||||
AudioTestParam,
|
||||
DpElectricalTestParam,
|
||||
HdmiElectricalTestParam,
|
||||
CecFunctionalTestParam,
|
||||
CrcVideoTestParam,
|
||||
LinkConfigTestParam,
|
||||
UsbcElectricalTestParam,
|
||||
Hdcp1ATestParam,
|
||||
Hdcp1BTestParam,
|
||||
Hdcp2CTestParam,
|
||||
Hdcp3ATestParam,
|
||||
Hdcp3BTestParam,
|
||||
Hdcp3CTestParam,
|
||||
VrrSinkDUTTestParam,
|
||||
VrrSourceDUTTestParam,
|
||||
Dp14SourceDUTTestParam,
|
||||
Dp21SourceDUTTestParam,
|
||||
Dp14SinkTestParam,
|
||||
Dp21SinkTestParam,
|
||||
VideoPixelTestParam,
|
||||
DpLttprTestParam,
|
||||
Hdr10TestParam,
|
||||
HdmiSinkDUTTestParam,
|
||||
HdmiSinkContinuityDUTTestParam,
|
||||
HdmiSinkCableCheckTestParam)
|
||||
146
UniTAP/dev/modules/dut_tests/dut_default_params/audio_test.py
Normal file
146
UniTAP/dev/modules/dut_tests/dut_default_params/audio_test.py
Normal file
@@ -0,0 +1,146 @@
|
||||
import os.path
|
||||
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
|
||||
|
||||
|
||||
class AudioTestParam:
|
||||
"""
|
||||
Class `AudioTestParam` describes requirement parameters for audio test:
|
||||
- Set and get `sample_rate`. Describes expected sampling rate of audio signal.
|
||||
- Set and get `audio_frequency`. Describes expected audible (sine) frequency as Hz.
|
||||
- Set and get `frequency_tolerance`. Describes allowed deviation from expected frequency as Hz.
|
||||
- Set and get `audio_glitches_allowed`. Describes number of audio glitches allowed per test.
|
||||
- Set and get `save_conditions`. Describes tested audio save conditions.
|
||||
- Set and get `storage_folder`. Describes location where the captured audio is to be saved.
|
||||
"""
|
||||
__SAVE_CONDITION = {"None": 0,
|
||||
'Failed': 1,
|
||||
'All': 2}
|
||||
|
||||
def __init__(self, json_obj):
|
||||
self.__sample_rate = Param(json_obj["TSI_EXPECTED_SAMPLE_RATE"])
|
||||
self.__audio_frequency = Param(json_obj["TSI_EXPECTED_AUDIO_FREQUENCY"])
|
||||
self.__frequency_tolerance = Param(json_obj["TSI_AUDIO_FREQUENCY_TOLERANCE"])
|
||||
self.__glitch_detect_threshold = Param(json_obj["TSI_AUDIO_GLITCH_DETECT_TRESHOLD"])
|
||||
self.__audio_glitches_allowed = Param(json_obj["TSI_AUDIO_GLITCHES_ALLOWED"])
|
||||
self.__save_conditions = Param(json_obj["TSI_AUDIO_TEST_SAVE_CONDITIONS"])
|
||||
self.__storage_folder = Param(json_obj["TSI_AUDIO_TEST_STORAGE_FOLDER"])
|
||||
|
||||
@property
|
||||
def sample_rate(self) -> int:
|
||||
"""
|
||||
Set and get sampling rate of audio signal.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__sample_rate.default_value
|
||||
|
||||
@sample_rate.setter
|
||||
def sample_rate(self, sample_rate: int):
|
||||
if not(self.__sample_rate.min_value < sample_rate < self.__sample_rate.max_value):
|
||||
raise ValueError(f"Sample rate cannot be less than {self.__sample_rate.min_value} and more than "
|
||||
f"{self.__sample_rate.max_value}.")
|
||||
self.__sample_rate.default_value = sample_rate
|
||||
|
||||
@property
|
||||
def audio_frequency(self) -> int:
|
||||
"""
|
||||
Set and get audible (sine) frequency as Hz.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__audio_frequency.default_value
|
||||
|
||||
@audio_frequency.setter
|
||||
def audio_frequency(self, audio_frequency: int):
|
||||
if not(self.__audio_frequency.min_value < audio_frequency < self.__audio_frequency.max_value):
|
||||
raise ValueError(f"Audio frequency cannot be less than {self.__audio_frequency.min_value} and more than "
|
||||
f"{self.__audio_frequency.max_value}.")
|
||||
self.__audio_frequency.default_value = audio_frequency
|
||||
|
||||
@property
|
||||
def frequency_tolerance(self) -> int:
|
||||
"""
|
||||
Set and get allowed deviation from expected frequency as Hz.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__frequency_tolerance.default_value
|
||||
|
||||
@frequency_tolerance.setter
|
||||
def frequency_tolerance(self, frequency_tolerance: int):
|
||||
if not(self.__frequency_tolerance.min_value < frequency_tolerance < self.__frequency_tolerance.max_value):
|
||||
raise ValueError(f"Frequency tolerance cannot be less than {self.__frequency_tolerance.min_value} "
|
||||
f"and more than {self.__frequency_tolerance.max_value}.")
|
||||
self.__frequency_tolerance.default_value = frequency_tolerance
|
||||
|
||||
@property
|
||||
def audio_glitches_allowed(self) -> int:
|
||||
"""
|
||||
Set and get number of audio glitches allowed per test.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__audio_glitches_allowed.default_value
|
||||
|
||||
@audio_glitches_allowed.setter
|
||||
def audio_glitches_allowed(self, audio_glitches_allowed: int):
|
||||
if not(self.__audio_glitches_allowed.min_value < audio_glitches_allowed < self.__audio_glitches_allowed.max_value):
|
||||
raise ValueError(f"Audio glitches allowed cannot be less than {self.__audio_glitches_allowed.min_value} "
|
||||
f"and more than {self.__audio_glitches_allowed.max_value}.")
|
||||
self.__audio_glitches_allowed.default_value = audio_glitches_allowed
|
||||
|
||||
@property
|
||||
def glitch_detect_threshold(self) -> int:
|
||||
"""
|
||||
Set and get number of audio glitches allowed per test.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__glitch_detect_threshold.default_value
|
||||
|
||||
@glitch_detect_threshold.setter
|
||||
def glitch_detect_threshold(self, glitch_detect_threshold: int):
|
||||
if not (
|
||||
self.__glitch_detect_threshold.min_value < glitch_detect_threshold < self.__glitch_detect_threshold.max_value):
|
||||
raise ValueError(f"Glitch detect threshold cannot be less than {self.__glitch_detect_threshold.min_value} "
|
||||
f"and more than {self.__glitch_detect_threshold.max_value}.")
|
||||
self.__glitch_detect_threshold.default_value = glitch_detect_threshold
|
||||
|
||||
@property
|
||||
def save_conditions(self) -> str:
|
||||
"""
|
||||
Set and get tested audio save conditions.
|
||||
|
||||
Returns:
|
||||
object of str type
|
||||
"""
|
||||
return self.__save_conditions.default_value
|
||||
|
||||
@save_conditions.setter
|
||||
def save_conditions(self, save_conditions: str = 'None'):
|
||||
if self.__SAVE_CONDITION.get(save_conditions) is None:
|
||||
available_variants = '\n'.join(self.__SAVE_CONDITION.keys())
|
||||
raise ValueError(f"Incorrect input parameter {save_conditions}.\n"
|
||||
f"Available variants: {available_variants}")
|
||||
self.__save_conditions.default_value = self.__SAVE_CONDITION.get(save_conditions)
|
||||
|
||||
@property
|
||||
def storage_folder(self) -> str:
|
||||
"""
|
||||
Set and get location where the captured audio is to be saved.
|
||||
|
||||
Returns:
|
||||
object of str type
|
||||
"""
|
||||
return self.__storage_folder.default_value
|
||||
|
||||
@storage_folder.setter
|
||||
def storage_folder(self, storage_folder: str):
|
||||
if self.__save_conditions.default_value != 0 and not os.path.exists(storage_folder):
|
||||
raise ValueError('Incorrect input path. Path is not exist.')
|
||||
self.__storage_folder.default_value = storage_folder
|
||||
43
UniTAP/dev/modules/dut_tests/dut_default_params/cec_tests.py
Normal file
43
UniTAP/dev/modules/dut_tests/dut_default_params/cec_tests.py
Normal file
@@ -0,0 +1,43 @@
|
||||
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
|
||||
|
||||
|
||||
class CecFunctionalTestParam:
|
||||
"""
|
||||
Class `CecFunctionalTestParam` describes requirement parameters for CEC tests:
|
||||
- Set and get `timeout`. Describes test timeout, in milliseconds.
|
||||
- Set and get `physical_address`. Describes Local CEC physical address.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__timeout = Param(json_obj["TSI_HDMI_RX_CEC_TIMEOUT"])
|
||||
self.__physical_address = Param(json_obj["TSI_HDMI_RX_CEC_LOCAL_PHY_ADDR"])
|
||||
|
||||
@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 physical_address(self) -> int:
|
||||
"""
|
||||
Set and get Local CEC physical address.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__physical_address.default_value
|
||||
|
||||
@physical_address.setter
|
||||
def physical_address(self, physical_address: int):
|
||||
self.__physical_address.default_value = physical_address
|
||||
@@ -0,0 +1,311 @@
|
||||
from enum import IntEnum
|
||||
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
|
||||
|
||||
|
||||
class CrcVideoTestBpp(IntEnum):
|
||||
BPP12 = 12
|
||||
BPP15 = 15
|
||||
BPP16 = 16
|
||||
BPP18 = 18
|
||||
BPP20 = 20
|
||||
BPP21 = 21
|
||||
BPP24 = 24
|
||||
BPP30 = 30
|
||||
BPP32 = 32
|
||||
BPP36 = 36
|
||||
BPP48 = 48
|
||||
|
||||
|
||||
class BrokenFrameExportFormat(IntEnum):
|
||||
BIN = 0
|
||||
PPM = 1
|
||||
BMP = 2
|
||||
|
||||
|
||||
class CrcVideoTestParam:
|
||||
"""
|
||||
Class `CrcVideoTestParam` describes requirement parameters for CRC tests:
|
||||
- Set and get `timeout`. Describes test timeout, in milliseconds.
|
||||
- Set and get `number_frames_to_test`. Describes total number of frames to be tested.
|
||||
- Set and get `number_reference_frames`. Describes number of reference frames.
|
||||
- Set and get `number_frames_mismatch`. Describes number of bad frames allowed in single CRC tests.
|
||||
- Set and get `reference_width`. Describes expected video width, in pixels.
|
||||
- Set and get `reference_height`. Describes expected video weight, in pixels.
|
||||
- Set and get `reference_color_depth`. Describes expected color depth, as bits per pixel `CrcVideoTestBpp`.
|
||||
- Set and get `required_frame_rate`. Describes expected frame rate, in millihertz (mHz).
|
||||
- Set and get `frame_rate_tolerance`. Describes frame rate tolerance, in millihertz (mHz).
|
||||
- Set and get `reference_crc_values`. Describes CRC reference values. Each CRC set consists of 3 16-bit words.
|
||||
- Set and get `motion_test_iteration`. Describes the number of iterations the defined CRC sequence must
|
||||
be found in order to pass the test.
|
||||
- Set and get `data_transfer_timeout`. Describes data transfer timeout in milliseconds.
|
||||
- Set and get `failed_frames_folder`. Describes location where the failed frames are to be saved.
|
||||
- Set and get `max_export_failed`. Describes the number of failed frames to be exported from the video test.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__timeout = Param(json_obj["TSI_CRC_TIMEOUT"])
|
||||
self.__number_frames_to_test = Param(json_obj["TSI_CRC_FRAMES_TO_TEST"])
|
||||
self.__number_reference_frames = Param(json_obj["TSI_CRC_REF_FRAME_COUNT"])
|
||||
self.__number_frames_mismatch = Param(json_obj["TSI_CRC_LIM_FRAME_MISMATCHES"])
|
||||
self.__reference_width = Param(json_obj["TSI_CRC_REF_WIDTH"])
|
||||
self.__reference_height = Param(json_obj["TSI_CRC_REF_HEIGHT"])
|
||||
self.__reference_color_depth = Param(json_obj["TSI_CRC_REF_COLORDEPTH"]) # CrcVideoTestBpp
|
||||
self.__required_frame_rate = Param(json_obj["TSI_CRC_REQUIRED_FRAME_RATE"])
|
||||
self.__frame_rate_tolerance = Param(json_obj["TSI_CRC_FRAME_RATE_TOLERANCE"])
|
||||
self.__reference_crc_values = Param(json_obj["TSI_CRC_REFERENCE_CRC_VALUES"])
|
||||
self.__motion_test_iteration = Param(json_obj["TSI_CRC_MOTION_TEST_ITERATIONS"])
|
||||
self.__color_format = Param(json_obj["TSI_CRC_COLOR_FORMAT"]) # Do not provide. Must be 0
|
||||
self.__data_transfer_timeout = Param(json_obj["TSI_CRC_DATA_TRANSFER_TIMEOUT"])
|
||||
self.__failed_frames_folder = Param(json_obj["TSI_CRC_FAILED_FRAME_TARGET_FOLDER"])
|
||||
self.__max_export_failed = Param(json_obj["TSI_CRC_MAX_EXPORT_FAILED"])
|
||||
self.__export_format = Param(json_obj["TSI_CRC_EXPORT_FORMAT"])
|
||||
|
||||
@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 number_frames_to_test(self) -> int:
|
||||
"""
|
||||
Set and get total number of frames to be tested.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__number_frames_to_test.default_value
|
||||
|
||||
@number_frames_to_test.setter
|
||||
def number_frames_to_test(self, number_frames_to_test: int):
|
||||
if not(self.__number_frames_to_test.min_value < number_frames_to_test < self.__number_frames_to_test.max_value):
|
||||
raise ValueError(f"Number frames to test cannot be less than {self.__number_frames_to_test.min_value} "
|
||||
f"and more than {self.__number_frames_to_test.max_value}.")
|
||||
self.__number_frames_to_test.default_value = number_frames_to_test
|
||||
|
||||
@property
|
||||
def number_reference_frames(self) -> int:
|
||||
"""
|
||||
Set and get number of reference frames.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__number_reference_frames.default_value
|
||||
|
||||
@number_reference_frames.setter
|
||||
def number_reference_frames(self, number_reference_frames: int):
|
||||
if not(self.__number_reference_frames.min_value < number_reference_frames <
|
||||
self.__number_reference_frames.max_value):
|
||||
raise ValueError(f"Number reference frames cannot be less than {self.__number_reference_frames.min_value} "
|
||||
f"and more than {self.__number_reference_frames.max_value}.")
|
||||
self.__number_reference_frames.default_value = number_reference_frames
|
||||
|
||||
@property
|
||||
def number_frames_mismatch(self) -> int:
|
||||
"""
|
||||
Set and get number of bad frames allowed in single CRC tests.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__number_frames_mismatch.default_value
|
||||
|
||||
@number_frames_mismatch.setter
|
||||
def number_frames_mismatch(self, number_frames_mismatch: int):
|
||||
if not(self.__number_frames_mismatch.min_value <= number_frames_mismatch <
|
||||
self.__number_frames_mismatch.max_value):
|
||||
raise ValueError(f"Number frames mismatch cannot be less than {self.__number_frames_mismatch.min_value} "
|
||||
f"and more than {self.__number_frames_mismatch.max_value}.")
|
||||
self.__number_frames_mismatch.default_value = number_frames_mismatch
|
||||
|
||||
@property
|
||||
def reference_width(self) -> int:
|
||||
"""
|
||||
Set and get expected video width, in pixels.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__reference_width.default_value
|
||||
|
||||
@reference_width.setter
|
||||
def reference_width(self, reference_width: int):
|
||||
if not(self.__reference_width.min_value < reference_width < self.__reference_width.max_value):
|
||||
raise ValueError(f"Reference width cannot be less than {self.__reference_width.min_value} and more than "
|
||||
f"{self.__reference_width.max_value}.")
|
||||
self.__reference_width.default_value = reference_width
|
||||
|
||||
@property
|
||||
def reference_height(self) -> int:
|
||||
"""
|
||||
Set and get expected video weight, in pixels.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__reference_height.default_value
|
||||
|
||||
@reference_height.setter
|
||||
def reference_height(self, reference_height: int):
|
||||
if not(self.__reference_height.min_value < reference_height < self.__reference_height.max_value):
|
||||
raise ValueError(f"Reference height cannot be less than {self.__reference_height.min_value} and more than "
|
||||
f"{self.__reference_height.max_value}.")
|
||||
self.__reference_height.default_value = reference_height
|
||||
|
||||
@property
|
||||
def reference_color_depth(self) -> int:
|
||||
"""
|
||||
Set and get expected color depth, as bits per pixel `CrcVideoTestBpp`.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__reference_color_depth.default_value
|
||||
|
||||
@reference_color_depth.setter
|
||||
def reference_color_depth(self, reference_color_depth: CrcVideoTestBpp):
|
||||
self.__reference_color_depth.default_value = reference_color_depth.value
|
||||
|
||||
@property
|
||||
def required_frame_rate(self) -> int:
|
||||
"""
|
||||
Set and get expected frame rate, in millihertz (mHz).
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__required_frame_rate.default_value
|
||||
|
||||
@required_frame_rate.setter
|
||||
def required_frame_rate(self, required_frame_rate: int):
|
||||
if not(self.__required_frame_rate.min_value <= required_frame_rate < self.__required_frame_rate.max_value):
|
||||
raise ValueError(f"Required frame rate cannot be less than {self.__required_frame_rate.min_value} "
|
||||
f"and more than {self.__required_frame_rate.max_value}.")
|
||||
self.__required_frame_rate.default_value = required_frame_rate
|
||||
|
||||
@property
|
||||
def frame_rate_tolerance(self) -> int:
|
||||
"""
|
||||
Set and get frame rate tolerance, in millihertz (mHz).
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__frame_rate_tolerance.default_value
|
||||
|
||||
@frame_rate_tolerance.setter
|
||||
def frame_rate_tolerance(self, frame_rate_tolerance: int):
|
||||
if not(self.__frame_rate_tolerance.min_value <= frame_rate_tolerance < self.__frame_rate_tolerance.max_value):
|
||||
raise ValueError(f"Frame rate tolerance cannot be less than {self.__frame_rate_tolerance.min_value} "
|
||||
f"and more than {self.__frame_rate_tolerance.max_value}.")
|
||||
self.__frame_rate_tolerance.default_value = frame_rate_tolerance
|
||||
|
||||
@property
|
||||
def reference_crc_values(self) -> list:
|
||||
"""
|
||||
Set and get CRC reference values. Each CRC set consists of 3 16-bit words.
|
||||
|
||||
Returns:
|
||||
object of list type
|
||||
"""
|
||||
return self.__reference_crc_values.default_value
|
||||
|
||||
@reference_crc_values.setter
|
||||
def reference_crc_values(self, reference_crc_values: list):
|
||||
if len(reference_crc_values) <= 0:
|
||||
raise ValueError(f"Length of reference crc list must be more that 0")
|
||||
self.__reference_crc_values.default_value = reference_crc_values
|
||||
|
||||
@property
|
||||
def motion_test_iteration(self) -> int:
|
||||
"""
|
||||
Set and get number of iterations the defined CRC sequence must be found in order to pass the test.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__motion_test_iteration.default_value
|
||||
|
||||
@motion_test_iteration.setter
|
||||
def motion_test_iteration(self, motion_test_iteration: int):
|
||||
if not(self.__motion_test_iteration.min_value <= motion_test_iteration < self.__motion_test_iteration.max_value):
|
||||
raise ValueError(f"Motion test iteration cannot be less motion_test_iteration "
|
||||
f"{self.__motion_test_iteration.min_value} and more than "
|
||||
f"{self.__motion_test_iteration.max_value}.")
|
||||
self.__motion_test_iteration.default_value = motion_test_iteration
|
||||
|
||||
@property
|
||||
def data_transfer_timeout(self) -> int:
|
||||
"""
|
||||
Set and get data transfer timeout in milliseconds.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__data_transfer_timeout.default_value
|
||||
|
||||
@data_transfer_timeout.setter
|
||||
def data_transfer_timeout(self, data_transfer_timeout: int):
|
||||
if not(self.__data_transfer_timeout.min_value < data_transfer_timeout < self.__data_transfer_timeout.max_value):
|
||||
raise ValueError(f"Data transfer timeout cannot be less than {self.__data_transfer_timeout.min_value} "
|
||||
f"and more than {self.__data_transfer_timeout.max_value}.")
|
||||
self.__data_transfer_timeout.default_value = data_transfer_timeout
|
||||
|
||||
@property
|
||||
def failed_frames_folder(self) -> str:
|
||||
"""
|
||||
Set and get location where the failed frames are to be saved.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__failed_frames_folder.default_value
|
||||
|
||||
@failed_frames_folder.setter
|
||||
def failed_frames_folder(self, failed_frames_folder: str):
|
||||
if len(failed_frames_folder) <= 0:
|
||||
raise ValueError(f"Path length of folder list must be more that 0")
|
||||
self.__failed_frames_folder.default_value = failed_frames_folder
|
||||
|
||||
@property
|
||||
def max_export_failed(self) -> int:
|
||||
"""
|
||||
Set and get number of failed frames to be exported from the video test.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__max_export_failed.default_value
|
||||
|
||||
@max_export_failed.setter
|
||||
def max_export_failed(self, max_export_failed: int):
|
||||
if not(self.__max_export_failed.min_value <= max_export_failed < self.__max_export_failed.max_value):
|
||||
raise ValueError(f"Number of max export failed frames cannot be less than "
|
||||
f"{self.__max_export_failed.min_value} and more than "
|
||||
f"{self.__max_export_failed.max_value}.")
|
||||
self.__max_export_failed.default_value = max_export_failed
|
||||
|
||||
@property
|
||||
def export_format(self) -> BrokenFrameExportFormat:
|
||||
"""
|
||||
Set and get crc failed frame file format.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return BrokenFrameExportFormat(self.__export_format.default_value)
|
||||
|
||||
@export_format.setter
|
||||
def export_format(self, export_format: BrokenFrameExportFormat):
|
||||
self.__export_format.default_value = export_format.value
|
||||
@@ -0,0 +1,773 @@
|
||||
from enum import IntEnum
|
||||
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
|
||||
from UniTAP.dev.modules.dut_tests.test_utils import update_default_value
|
||||
|
||||
|
||||
class BitStream(IntEnum):
|
||||
"""
|
||||
Describes available values for bit stream.
|
||||
Sink DUT support 444 CRC for Simple 422 bitstream
|
||||
"""
|
||||
YCbCr422 = 0
|
||||
YCbCr444 = 1
|
||||
|
||||
|
||||
class PackedSource(IntEnum):
|
||||
"""
|
||||
Describes available values for packer source.
|
||||
Source of the most packet video modes table.
|
||||
"""
|
||||
UseTestConfig = 0
|
||||
UseSinkDutEdid = 1
|
||||
|
||||
|
||||
class DisplayIdVisualCheck(IntEnum):
|
||||
"""
|
||||
Describes available values for visual check during DisplayID CTS tests.
|
||||
"""
|
||||
NeverSkip = 0
|
||||
SkipIfCrcMatches = 1
|
||||
|
||||
|
||||
class Timing:
|
||||
"""
|
||||
Class `Timing` describes available supported timings standard.
|
||||
- CTA `cta` (enable/disable).
|
||||
- RB1 `rb1` (enable/disable).
|
||||
- RB2 `rb2` (enable/disable).
|
||||
"""
|
||||
def __init__(self, timing_data):
|
||||
self.__data = Param(timing_data)
|
||||
self.__cta = False
|
||||
self.__rb1 = False
|
||||
self.__rb2 = False
|
||||
|
||||
@property
|
||||
def cta(self):
|
||||
"""
|
||||
Set and get CTA flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__cta
|
||||
|
||||
@cta.setter
|
||||
def cta(self, cta: bool):
|
||||
self.__cta = cta
|
||||
self.__data.default_value = update_default_value(value=self.__cta,
|
||||
default_value=self.__data.default_value,
|
||||
mask=self.__data.bit_field_list[0].mask)
|
||||
|
||||
@property
|
||||
def rb1(self):
|
||||
"""
|
||||
Set and get RB1 flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__rb1
|
||||
|
||||
@rb1.setter
|
||||
def rb1(self, rb1: bool):
|
||||
self.__rb1 = rb1
|
||||
self.__data.default_value = update_default_value(value=self.__rb1,
|
||||
default_value=self.__data.default_value,
|
||||
mask=self.__data.bit_field_list[1].mask)
|
||||
|
||||
@property
|
||||
def rb2(self):
|
||||
"""
|
||||
Set and get RB2 flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__rb2
|
||||
|
||||
@rb2.setter
|
||||
def rb2(self, rb2: bool):
|
||||
self.__rb2 = rb2
|
||||
self.__data.default_value = update_default_value(value=self.__rb2,
|
||||
default_value=self.__data.default_value,
|
||||
mask=self.__data.bit_field_list[2].mask)
|
||||
|
||||
def set_all(self):
|
||||
self.cta = True
|
||||
self.rb1 = True
|
||||
self.rb2 = True
|
||||
|
||||
def clear(self):
|
||||
self.cta = False
|
||||
self.rb1 = False
|
||||
self.rb2 = False
|
||||
|
||||
|
||||
class Dp14SinkTimings:
|
||||
"""
|
||||
Class `Dp14SinkTimings` defines DSC video modes adn allows settings values.
|
||||
- 1920x1080 30Hz `T_1920_x_1080_30`.
|
||||
- 1920x1080 60Hz `T_1920_x_1080_60`.
|
||||
- 1920x1080 120Hz `T_1920_x_1080_120`.
|
||||
- 3840x2160 30Hz `T_3840_x_2160_30`.
|
||||
- 3840x2160 60Hz `T_3840_x_2160_60`.
|
||||
- 3840x2160 120Hz `T_3840_x_2160_120`.
|
||||
- 5120x2160 30Hz `T_5120_x_2160_30`.
|
||||
- 5120x2160 60Hz `T_5120_x_2160_60`.
|
||||
- 5120x2160 120Hz `T_5120_x_2160_120`.
|
||||
- 7680x4320 30Hz `T_7680_x_4320_30`.
|
||||
- 7680x4320 60Hz `T_7680_x_4320_60`.
|
||||
- 7680x4320 100Hz `T_7680_x_4320_100`.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__1920_x_1080_30_id = Param(json_obj["TSI_DP14_SINKCTS_DSC_VM_0"])
|
||||
self.__1920_x_1080_30 = Timing(timing_data=json_obj["TSI_DP14_SINKCTS_DSC_VM_T_0"])
|
||||
|
||||
self.__1920_x_1080_60_id = Param(json_obj["TSI_DP14_SINKCTS_DSC_VM_1"])
|
||||
self.__1920_x_1080_60 = Timing(timing_data=json_obj["TSI_DP14_SINKCTS_DSC_VM_T_1"])
|
||||
|
||||
self.__1920_x_1080_120_id = Param(json_obj["TSI_DP14_SINKCTS_DSC_VM_2"])
|
||||
self.__1920_x_1080_120 = Timing(timing_data=json_obj["TSI_DP14_SINKCTS_DSC_VM_T_2"])
|
||||
|
||||
self.__3840_x_2160_30_id = Param(json_obj["TSI_DP14_SINKCTS_DSC_VM_3"])
|
||||
self.__3840_x_2160_30 = Timing(timing_data=json_obj["TSI_DP14_SINKCTS_DSC_VM_T_3"])
|
||||
|
||||
self.__3840_x_2160_60_id = Param(json_obj["TSI_DP14_SINKCTS_DSC_VM_4"])
|
||||
self.__3840_x_2160_60 = Timing(timing_data=json_obj["TSI_DP14_SINKCTS_DSC_VM_T_4"])
|
||||
|
||||
self.__3840_x_2160_120_id = Param(json_obj["TSI_DP14_SINKCTS_DSC_VM_5"])
|
||||
self.__3840_x_2160_120 = Timing(timing_data=json_obj["TSI_DP14_SINKCTS_DSC_VM_T_5"])
|
||||
|
||||
self.__5120_x_2160_30_id = Param(json_obj["TSI_DP14_SINKCTS_DSC_VM_6"])
|
||||
self.__5120_x_2160_30 = Timing(timing_data=json_obj["TSI_DP14_SINKCTS_DSC_VM_T_6"])
|
||||
|
||||
self.__5120_x_2160_60_id = Param(json_obj["TSI_DP14_SINKCTS_DSC_VM_7"])
|
||||
self.__5120_x_2160_60 = Timing(timing_data=json_obj["TSI_DP14_SINKCTS_DSC_VM_T_7"])
|
||||
|
||||
self.__5120_x_2160_120_id = Param(json_obj["TSI_DP14_SINKCTS_DSC_VM_8"])
|
||||
self.__5120_x_2160_120 = Timing(timing_data=json_obj["TSI_DP14_SINKCTS_DSC_VM_T_8"])
|
||||
|
||||
self.__7680_x_4320_30_id = Param(json_obj["TSI_DP14_SINKCTS_DSC_VM_9"])
|
||||
self.__7680_x_4320_30 = Timing(timing_data=json_obj["TSI_DP14_SINKCTS_DSC_VM_T_9"])
|
||||
|
||||
self.__7680_x_4320_60_id = Param(json_obj["TSI_DP14_SINKCTS_DSC_VM_10"])
|
||||
self.__7680_x_4320_60 = Timing(timing_data=json_obj["TSI_DP14_SINKCTS_DSC_VM_T_10"])
|
||||
|
||||
self.__7680_x_4320_100_id = Param(json_obj["TSI_DP14_SINKCTS_DSC_VM_11"])
|
||||
self.__7680_x_4320_100 = Timing(timing_data=json_obj["TSI_DP14_SINKCTS_DSC_VM_T_11"])
|
||||
|
||||
@property
|
||||
def T_1920_x_1080_30(self) -> Timing:
|
||||
"""
|
||||
Set and get 1920x1080 30Hz timing.
|
||||
|
||||
Returns:
|
||||
object of `Timing` type
|
||||
"""
|
||||
return self.__1920_x_1080_30
|
||||
|
||||
@T_1920_x_1080_30.setter
|
||||
def T_1920_x_1080_30(self, _1920_x_1080_30: Timing):
|
||||
self.__1920_x_1080_30 = _1920_x_1080_30
|
||||
|
||||
@property
|
||||
def T_1920_x_1080_60(self) -> Timing:
|
||||
"""
|
||||
Set and get 1920x1080 60Hz timing.
|
||||
|
||||
Returns:
|
||||
object of `Timing` type
|
||||
"""
|
||||
return self.__1920_x_1080_60
|
||||
|
||||
@T_1920_x_1080_60.setter
|
||||
def T_1920_x_1080_60(self, _1920_x_1080_60: Timing):
|
||||
self.__1920_x_1080_60 = _1920_x_1080_60
|
||||
|
||||
@property
|
||||
def T_1920_x_1080_120(self) -> Timing:
|
||||
"""
|
||||
Set and get 1920x1080 120Hz timing.
|
||||
|
||||
Returns:
|
||||
object of `Timing` type
|
||||
"""
|
||||
return self.__1920_x_1080_120
|
||||
|
||||
@T_1920_x_1080_120.setter
|
||||
def T_1920_x_1080_120(self, _1920_x_1080_120: Timing):
|
||||
self.__1920_x_1080_120 = _1920_x_1080_120
|
||||
|
||||
@property
|
||||
def T_3840_x_2160_30(self) -> Timing:
|
||||
"""
|
||||
Set and get 3840x2160 30Hz timing.
|
||||
|
||||
Returns:
|
||||
object of `Timing` type
|
||||
"""
|
||||
return self.__3840_x_2160_30
|
||||
|
||||
@T_3840_x_2160_30.setter
|
||||
def T_3840_x_2160_30(self, _3840_x_2160_30: Timing):
|
||||
self.__3840_x_2160_30 = _3840_x_2160_30
|
||||
|
||||
@property
|
||||
def T_3840_x_2160_60(self) -> Timing:
|
||||
"""
|
||||
Set and get 3840x2160 60Hz timing.
|
||||
|
||||
Returns:
|
||||
object of `Timing` type
|
||||
"""
|
||||
return self.__3840_x_2160_60
|
||||
|
||||
@T_3840_x_2160_60.setter
|
||||
def T_3840_x_2160_60(self, _3840_x_2160_60: Timing):
|
||||
self.__3840_x_2160_60 = _3840_x_2160_60
|
||||
|
||||
@property
|
||||
def T_3840_x_2160_120(self) -> Timing:
|
||||
"""
|
||||
Set and get 3840x2160 120Hz timing.
|
||||
|
||||
Returns:
|
||||
object of `Timing` type
|
||||
"""
|
||||
return self.__3840_x_2160_120
|
||||
|
||||
@T_3840_x_2160_120.setter
|
||||
def T_3840_x_2160_120(self, _3840_x_2160_120: Timing):
|
||||
self.__3840_x_2160_120 = _3840_x_2160_120
|
||||
|
||||
@property
|
||||
def T_5120_x_2160_30(self) -> Timing:
|
||||
"""
|
||||
Set and get 5120x2160 30Hz timing.
|
||||
|
||||
Returns:
|
||||
object of `Timing` type
|
||||
"""
|
||||
return self.__5120_x_2160_30
|
||||
|
||||
@T_5120_x_2160_30.setter
|
||||
def T_5120_x_2160_30(self, _5120_x_2160_30: Timing):
|
||||
self.__15120_x_2160_30 = _5120_x_2160_30
|
||||
|
||||
@property
|
||||
def T_5120_x_2160_60(self) -> Timing:
|
||||
"""
|
||||
Set and get 5120x2160 60Hz timing.
|
||||
|
||||
Returns:
|
||||
object of `Timing` type
|
||||
"""
|
||||
return self.__5120_x_2160_60
|
||||
|
||||
@T_5120_x_2160_60.setter
|
||||
def T_5120_x_2160_60(self, _5120_x_2160_60: Timing):
|
||||
self.__5120_x_2160_60 = _5120_x_2160_60
|
||||
|
||||
@property
|
||||
def T_5120_x_2160_120(self) -> Timing:
|
||||
"""
|
||||
Set and get 5120x2160 120Hz timing.
|
||||
|
||||
Returns:
|
||||
object of `Timing` type
|
||||
"""
|
||||
return self.__5120_x_2160_120
|
||||
|
||||
@T_5120_x_2160_120.setter
|
||||
def T_5120_x_2160_120(self, _5120_x_2160_120: Timing):
|
||||
self.__5120_x_2160_120 = _5120_x_2160_120
|
||||
|
||||
@property
|
||||
def T_7680_x_4320_30(self) -> Timing:
|
||||
"""
|
||||
Set and get 7680x4320 30Hz timing.
|
||||
|
||||
Returns:
|
||||
object of `Timing` type
|
||||
"""
|
||||
return self.__7680_x_4320_30
|
||||
|
||||
@T_7680_x_4320_30.setter
|
||||
def T_7680_x_4320_30(self, _7680_x_4320_30: Timing):
|
||||
self.__7680_x_4320_30 = _7680_x_4320_30
|
||||
|
||||
@property
|
||||
def T_7680_x_4320_60(self) -> Timing:
|
||||
"""
|
||||
Set and get 7680x4320 60Hz timing.
|
||||
|
||||
Returns:
|
||||
object of `Timing` type
|
||||
"""
|
||||
return self.__7680_x_4320_60
|
||||
|
||||
@T_7680_x_4320_60.setter
|
||||
def T_7680_x_4320_60(self, _7680_x_4320_60: Timing):
|
||||
self.__7680_x_4320_60 = _7680_x_4320_60
|
||||
|
||||
@property
|
||||
def T_7680_x_4320_100(self) -> Timing:
|
||||
"""
|
||||
Set and get 7680x4320 100Hz timing.
|
||||
|
||||
Returns:
|
||||
object of `Timing` type
|
||||
"""
|
||||
return self.__7680_x_4320_100
|
||||
|
||||
@T_7680_x_4320_100.setter
|
||||
def T_7680_x_4320_100(self, _7680_x_4320_100: Timing):
|
||||
self.__7680_x_4320_100 = _7680_x_4320_100
|
||||
|
||||
|
||||
class ConfigVideoMode1LaneParam:
|
||||
"""
|
||||
Class `ConfigVideoMode1LaneParam` defines support for video mode for 1 lane and allows settings values.
|
||||
- CVT 1280x800 `cvt_1280x800`.
|
||||
- DMT 1280x768 `dmt_1280x768`.
|
||||
- DMT 800x600 `dmt_800x600`.
|
||||
- DMT 1024x768 `dmt_1024x768`.
|
||||
- CTA 1440x480 `cta_1440x480`.
|
||||
- CTA 1440x576 `cta_1440x576`.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__cvt_1280x800 = Param(json_obj["TSI_DP14_SINKCTS_VIDEO_MODE_0"])
|
||||
self.__dmt_1280x768 = Param(json_obj["TSI_DP14_SINKCTS_VIDEO_MODE_1"])
|
||||
self.__dmt_800x600 = Param(json_obj["TSI_DP14_SINKCTS_VIDEO_MODE_2"])
|
||||
self.__dmt_1024x768 = Param(json_obj["TSI_DP14_SINKCTS_VIDEO_MODE_3"])
|
||||
self.__cta_1440x480 = Param(json_obj["TSI_DP14_SINKCTS_VIDEO_MODE_14"])
|
||||
self.__cta_1440x576 = Param(json_obj["TSI_DP14_SINKCTS_VIDEO_MODE_15"])
|
||||
|
||||
@property
|
||||
def cvt_1280x800(self) -> bool:
|
||||
"""
|
||||
Set and get CVT 1280x800 timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__cvt_1280x800.default_value
|
||||
|
||||
@cvt_1280x800.setter
|
||||
def cvt_1280x800(self, cvt_1280x800: bool):
|
||||
self.__cvt_1280x800.default_value = cvt_1280x800
|
||||
|
||||
@property
|
||||
def dmt_1280x768(self) -> bool:
|
||||
"""
|
||||
Set and get DMT 1280x768 timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__dmt_1280x768.default_value
|
||||
|
||||
@dmt_1280x768.setter
|
||||
def dmt_1280x768(self, dmt_1280x768: bool):
|
||||
self.__dmt_1280x768.default_value = dmt_1280x768
|
||||
|
||||
@property
|
||||
def dmt_800x600(self) -> bool:
|
||||
"""
|
||||
Set and get DMT 800x600 timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__dmt_800x600.default_value
|
||||
|
||||
@dmt_800x600.setter
|
||||
def dmt_800x600(self, dmt_800x600: bool):
|
||||
self.__dmt_800x600.default_value = dmt_800x600
|
||||
|
||||
@property
|
||||
def dmt_1024x768(self) -> bool:
|
||||
"""
|
||||
Set and get DMT 1024x768 timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__dmt_1024x768.default_value
|
||||
|
||||
@dmt_1024x768.setter
|
||||
def dmt_1024x768(self, dmt_1024x768: bool):
|
||||
self.__dmt_1024x768.default_value = dmt_1024x768
|
||||
|
||||
@property
|
||||
def cta_1440x480(self) -> bool:
|
||||
"""
|
||||
Set and get CTA 1440x480 timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__cta_1440x480.default_value
|
||||
|
||||
@cta_1440x480.setter
|
||||
def cta_1440x480(self, cta_1440x480: bool):
|
||||
self.__cta_1440x480.default_value = cta_1440x480
|
||||
|
||||
@property
|
||||
def cta_1440x576(self) -> bool:
|
||||
"""
|
||||
Set and get CTA 1440x576 timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__cta_1440x576.default_value
|
||||
|
||||
@cta_1440x576.setter
|
||||
def cta_1440x576(self, cta_1440x576: bool):
|
||||
self.__cta_1440x576.default_value = cta_1440x576
|
||||
|
||||
|
||||
class ConfigVideoMode2LaneParam:
|
||||
"""
|
||||
Class `ConfigVideoMode2LaneParam` defines support for video mode for 2 lane and allows settings values.
|
||||
- DMT 1280x1024 `dmt_1280x1024`.
|
||||
- DMT 1280x960 `dmt_1280x960`.
|
||||
- DMT 1360x768 `dmt_1360x768`.
|
||||
- CVT 1280x800 `cvt_1280x800`.
|
||||
- DMT 1400x1050 `dmt_1400x1050`.
|
||||
- DMT 1280x768 `dmt_1280x768`.
|
||||
- CVT 1600x1200 `cvt_1600x1200`
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__dmt_1280x1024 = Param(json_obj["TSI_DP14_SINKCTS_VIDEO_MODE_4"])
|
||||
self.__dmt_1280x960 = Param(json_obj["TSI_DP14_SINKCTS_VIDEO_MODE_5"])
|
||||
self.__dmt_1360x768 = Param(json_obj["TSI_DP14_SINKCTS_VIDEO_MODE_6"])
|
||||
self.__cvt_1280x800 = Param(json_obj["TSI_DP14_SINKCTS_VIDEO_MODE_7"])
|
||||
self.__dmt_1400x1050 = Param(json_obj["TSI_DP14_SINKCTS_VIDEO_MODE_8"])
|
||||
self.__dmt_1280x768 = Param(json_obj["TSI_DP14_SINKCTS_VIDEO_MODE_9"])
|
||||
self.__cvt_1600x1200 = Param(json_obj["TSI_DP14_SINKCTS_VIDEO_MODE_10"])
|
||||
|
||||
@property
|
||||
def dmt_1280x1024(self) -> bool:
|
||||
"""
|
||||
Set and get DMT 1280x1024 timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__dmt_1280x1024.default_value
|
||||
|
||||
@dmt_1280x1024.setter
|
||||
def dmt_1280x1024(self, dmt_1280x1024: bool):
|
||||
self.__dmt_1280x1024.default_value = dmt_1280x1024
|
||||
|
||||
@property
|
||||
def dmt_1280x960(self) -> bool:
|
||||
"""
|
||||
Set and get DMT 1280x960 timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__dmt_1280x960.default_value
|
||||
|
||||
@dmt_1280x960.setter
|
||||
def dmt_1280x960(self, dmt_1280x960: bool):
|
||||
self.__dmt_1280x960.default_value = dmt_1280x960
|
||||
|
||||
@property
|
||||
def dmt_1360x768(self) -> bool:
|
||||
"""
|
||||
Set and get DMT 1360x768 timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__dmt_1360x768.default_value
|
||||
|
||||
@dmt_1360x768.setter
|
||||
def dmt_1360x768(self, dmt_1360x768: bool):
|
||||
self.__dmt_1360x768.default_value = dmt_1360x768
|
||||
|
||||
@property
|
||||
def cvt_1280x800(self) -> bool:
|
||||
"""
|
||||
Set and get CVT 1280x800 timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__cvt_1280x800.default_value
|
||||
|
||||
@cvt_1280x800.setter
|
||||
def cvt_1280x800(self, cvt_1280x800: bool):
|
||||
self.__cvt_1280x800.default_value = cvt_1280x800
|
||||
|
||||
@property
|
||||
def dmt_1400x1050(self) -> bool:
|
||||
"""
|
||||
Set and get DMT 1400x1050 timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__dmt_1400x1050.default_value
|
||||
|
||||
@dmt_1400x1050.setter
|
||||
def dmt_1400x1050(self, dmt_1400x1050: bool):
|
||||
self.__dmt_1400x1050.default_value = dmt_1400x1050
|
||||
|
||||
@property
|
||||
def dmt_1280x768(self) -> bool:
|
||||
"""
|
||||
Set and get DMT 1280x768 timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__dmt_1280x768.default_value
|
||||
|
||||
@dmt_1280x768.setter
|
||||
def dmt_1280x768(self, dmt_1280x768: bool):
|
||||
self.__dmt_1280x768.default_value = dmt_1280x768
|
||||
|
||||
@property
|
||||
def cvt_1600x1200(self) -> bool:
|
||||
"""
|
||||
Set and get CVT 1600x1200 timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__cvt_1600x1200.default_value
|
||||
|
||||
@cvt_1600x1200.setter
|
||||
def cvt_1600x1200(self, cvt_1600x1200: bool):
|
||||
self.__cvt_1600x1200.default_value = cvt_1600x1200
|
||||
|
||||
|
||||
class ConfigVideoMode4LaneParam:
|
||||
"""
|
||||
Class `ConfigVideoMode4LaneParam` defines support for video mode for 4 lane and allows settings values.
|
||||
- CVT 2048x1536 `cvt_2048x1536`.
|
||||
- DMT 1792x1344 `dmt_1792x1344`.
|
||||
- DMT 1600x1200 `dmt_1600x1200`.
|
||||
- CTA 1920x1080 `cta_1920x1080`.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__cvt_2048x1536 = Param(json_obj["TSI_DP14_SINKCTS_VIDEO_MODE_11"])
|
||||
self.__dmt_1792x1344 = Param(json_obj["TSI_DP14_SINKCTS_VIDEO_MODE_12"])
|
||||
self.__dmt_1600x1200 = Param(json_obj["TSI_DP14_SINKCTS_VIDEO_MODE_13"])
|
||||
self.__cta_1920x1080 = Param(json_obj["TSI_DP14_SINKCTS_VIDEO_MODE_16"])
|
||||
|
||||
@property
|
||||
def cvt_2048x1536(self) -> bool:
|
||||
"""
|
||||
Set and get CVT 2048x1536 timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__cvt_2048x1536.default_value
|
||||
|
||||
@cvt_2048x1536.setter
|
||||
def cvt_2048x1536(self, cvt_2048x1536: bool):
|
||||
self.__cvt_2048x1536.default_value = cvt_2048x1536
|
||||
|
||||
@property
|
||||
def dmt_1792x1344(self) -> bool:
|
||||
"""
|
||||
Set and get DMT 1792x1344 timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__dmt_1792x1344.default_value
|
||||
|
||||
@dmt_1792x1344.setter
|
||||
def dmt_1792x1344(self, dmt_1792x1344: bool):
|
||||
self.__dmt_1792x1344.default_value = dmt_1792x1344
|
||||
|
||||
@property
|
||||
def dmt_1600x1200(self) -> bool:
|
||||
"""
|
||||
Set and get DMT 1600x1200 timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__dmt_1600x1200.default_value
|
||||
|
||||
@dmt_1600x1200.setter
|
||||
def dmt_1600x1200(self, dmt_1600x1200: bool):
|
||||
self.__dmt_1600x1200.default_value = dmt_1600x1200
|
||||
|
||||
@property
|
||||
def cta_1920x1080(self) -> bool:
|
||||
"""
|
||||
Set and get CTA 1920x1080 timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__cta_1920x1080.default_value
|
||||
|
||||
@cta_1920x1080.setter
|
||||
def cta_1920x1080(self, cta_1920x1080: bool):
|
||||
self.__cta_1920x1080.default_value = cta_1920x1080
|
||||
|
||||
|
||||
class Dp14SinkTestParam:
|
||||
"""
|
||||
Class `Dp14SinkTestParam` allows working with parameters for Sink DP 1.4 LLCTS tests.
|
||||
- Set and get test timeout, in milliseconds `timeout`.
|
||||
- Set and get DSC timings `timings` type `Dp14SinkTimings`.
|
||||
- Set and get capabilities of DSC video mode `dsc_video_mode`.
|
||||
- Set and get bitstream type `bitstream` - type `BitStream`.
|
||||
- Set and get packed source `packed_source` - type `PackedSource`.
|
||||
- Set and get configuration of video modes for 1 lane `config_video_mode_1_lane` type `ConfigVideoMode1LaneParam`.
|
||||
- Set and get configuration of video modes for 2 lane `config_video_mode_2_lane` type `ConfigVideoMode2LaneParam`.
|
||||
- Set and get configuration of video modes for 4 lane `config_video_mode_4_lane` type `ConfigVideoMode4LaneParam`.
|
||||
- Set and get flag of display id visual `display_id_visual` type `DisplayIdVisualCheck`.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__timeout = Param(json_obj["TSI_DP14_SINKCTS_TIMEOUT"])
|
||||
self.__timings = Dp14SinkTimings(json_obj)
|
||||
self.__dsc_video_mode = Param(json_obj["TSI_DP14_SINKCTS_DSC_SOURCE"]) # PackedSource
|
||||
self.__bitstream = Param(json_obj["TSI_DP14_SINKCTS_SUPPORT_444CRC"]) # BitStream
|
||||
self.__packed_source = Param(json_obj["TSI_DP14_SINKCTS_PACKET_SOURCE"]) # PackedSource
|
||||
self.__config_video_mode_1_lane = ConfigVideoMode1LaneParam(json_obj)
|
||||
self.__config_video_mode_2_lane = ConfigVideoMode2LaneParam(json_obj)
|
||||
self.__config_video_mode_4_lane = ConfigVideoMode4LaneParam(json_obj)
|
||||
self.__display_id_visual = Param(json_obj["TSI_DP14_SINKCTS_VISUAL_TEST_CHECK"])
|
||||
|
||||
@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 timings(self):
|
||||
"""
|
||||
Set and get timings.
|
||||
|
||||
Returns:
|
||||
object `Dp14SinkTimings`
|
||||
"""
|
||||
return self.__timings
|
||||
|
||||
@timings.setter
|
||||
def timings(self, timings: Dp14SinkTimings):
|
||||
self.__timings = timings
|
||||
|
||||
@property
|
||||
def dsc_video_mode(self) -> PackedSource:
|
||||
"""
|
||||
Set and get dsc video packed source.
|
||||
|
||||
Returns:
|
||||
object `PackedSource`
|
||||
"""
|
||||
return PackedSource(self.__dsc_video_mode.default_value)
|
||||
|
||||
@dsc_video_mode.setter
|
||||
def dsc_video_mode(self, dsc_video_mode: PackedSource):
|
||||
self.__dsc_video_mode.default_value = dsc_video_mode.value
|
||||
|
||||
@property
|
||||
def bitstream(self) -> BitStream:
|
||||
"""
|
||||
Set and get bitstream.
|
||||
|
||||
Returns:
|
||||
object `BitStream`
|
||||
"""
|
||||
return BitStream(self.__bitstream.default_value)
|
||||
|
||||
@bitstream.setter
|
||||
def bitstream(self, bitstream: BitStream):
|
||||
self.__bitstream.default_value = bitstream.value
|
||||
|
||||
@property
|
||||
def packed_source(self) -> PackedSource:
|
||||
"""
|
||||
Set and get packed source.
|
||||
|
||||
Returns:
|
||||
object `PackedSource`
|
||||
"""
|
||||
return PackedSource(self.__packed_source.default_value)
|
||||
|
||||
@packed_source.setter
|
||||
def packed_source(self, packed_source: PackedSource):
|
||||
self.__packed_source.default_value = packed_source.value
|
||||
|
||||
@property
|
||||
def config_video_mode_1_lane(self):
|
||||
"""
|
||||
Set and get configuration of video modes for 1 lane.
|
||||
|
||||
Returns:
|
||||
object `ConfigVideoMode1LaneParam`
|
||||
"""
|
||||
return self.__config_video_mode_1_lane
|
||||
|
||||
@config_video_mode_1_lane.setter
|
||||
def config_video_mode_1_lane(self, config_video_mode_1_lane: ConfigVideoMode1LaneParam):
|
||||
self.__config_video_mode_1_lane = config_video_mode_1_lane
|
||||
|
||||
@property
|
||||
def config_video_mode_2_lane(self):
|
||||
"""
|
||||
Set and get configuration of video modes for 2 lane.
|
||||
|
||||
Returns:
|
||||
object `ConfigVideoMode2LaneParam`
|
||||
"""
|
||||
return self.__config_video_mode_2_lane
|
||||
|
||||
@config_video_mode_2_lane.setter
|
||||
def config_video_mode_2_lane(self, config_video_mode_2_lane: ConfigVideoMode2LaneParam):
|
||||
self.__config_video_mode_2_lane = config_video_mode_2_lane
|
||||
|
||||
@property
|
||||
def config_video_mode_4_lane(self):
|
||||
"""
|
||||
Set and get configuration of video modes for 4 lane.
|
||||
|
||||
Returns:
|
||||
object `ConfigVideoMode4LaneParam`
|
||||
"""
|
||||
return self.__config_video_mode_4_lane
|
||||
|
||||
@config_video_mode_4_lane.setter
|
||||
def config_video_mode_4_lane(self, config_video_mode_4_lane: ConfigVideoMode4LaneParam):
|
||||
self.__config_video_mode_4_lane = config_video_mode_4_lane
|
||||
|
||||
@property
|
||||
def display_id_visual(self) -> DisplayIdVisualCheck:
|
||||
"""
|
||||
Set and get flag of visual check in Display ID.
|
||||
|
||||
Returns:
|
||||
object `DisplayIdVisualCheck`
|
||||
"""
|
||||
return DisplayIdVisualCheck(self.__display_id_visual.default_value)
|
||||
|
||||
@display_id_visual.setter
|
||||
def display_id_visual(self, display_id_visual: DisplayIdVisualCheck):
|
||||
self.__display_id_visual.default_value = display_id_visual
|
||||
@@ -0,0 +1,73 @@
|
||||
from UniTAP.dev.modules.dut_tests.dut_default_params.dp_1_4_source_general_tab import GeneralSourceDUTDp14SettingTab, \
|
||||
PackedTimings1Lane, PackedTimings2Lane, PackedTimings4Lane, EventIndication
|
||||
from UniTAP.dev.modules.dut_tests.dut_default_params.dp_source_audio_tab import AudioSourceDp14SettingTab
|
||||
from UniTAP.dev.modules.dut_tests.dut_default_params.dp_source_dsc_tab import DscConfigDp14Tab
|
||||
from UniTAP.dev.modules.dut_tests.dut_default_params.dp_source_display_id_tab import DisplayIdDp14ConfigTab
|
||||
from UniTAP.dev.modules.dut_tests.dut_default_params.dp_source_adaptive_sync_tab import AdaptiveSyncDp14ConfigTab
|
||||
|
||||
|
||||
class Dp14SourceDUTTestParam:
|
||||
"""
|
||||
Class `Dp14SourceDUTTestParam` allows working with default group of parameters for DP 1.4 LLCTS tests:
|
||||
- Set and get `GeneralSourceDUTDp14SettingTab`. Allows working with parameters from General source part `general`.
|
||||
- Set and get `AudioSourceDp14SettingTab`. Allows working with parameters from Audio source part `audio`.
|
||||
- Set and get `DscConfigDp14Tab`. Allows working with parameters from DSC part `dsc`.
|
||||
- Set and get `DisplayIdDp14ConfigTab`. Allows working with parameters from Display ID part `display_id`.
|
||||
- Set and get `AdaptiveSyncDp14ConfigTab`. Allows working with parameters from Adaptive-Sync part `adaptive_sync`.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__general_tab = GeneralSourceDUTDp14SettingTab(json_obj)
|
||||
self.__audio_tab = AudioSourceDp14SettingTab(json_obj)
|
||||
self.__dsc_tab = DscConfigDp14Tab(json_obj)
|
||||
self.__display_id_tab = DisplayIdDp14ConfigTab(json_obj)
|
||||
self.__adaptive_sync_tab = AdaptiveSyncDp14ConfigTab(json_obj)
|
||||
|
||||
@property
|
||||
def general(self) -> GeneralSourceDUTDp14SettingTab:
|
||||
"""
|
||||
Get object of parameters from General source part.
|
||||
|
||||
Returns:
|
||||
object of `GeneralSourceDUTDp14SettingTab` type
|
||||
"""
|
||||
return self.__general_tab
|
||||
|
||||
@property
|
||||
def audio(self) -> AudioSourceDp14SettingTab:
|
||||
"""
|
||||
Get object of parameters from Audio source part.
|
||||
|
||||
Returns:
|
||||
object of `AudioSourceDp14SettingTab` type
|
||||
"""
|
||||
return self.__audio_tab
|
||||
|
||||
@property
|
||||
def dsc(self) -> DscConfigDp14Tab:
|
||||
"""
|
||||
Get object of parameters from DSC source part.
|
||||
|
||||
Returns:
|
||||
object of `DscConfigDp14Tab` type
|
||||
"""
|
||||
return self.__dsc_tab
|
||||
|
||||
@property
|
||||
def display_id(self) -> DisplayIdDp14ConfigTab:
|
||||
"""
|
||||
Get object of parameters from Display ID source part.
|
||||
|
||||
Returns:
|
||||
object of `DisplayIdDp14ConfigTab` type
|
||||
"""
|
||||
return self.__display_id_tab
|
||||
|
||||
@property
|
||||
def adaptive_sync(self) -> AdaptiveSyncDp14ConfigTab:
|
||||
"""
|
||||
Get object of parameters from Adaptive-Sync source part.
|
||||
|
||||
Returns:
|
||||
object of `AdaptiveSyncDp14ConfigTab` type
|
||||
"""
|
||||
return self.__adaptive_sync_tab
|
||||
@@ -0,0 +1,355 @@
|
||||
from enum import IntEnum
|
||||
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
|
||||
from UniTAP.dev.modules.dut_tests.test_utils import update_default_value
|
||||
|
||||
|
||||
class BitStream(IntEnum):
|
||||
"""
|
||||
Describes available values for bit stream.
|
||||
Sink DUT support 444 CRC for Simple 422 bitstream
|
||||
"""
|
||||
YCbCr422 = 0
|
||||
YCbCr444 = 1
|
||||
|
||||
|
||||
class PackedSource(IntEnum):
|
||||
"""
|
||||
Describes available values for packer source.
|
||||
Source of the most packet video modes table.
|
||||
"""
|
||||
UseTestConfig = 0
|
||||
UseSinkDutEdid = 1
|
||||
|
||||
|
||||
class VisualCheck(IntEnum):
|
||||
"""
|
||||
Describes available values for visual check during DisplayID CTS tests.
|
||||
"""
|
||||
NeverSkip = 0
|
||||
SkipIfCrcMatches = 1
|
||||
|
||||
|
||||
class StandardBase:
|
||||
|
||||
__rate_shift_rb1 = {30: 1, 60: 4, 120: 7, 144: 9, 240: 12}
|
||||
__rate_shift_rb2 = {30: 2, 60: 5, 120: 8, 144: 10, 240: 13}
|
||||
|
||||
def __init__(self, value: Param, rate: int):
|
||||
self._value = value
|
||||
self._rate = rate
|
||||
|
||||
@property
|
||||
def rb1(self) -> bool:
|
||||
"""
|
||||
Set and get RB1 flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._value.default_value & self._value.bit_field_list[self.__rate_shift_rb1.get(self._rate)].mask != 0
|
||||
|
||||
@rb1.setter
|
||||
def rb1(self, value: bool):
|
||||
self._value._set_by_bit_number(value, 1, self.__rate_shift_rb1.get(self._rate))
|
||||
|
||||
@property
|
||||
def rb2(self) -> bool:
|
||||
"""
|
||||
Set and get RB2 flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._value.default_value & self._value.bit_field_list[self.__rate_shift_rb2.get(self._rate)].mask != 0
|
||||
|
||||
@rb2.setter
|
||||
def rb2(self, value: bool):
|
||||
self._value._set_by_bit_number(value, 1, self.__rate_shift_rb2.get(self._rate))
|
||||
|
||||
|
||||
class Rate30Hz(StandardBase):
|
||||
|
||||
__rate_shift_cta = {30: 0, 60: 3, 120: 6}
|
||||
|
||||
def __init__(self, value: Param, rate: int):
|
||||
super().__init__(value, rate)
|
||||
|
||||
@property
|
||||
def cta(self) -> bool:
|
||||
"""
|
||||
Set and get CTA flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._value.default_value & self._value.bit_field_list[self.__rate_shift_cta.get(self._rate)].mask != 0
|
||||
|
||||
@cta.setter
|
||||
def cta(self, value: bool):
|
||||
self._value._set_by_bit_number(value, 1, self.__rate_shift_cta.get(self._rate))
|
||||
|
||||
def set_all(self):
|
||||
self.cta = True
|
||||
self.rb1 = True
|
||||
self.rb2 = True
|
||||
|
||||
def clear_all(self):
|
||||
self.cta = False
|
||||
self.rb1 = False
|
||||
self.rb2 = False
|
||||
|
||||
|
||||
class Rate144Hz(StandardBase):
|
||||
|
||||
__rate_shift_ovt = {144: 11, 240: 14}
|
||||
|
||||
def __init__(self, value: Param, rate: int):
|
||||
super().__init__(value, rate)
|
||||
|
||||
@property
|
||||
def ovt(self) -> bool:
|
||||
"""
|
||||
Set and get OVT flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._value.default_value & self._value.bit_field_list[self.__rate_shift_ovt.get(self._rate)].mask != 0
|
||||
|
||||
@ovt.setter
|
||||
def ovt(self, value: bool):
|
||||
self._value._set_by_bit_number(value, 1, self.__rate_shift_ovt.get(self._rate))
|
||||
|
||||
def set_all(self):
|
||||
self.ovt = True
|
||||
self.rb1 = True
|
||||
self.rb2 = True
|
||||
|
||||
def clear_all(self):
|
||||
self.ovt = False
|
||||
self.rb1 = False
|
||||
self.rb2 = False
|
||||
|
||||
|
||||
class VideoModeInfo:
|
||||
|
||||
def __init__(self, json_obj):
|
||||
self.__value = Param(json_obj)
|
||||
self.__30hz = Rate30Hz(self.__value, 30)
|
||||
self.__60hz = Rate30Hz(self.__value, 60)
|
||||
self.__120hz = Rate30Hz(self.__value, 120)
|
||||
self.__144hz = Rate144Hz(self.__value, 144)
|
||||
self.__240hz = Rate144Hz(self.__value, 240)
|
||||
|
||||
@property
|
||||
def rate_30hz(self) -> Rate30Hz:
|
||||
return self.__30hz
|
||||
|
||||
@property
|
||||
def rate_60hz(self) -> Rate30Hz:
|
||||
return self.__60hz
|
||||
|
||||
@property
|
||||
def rate_120hz(self) -> Rate30Hz:
|
||||
return self.__120hz
|
||||
|
||||
@property
|
||||
def rate_144hz(self) -> Rate144Hz:
|
||||
return self.__144hz
|
||||
|
||||
@property
|
||||
def rate_240hz(self) -> Rate144Hz:
|
||||
return self.__240hz
|
||||
|
||||
def set_all(self):
|
||||
self.rate_30hz.set_all()
|
||||
self.rate_60hz.set_all()
|
||||
self.rate_120hz.set_all()
|
||||
self.rate_144hz.set_all()
|
||||
self.rate_240hz.set_all()
|
||||
|
||||
def clear_all(self):
|
||||
self.rate_30hz.clear_all()
|
||||
self.rate_60hz.clear_all()
|
||||
self.rate_120hz.clear_all()
|
||||
self.rate_144hz.clear_all()
|
||||
self.rate_240hz.clear_all()
|
||||
|
||||
|
||||
class Dp21SinkVideoModes:
|
||||
|
||||
def __init__(self, json_obj):
|
||||
self.__1920x1080 = VideoModeInfo(json_obj["TSI_DP20_SINKCTS_VMT_1920_1080"])
|
||||
self.__3840x2160 = VideoModeInfo(json_obj["TSI_DP20_SINKCTS_VMT_3840_2160"])
|
||||
self.__5120x2160 = VideoModeInfo(json_obj["TSI_DP20_SINKCTS_VMT_5120_2160"])
|
||||
self.__7680x4320 = VideoModeInfo(json_obj["TSI_DP20_SINKCTS_VMT_7680_4320"])
|
||||
self.__10240x4320 = VideoModeInfo(json_obj["TSI_DP20_SINKCTS_VMT_10240_4320"])
|
||||
self.__15360x8640 = VideoModeInfo(json_obj["TSI_DP20_SINKCTS_VMT_15360_8640"])
|
||||
|
||||
@property
|
||||
def vm_1920x1080(self) -> VideoModeInfo:
|
||||
return self.__1920x1080
|
||||
|
||||
@property
|
||||
def vm_3840x2160(self) -> VideoModeInfo:
|
||||
return self.__3840x2160
|
||||
|
||||
@property
|
||||
def vm_5120x2160(self) -> VideoModeInfo:
|
||||
return self.__5120x2160
|
||||
|
||||
@property
|
||||
def vm_7680x4320(self) -> VideoModeInfo:
|
||||
return self.__7680x4320
|
||||
|
||||
@property
|
||||
def vm_10240x4320(self) -> VideoModeInfo:
|
||||
return self.__10240x4320
|
||||
|
||||
@property
|
||||
def vm_15360x8640(self) -> VideoModeInfo:
|
||||
return self.__15360x8640
|
||||
|
||||
def set_all(self):
|
||||
self.vm_1920x1080.set_all()
|
||||
self.vm_3840x2160.set_all()
|
||||
self.vm_5120x2160.set_all()
|
||||
self.vm_7680x4320.set_all()
|
||||
self.vm_10240x4320.set_all()
|
||||
self.vm_15360x8640.set_all()
|
||||
|
||||
def clear_all(self):
|
||||
self.vm_1920x1080.clear_all()
|
||||
self.vm_3840x2160.clear_all()
|
||||
self.vm_5120x2160.clear_all()
|
||||
self.vm_7680x4320.clear_all()
|
||||
self.vm_10240x4320.clear_all()
|
||||
self.vm_15360x8640.clear_all()
|
||||
|
||||
|
||||
class DebugOptions:
|
||||
|
||||
def __init__(self, json_obj):
|
||||
self.__param = Param(json_obj["TSI_DP20_SINKCTS_DEBUG_CONF"])
|
||||
|
||||
@property
|
||||
def force_visual_check(self) -> bool:
|
||||
"""
|
||||
Set and get Force manual visual check flag.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__param._get_by_bitmask(0, bool)
|
||||
|
||||
@force_visual_check.setter
|
||||
def force_visual_check(self, force_visual_check: bool):
|
||||
self.__param.default_value = update_default_value(value=force_visual_check,
|
||||
default_value=self.__param.default_value,
|
||||
mask=self.__param.bit_field_list[0].mask)
|
||||
|
||||
|
||||
class Dp21SinkTestParam:
|
||||
"""
|
||||
Class `Dp21SinkTestParam` allows working with parameters for Sink DP 2.1 LLCTS tests.
|
||||
- Set and get test timeout, in milliseconds `timeout`.
|
||||
- Set and get DSC VideoModeInfo `video_modes ` type `Dp21SinkVideoModes`.
|
||||
- Set and get capabilities of DSC video mode `dsc_video_mode`.
|
||||
- Set and get bitstream type `bitstream` - type `BitStream`.
|
||||
- Set and get flag of display id visual `visual_check` type `VisualCheck`.
|
||||
- Set and get debug options `debug_options` type `DebugOptions`
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__timeout = Param(json_obj["TSI_DP20_SINKCTS_TIMEOUT"])
|
||||
self.__dsc_video_mode = Param(json_obj["TSI_DP20_SINKCTS_DSC_SOURCE"]) # PackedSource
|
||||
self.__bitstream = Param(json_obj["TSI_DP20_SINKCTS_SUPPORT_444CRC"]) # BitStream
|
||||
self.__display_id_visual = Param(json_obj["TSI_DP20_SINKCTS_VISUAL_TEST_CHECK"])
|
||||
self.__video_modes = Dp21SinkVideoModes(json_obj)
|
||||
self.__debug_options = DebugOptions(json_obj)
|
||||
|
||||
@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 dsc_video_mode(self) -> PackedSource:
|
||||
"""
|
||||
Set and get dsc video packed source.
|
||||
|
||||
Returns:
|
||||
object `PackedSource`
|
||||
"""
|
||||
return PackedSource(self.__dsc_video_mode.default_value)
|
||||
|
||||
@dsc_video_mode.setter
|
||||
def dsc_video_mode(self, dsc_video_mode: PackedSource):
|
||||
self.__dsc_video_mode.default_value = dsc_video_mode.value
|
||||
|
||||
@property
|
||||
def bitstream(self) -> BitStream:
|
||||
"""
|
||||
Set and get bitstream.
|
||||
|
||||
Returns:
|
||||
object `BitStream`
|
||||
"""
|
||||
return BitStream(self.__bitstream.default_value)
|
||||
|
||||
@bitstream.setter
|
||||
def bitstream(self, bitstream: BitStream):
|
||||
self.__bitstream.default_value = bitstream.value
|
||||
|
||||
@property
|
||||
def visual_check(self) -> VisualCheck:
|
||||
"""
|
||||
Set and get flag of visual check.
|
||||
|
||||
Returns:
|
||||
object `DisplayIdVisualCheck`
|
||||
"""
|
||||
return VisualCheck(self.__display_id_visual.default_value)
|
||||
|
||||
@visual_check.setter
|
||||
def visual_check(self, display_id_visual: VisualCheck):
|
||||
self.__display_id_visual.default_value = display_id_visual
|
||||
|
||||
@property
|
||||
def video_modes(self) -> Dp21SinkVideoModes:
|
||||
"""
|
||||
Set and get DP 2.1 Sink video modes.
|
||||
|
||||
Returns:
|
||||
object `Dp21SinkVideoModes`
|
||||
"""
|
||||
return self.__video_modes
|
||||
|
||||
@video_modes.setter
|
||||
def video_modes(self, video_modes: Dp21SinkVideoModes):
|
||||
self.__video_modes = video_modes
|
||||
|
||||
@property
|
||||
def debug_options(self) -> DebugOptions:
|
||||
"""
|
||||
Set and get debug options.
|
||||
|
||||
Returns:
|
||||
object of 'DebugOptions' type
|
||||
"""
|
||||
return self.__debug_options
|
||||
|
||||
@debug_options.setter
|
||||
def debug_options(self, debug_config: DebugOptions):
|
||||
self.__debug_options = debug_config
|
||||
@@ -0,0 +1,83 @@
|
||||
from UniTAP.dev.modules.dut_tests.dut_default_params.dp_2_1_source_general_tab import GeneralSourceDUTDp21SettingTab
|
||||
from UniTAP.dev.modules.dut_tests.dut_default_params.dp_source_display_id_tab import DisplayIdDp21ConfigTab
|
||||
from UniTAP.dev.modules.dut_tests.dut_default_params.dp_source_adaptive_sync_tab import AdaptiveSyncDp21ConfigTab
|
||||
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
|
||||
|
||||
|
||||
class Dp21SourceDUTTestParam:
|
||||
"""
|
||||
Class `Dp21SourceDUTTestParam` allows working with default group of parameters for DP 2.1 LLCTS tests:
|
||||
- Set and get `GeneralSourceDUTDp21SettingTab`. Allows working with parameters from General source part `general`.
|
||||
- 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`.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__general_tab = GeneralSourceDUTDp21SettingTab(json_obj)
|
||||
self.__audio_tab = AudioSourceDp21SettingTab(json_obj)
|
||||
self.__display_id_tab = DisplayIdDp21ConfigTab(json_obj)
|
||||
self.__adaptive_sync_tab = AdaptiveSyncDp21ConfigTab(json_obj)
|
||||
self.__video_modes = Dp21AvailableVideoModes(json_obj)
|
||||
self.__dsc_video_modes = Dp21AvailableDscVideoModes(json_obj)
|
||||
|
||||
@property
|
||||
def general(self) -> GeneralSourceDUTDp21SettingTab:
|
||||
"""
|
||||
Get object of parameters from General source part.
|
||||
|
||||
Returns:
|
||||
object of `GeneralSourceDUTDp21SettingTab` type
|
||||
"""
|
||||
return self.__general_tab
|
||||
|
||||
@property
|
||||
def audio(self) -> AudioSourceDp21SettingTab:
|
||||
"""
|
||||
Get object of parameters from Audio source part.
|
||||
|
||||
Returns:
|
||||
object of `AudioSourceDp21SettingTab` type
|
||||
"""
|
||||
return self.__audio_tab
|
||||
|
||||
@property
|
||||
def display_id(self) -> DisplayIdDp21ConfigTab:
|
||||
"""
|
||||
Get object of parameters from Display ID source part.
|
||||
|
||||
Returns:
|
||||
object of `DisplayIdDp21ConfigTab` type
|
||||
"""
|
||||
return self.__display_id_tab
|
||||
|
||||
@property
|
||||
def adaptive_sync(self) -> AdaptiveSyncDp21ConfigTab:
|
||||
"""
|
||||
Get object of parameters from Adaptive-Sync source part.
|
||||
|
||||
Returns:
|
||||
object of `AdaptiveSyncDp21ConfigTab` type
|
||||
"""
|
||||
return self.__adaptive_sync_tab
|
||||
|
||||
@property
|
||||
def video_modes(self) -> Dp21AvailableVideoModes:
|
||||
"""
|
||||
Get object of parameters from Video modes source part.
|
||||
|
||||
Returns:
|
||||
object of `Dp21AvailableVideoModes` type
|
||||
"""
|
||||
return self.__video_modes
|
||||
|
||||
@property
|
||||
def dsc_video_modes(self) -> Dp21AvailableDscVideoModes:
|
||||
"""
|
||||
Get object of parameters from Video modes source part.
|
||||
|
||||
Returns:
|
||||
object of `Dp21AvailableVideoModes` type
|
||||
"""
|
||||
return self.__dsc_video_modes
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,288 @@
|
||||
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
|
||||
|
||||
|
||||
class VideoModeStandard:
|
||||
"""
|
||||
Class `VideoModeStandard` describes available supported timings standard.
|
||||
- CTA `cta` (enable/disable).
|
||||
- DMT `dmt` (enable/disable).
|
||||
- CVT `cvt` (enable/disable).
|
||||
- CVT RB1 `cvt_rb1` (enable/disable).
|
||||
- CVT RB2 `cvt_rb2` (enable/disable).
|
||||
- OVT `ovt` (enable/disable).
|
||||
- Set all standards `set_all`.
|
||||
"""
|
||||
def __init__(self, value: Param):
|
||||
self.__value = value
|
||||
|
||||
@property
|
||||
def cta(self) -> bool:
|
||||
"""
|
||||
Set and get CTA flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__value._get_by_bit_number(0)
|
||||
|
||||
@property
|
||||
def dmt(self) -> bool:
|
||||
"""
|
||||
Set and get DMT flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__value._get_by_bit_number(1)
|
||||
|
||||
@property
|
||||
def cvt(self) -> bool:
|
||||
"""
|
||||
Set and get CVT flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__value._get_by_bit_number(2)
|
||||
|
||||
@property
|
||||
def cvt_rb1(self) -> bool:
|
||||
"""
|
||||
Set and get RB1 flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__value._get_by_bit_number(3)
|
||||
|
||||
@property
|
||||
def cvt_rb2(self) -> bool:
|
||||
"""
|
||||
Set and get RB2 flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__value._get_by_bit_number(4)
|
||||
|
||||
@property
|
||||
def ovt(self) -> bool:
|
||||
"""
|
||||
Set and get OVT flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__value._get_by_bit_number(5)
|
||||
|
||||
@cta.setter
|
||||
def cta(self, value: bool):
|
||||
self.__value._set_by_bit_number(value, 1, 0)
|
||||
|
||||
@dmt.setter
|
||||
def dmt(self, value: bool):
|
||||
self.__value._set_by_bit_number(value, 1, 1)
|
||||
|
||||
@cvt.setter
|
||||
def cvt(self, value: bool):
|
||||
self.__value._set_by_bit_number(value, 1, 2)
|
||||
|
||||
@cvt_rb1.setter
|
||||
def cvt_rb1(self, value: bool):
|
||||
self.__value._set_by_bit_number(value, 1, 3)
|
||||
|
||||
@cvt_rb2.setter
|
||||
def cvt_rb2(self, value: bool):
|
||||
self.__value._set_by_bit_number(value, 1, 4)
|
||||
|
||||
@ovt.setter
|
||||
def ovt(self, value: bool):
|
||||
self.__value._set_by_bit_number(value, 1, 5)
|
||||
|
||||
def set_all(self):
|
||||
self.cta = True
|
||||
self.dmt = True
|
||||
self.cvt = True
|
||||
self.cvt_rb1 = True
|
||||
self.cvt_rb2 = True
|
||||
self.ovt = True
|
||||
|
||||
def clear_all(self):
|
||||
self.cta = False
|
||||
self.dmt = False
|
||||
self.cvt = False
|
||||
self.cvt_rb1 = False
|
||||
self.cvt_rb2 = False
|
||||
self.ovt = False
|
||||
|
||||
|
||||
class ColorimetryModes:
|
||||
"""
|
||||
Class `ColorimetryModes` describes available supported colorimetry.
|
||||
- RGB `rgb` (enable/disable, set bcp).
|
||||
- YCbCr 444 `ycbcr444` (enable/disable, set bcp).
|
||||
- YCbCr 422 `ycbcr422` (enable/disable, set bcp).
|
||||
- YCbCr Simple 422 `ycbcr_simple422` (enable/disable, set bcp).
|
||||
- YCbCr 420 `ycbcr420` (enable/disable, set bcp).
|
||||
"""
|
||||
|
||||
__COLORIMETRY_VALUES = {8: 1, 10: 3, 12: 7, 16: 15}
|
||||
__COLORIMETRY_VALUES_MAP = {0: 0, 1: 8, 3: 10, 7: 12, 15: 16}
|
||||
__AVAILABLE_BPC_VALUES = [0, 8, 10, 12, 16]
|
||||
__STR_AVAILABLE_BPC_VALUES = [f" {_str}" for _str in __AVAILABLE_BPC_VALUES]
|
||||
|
||||
def __init__(self, value: Param):
|
||||
self.__value = value
|
||||
|
||||
@property
|
||||
def rgb(self) -> int:
|
||||
"""
|
||||
Set and get RGB bpc value.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__COLORIMETRY_VALUES_MAP.get((self.__value.default_value >> 12) & 0xF)
|
||||
|
||||
@property
|
||||
def ycbcr444(self) -> int:
|
||||
"""
|
||||
Set and get YCbCr 444 bpc value.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__COLORIMETRY_VALUES_MAP.get((self.__value.default_value >> 16) & 0xF)
|
||||
|
||||
@property
|
||||
def ycbcr422(self) -> int:
|
||||
"""
|
||||
Set and get YCbCr 422 bpc value.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__COLORIMETRY_VALUES_MAP.get((self.__value.default_value >> 20) & 0xF)
|
||||
|
||||
@property
|
||||
def ycbcr_simple422(self) -> int:
|
||||
"""
|
||||
Set and get YCbCr Simple 422 bpc value.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__COLORIMETRY_VALUES_MAP.get((self.__value.default_value >> 24) & 0xF)
|
||||
|
||||
@property
|
||||
def ycbcr420(self) -> int:
|
||||
"""
|
||||
Set and get YCbCr 420 bpc value.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__COLORIMETRY_VALUES_MAP.get((self.__value.default_value >> 28) & 0xF)
|
||||
|
||||
@rgb.setter
|
||||
def rgb(self, value: int):
|
||||
if value not in self.__AVAILABLE_BPC_VALUES:
|
||||
raise ValueError(f'Incorrect input bpc value {value}. '
|
||||
f'Value must be from list:{self.__STR_AVAILABLE_BPC_VALUES}')
|
||||
|
||||
new_value = self.__value.default_value
|
||||
new_value &= ~(0xF << 12)
|
||||
if value == 0:
|
||||
self.__value.default_value = new_value
|
||||
else:
|
||||
new_value |= (self.__COLORIMETRY_VALUES.get(value) << 12)
|
||||
self.__value.default_value = new_value
|
||||
|
||||
@ycbcr444.setter
|
||||
def ycbcr444(self, value: int):
|
||||
if value not in self.__AVAILABLE_BPC_VALUES:
|
||||
raise ValueError(f'Incorrect input bpc value {value}. '
|
||||
f'Value must be from list:{self.__STR_AVAILABLE_BPC_VALUES}')
|
||||
|
||||
new_value = self.__value.default_value
|
||||
new_value &= ~(0xF << 16)
|
||||
if value == 0:
|
||||
self.__value.default_value = new_value
|
||||
else:
|
||||
new_value |= (self.__COLORIMETRY_VALUES.get(value) << 16)
|
||||
self.__value.default_value = new_value
|
||||
|
||||
@ycbcr422.setter
|
||||
def ycbcr422(self, value: int):
|
||||
if value not in self.__AVAILABLE_BPC_VALUES:
|
||||
raise ValueError(f'Incorrect input bpc value {value}. '
|
||||
f'Value must be from list:{self.__STR_AVAILABLE_BPC_VALUES}')
|
||||
|
||||
new_value = self.__value.default_value
|
||||
new_value &= ~(0xF << 20)
|
||||
if value == 0:
|
||||
self.__value.default_value = new_value
|
||||
else:
|
||||
new_value |= (self.__COLORIMETRY_VALUES.get(value) << 20)
|
||||
self.__value.default_value = new_value
|
||||
|
||||
@ycbcr_simple422.setter
|
||||
def ycbcr_simple422(self, value: int):
|
||||
if value not in self.__AVAILABLE_BPC_VALUES:
|
||||
raise ValueError(f'Incorrect input bpc value {value}. '
|
||||
f'Value must be from list:{self.__STR_AVAILABLE_BPC_VALUES}')
|
||||
|
||||
new_value = self.__value.default_value
|
||||
new_value &= ~(0xF << 24)
|
||||
if value == 0:
|
||||
self.__value.default_value = new_value
|
||||
else:
|
||||
new_value |= (self.__COLORIMETRY_VALUES.get(value) << 24)
|
||||
self.__value.default_value = new_value
|
||||
|
||||
@ycbcr420.setter
|
||||
def ycbcr420(self, value: int):
|
||||
if value not in self.__AVAILABLE_BPC_VALUES:
|
||||
raise ValueError(f'Incorrect input bpc value {value}. '
|
||||
f'Value must be from list:{self.__STR_AVAILABLE_BPC_VALUES}')
|
||||
|
||||
new_value = self.__value.default_value
|
||||
new_value &= ~(0xF << 28)
|
||||
if value == 0:
|
||||
self.__value.default_value = new_value
|
||||
else:
|
||||
new_value |= (self.__COLORIMETRY_VALUES.get(value) << 28)
|
||||
self.__value.default_value = new_value
|
||||
|
||||
def set_all(self, bpc: int):
|
||||
if bpc not in self.__AVAILABLE_BPC_VALUES:
|
||||
raise ValueError(f'Incorrect input bpc value {bpc}. '
|
||||
f'Value must be from list:{self.__STR_AVAILABLE_BPC_VALUES}')
|
||||
self.rgb = bpc
|
||||
self.ycbcr444 = bpc
|
||||
self.ycbcr422 = bpc
|
||||
self.ycbcr_simple422 = bpc
|
||||
self.ycbcr420 = bpc
|
||||
|
||||
def clear_all(self):
|
||||
self.rgb = 0
|
||||
self.ycbcr444 = 0
|
||||
self.ycbcr422 = 0
|
||||
self.ycbcr_simple422 = 0
|
||||
self.ycbcr420 = 0
|
||||
|
||||
|
||||
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
|
||||
|
||||
@property
|
||||
def colorimetry(self) -> ColorimetryModes:
|
||||
return self.__colorimetry
|
||||
@@ -0,0 +1,202 @@
|
||||
from UniTAP.dev.modules.dut_tests.dut_default_params.dp_2_1_common_video_modes import VideoModeInfo
|
||||
|
||||
|
||||
class Dp21AvailableDscVideoModes:
|
||||
"""
|
||||
Class `Dp21AvailableDscVideoModes` allows working with video modes.
|
||||
- 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"])
|
||||
self.__1920x1080_144hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_DSC_VMT_1920_1080_144"])
|
||||
self.__1920x1080_240hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_DSC_VMT_1920_1080_240"])
|
||||
self.__3840x2160_30hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_DSC_VMT_3840_2160_30"])
|
||||
self.__3840x2160_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_DSC_VMT_3840_2160_60"])
|
||||
self.__3840x2160_120hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_DSC_VMT_3840_2160_120"])
|
||||
self.__3840x2160_144hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_DSC_VMT_3840_2160_144"])
|
||||
self.__3840x2160_240hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_DSC_VMT_3840_2160_240"])
|
||||
self.__5120x2160_30hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_DSC_VMT_5120_2160_30"])
|
||||
self.__5120x2160_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_DSC_VMT_5120_2160_60"])
|
||||
self.__5120x2160_120hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_DSC_VMT_5120_2160_120"])
|
||||
self.__5120x2160_144hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_DSC_VMT_5120_2160_144"])
|
||||
self.__5120x2160_240hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_DSC_VMT_5120_2160_240"])
|
||||
self.__7680x4320_30hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_DSC_VMT_7680_4320_30"])
|
||||
self.__7680x4320_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_DSC_VMT_7680_4320_60"])
|
||||
self.__7680x4320_120hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_DSC_VMT_7680_4320_120"])
|
||||
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
|
||||
|
||||
@property
|
||||
def vm_1920x1080_60hz(self) -> VideoModeInfo:
|
||||
return self.__1920x1080_60hz
|
||||
|
||||
@property
|
||||
def vm_1920x1080_120hz(self) -> VideoModeInfo:
|
||||
return self.__1920x1080_120hz
|
||||
|
||||
@property
|
||||
def vm_1920x1080_144hz(self) -> VideoModeInfo:
|
||||
return self.__1920x1080_144hz
|
||||
|
||||
@property
|
||||
def vm_1920x1080_240hz(self) -> VideoModeInfo:
|
||||
return self.__1920x1080_240hz
|
||||
|
||||
@property
|
||||
def vm_3840x2160_30hz(self) -> VideoModeInfo:
|
||||
return self.__3840x2160_30hz
|
||||
|
||||
@property
|
||||
def vm_3840x2160_60hz(self) -> VideoModeInfo:
|
||||
return self.__3840x2160_60hz
|
||||
|
||||
@property
|
||||
def vm_3840x2160_120hz(self) -> VideoModeInfo:
|
||||
return self.__3840x2160_120hz
|
||||
|
||||
@property
|
||||
def vm_3840x2160_144hz(self) -> VideoModeInfo:
|
||||
return self.__3840x2160_144hz
|
||||
|
||||
@property
|
||||
def vm_3840x2160_240hz(self) -> VideoModeInfo:
|
||||
return self.__3840x2160_240hz
|
||||
|
||||
@property
|
||||
def vm_5120x2160_30hz(self) -> VideoModeInfo:
|
||||
return self.__5120x2160_30hz
|
||||
|
||||
@property
|
||||
def vm_5120x2160_60hz(self) -> VideoModeInfo:
|
||||
return self.__5120x2160_60hz
|
||||
|
||||
@property
|
||||
def vm_5120x2160_120hz(self) -> VideoModeInfo:
|
||||
return self.__5120x2160_120hz
|
||||
|
||||
@property
|
||||
def vm_5120x2160_144hz(self) -> VideoModeInfo:
|
||||
return self.__5120x2160_144hz
|
||||
|
||||
@property
|
||||
def vm_5120x2160_240hz(self) -> VideoModeInfo:
|
||||
return self.__5120x2160_240hz
|
||||
|
||||
@property
|
||||
def vm_7680x4320_30hz(self) -> VideoModeInfo:
|
||||
return self.__7680x4320_30hz
|
||||
|
||||
@property
|
||||
def vm_7680x4320_60hz(self) -> VideoModeInfo:
|
||||
return self.__7680x4320_60hz
|
||||
|
||||
@property
|
||||
def vm_7680x4320_120hz(self) -> VideoModeInfo:
|
||||
return self.__7680x4320_120hz
|
||||
|
||||
@property
|
||||
def vm_10240x4320_30hz(self) -> VideoModeInfo:
|
||||
return self.__10240x4320_30hz
|
||||
|
||||
@property
|
||||
def vm_10240x4320_60hz(self) -> VideoModeInfo:
|
||||
return self.__10240x4320_60hz
|
||||
|
||||
def select_all_standards(self):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
if isinstance(self.__getattribute__(item), VideoModeInfo):
|
||||
self.__getattribute__(item).standard.set_all()
|
||||
|
||||
def select_all_cta_standard(self):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
if isinstance(self.__getattribute__(item), VideoModeInfo):
|
||||
self.__getattribute__(item).standard.cta = True
|
||||
|
||||
def select_all_dmt_standard(self):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
if isinstance(self.__getattribute__(item), VideoModeInfo):
|
||||
self.__getattribute__(item).standard.dmt = True
|
||||
|
||||
def select_all_cvt_standard(self):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
if isinstance(self.__getattribute__(item), VideoModeInfo):
|
||||
self.__getattribute__(item).standard.cvt = True
|
||||
|
||||
def select_all_cvt_rb1_standard(self):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
if isinstance(self.__getattribute__(item), VideoModeInfo):
|
||||
self.__getattribute__(item).standard.cvt_rb1 = True
|
||||
|
||||
def select_all_cvt_rb2_standard(self):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
if isinstance(self.__getattribute__(item), VideoModeInfo):
|
||||
self.__getattribute__(item).standard.cvt_rb2 = True
|
||||
|
||||
def select_all_ovt_standard(self):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
if isinstance(self.__getattribute__(item), VideoModeInfo):
|
||||
self.__getattribute__(item).standard.ovt = True
|
||||
|
||||
def select_all_colorimetries(self, bpc: int = 8):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
if isinstance(self.__getattribute__(item), VideoModeInfo):
|
||||
self.__getattribute__(item).colorimetry.set_all(bpc)
|
||||
|
||||
def select_all_rgb_colorimetry(self, bpc: int = 8):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
if isinstance(self.__getattribute__(item), VideoModeInfo):
|
||||
self.__getattribute__(item).colorimetry.rgb = bpc
|
||||
|
||||
def select_all_ycbcr444_colorimetry(self, bpc: int = 8):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
if isinstance(self.__getattribute__(item), VideoModeInfo):
|
||||
self.__getattribute__(item).colorimetry.ycbcr444 = bpc
|
||||
|
||||
def select_all_ycbcr422_colorimetry(self, bpc: int = 8):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
if isinstance(self.__getattribute__(item), VideoModeInfo):
|
||||
self.__getattribute__(item).colorimetry.ycbcr422 = bpc
|
||||
|
||||
def select_all_ycbcr_simple422_colorimetry(self, bpc: int = 8):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
if isinstance(self.__getattribute__(item), VideoModeInfo):
|
||||
self.__getattribute__(item).colorimetry.ycbcr_simple422 = bpc
|
||||
|
||||
def select_all_ycbcr420_colorimetry(self, bpc: int = 8):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
if isinstance(self.__getattribute__(item), VideoModeInfo):
|
||||
self.__getattribute__(item).colorimetry.ycbcr420 = bpc
|
||||
|
||||
def clear_all(self):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
if isinstance(self.__getattribute__(item), VideoModeInfo):
|
||||
self.__getattribute__(item).colorimetry.clear_all()
|
||||
self.__getattribute__(item).standard.clear_all()
|
||||
@@ -0,0 +1,758 @@
|
||||
from UniTAP.dev.modules.dut_tests.dut_default_params.dp_1_4_source_general_tab import DutCapsFlags,\
|
||||
update_default_value, Param, IntEnum, TestAutomationFlags
|
||||
|
||||
|
||||
class MaxLinkBwPolicy(IntEnum):
|
||||
"""
|
||||
Describes available values for maximum link bandwidth policy.
|
||||
"""
|
||||
Link1LRBR = 262
|
||||
Link1LHBR = 266
|
||||
Link2LRBR = 518
|
||||
Link2LHBR = 522
|
||||
|
||||
|
||||
class TestAutomationFlagsDP21(TestAutomationFlags):
|
||||
"""
|
||||
Class `TestAutomationFlagsDP21` allows configuring test automation flags:
|
||||
- Set and get video operator input flag `video_operator_input`.
|
||||
- Set and get DSC VIC flag `dsc_vis_val`.
|
||||
|
||||
Also has all the `TestAutomationFlags` functionality.
|
||||
"""
|
||||
|
||||
@property
|
||||
def video_operator_input(self) -> bool:
|
||||
"""
|
||||
Set and get video operator input flag.
|
||||
If flag == true -> If Source DUT does not generate the requested format then GUI request will be made to
|
||||
operator to generate the requested format from the EDID (request and waits for test operator input).
|
||||
If flag == false -> If Source DUT does not generate the requested Video Format, then no GUI request will be
|
||||
made, and test will fail if parameters does not match (request and waits for test operator input).
|
||||
|
||||
Usually use for manual testing.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._param._get_by_bitmask(5, bool)
|
||||
|
||||
@video_operator_input.setter
|
||||
def video_operator_input(self, video_operator_input: bool):
|
||||
self._param._set_by_bitmask(int(video_operator_input), 5)
|
||||
|
||||
@property
|
||||
def dsc_vis_val(self) -> bool:
|
||||
"""
|
||||
Set and get DSC visual validation flag.
|
||||
If flag == true -> will check timing, color depth, color space and video CRC.
|
||||
If flag == false -> will check timing, color depth, color space without checking video CRC.
|
||||
|
||||
Usually use for manual checking.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._param._get_by_bitmask(6, bool)
|
||||
|
||||
@dsc_vis_val.setter
|
||||
def dsc_vis_val(self, dsc_vis_val: bool):
|
||||
self._param._set_by_bitmask(int(dsc_vis_val), 6)
|
||||
|
||||
|
||||
class LinkRateDp21(Param):
|
||||
"""
|
||||
Class `LinkRateDp21` describes support DP 2.1 rates. Allows getting and setting values.
|
||||
- Support 10 Gbps `support_10Gbps`.
|
||||
- Support 13.5 Gbps `support_13_5Gbps`.
|
||||
- Support 20 Gbps `support_20Gbps`.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
super().__init__(json_obj)
|
||||
|
||||
@property
|
||||
def support_10Gbps(self) -> bool:
|
||||
"""
|
||||
Set and get 10 Gbps flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._get_by_bitmask(0, bool)
|
||||
|
||||
|
||||
@support_10Gbps.setter
|
||||
def support_10Gbps(self, support_10Gbps: bool):
|
||||
self._set_by_bitmask(support_10Gbps, 0)
|
||||
|
||||
@property
|
||||
def support_20Gbps(self) -> bool:
|
||||
"""
|
||||
Set and get 20 Gbps flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._get_by_bitmask(1, bool)
|
||||
|
||||
@support_20Gbps.setter
|
||||
def support_20Gbps(self, support_20Gbps: bool):
|
||||
self._set_by_bitmask(support_20Gbps, 1)
|
||||
|
||||
@property
|
||||
def support_13_5Gbps(self) -> bool:
|
||||
"""
|
||||
Set and get 13.5 Gbps flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._get_by_bitmask(2, bool)
|
||||
|
||||
@support_13_5Gbps.setter
|
||||
def support_13_5Gbps(self, support_13_5Gbps: bool):
|
||||
self._set_by_bitmask(support_13_5Gbps, 2)
|
||||
|
||||
|
||||
class DutCapsDp21Flags(Param):
|
||||
"""
|
||||
Class `DutCapsDp21Flags` inherited of class`DutCapsFlags` which defines the DUT capabilities as flags and allows
|
||||
setting:
|
||||
- Maximum link bandwidth policy supported flag `max_link_bandwidth_policy_supported`.
|
||||
|
||||
Also has all the `DutCapsFlags` functionality.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
super().__init__(json_obj)
|
||||
|
||||
@property
|
||||
def voltage_swing_supported(self) -> bool:
|
||||
"""
|
||||
Set and get Voltage swing level flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._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)
|
||||
|
||||
@property
|
||||
def pre_emphasis_supported(self) -> bool:
|
||||
"""
|
||||
Set and get Pre-emphasis level flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._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)
|
||||
|
||||
@property
|
||||
def fixed_timing_dut_supported(self) -> bool:
|
||||
"""
|
||||
Set and get Fixed timing DUT flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._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)
|
||||
|
||||
@property
|
||||
def spread_spectrum_supported(self) -> bool:
|
||||
"""
|
||||
Set and get Spread Spectrum flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._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)
|
||||
|
||||
@property
|
||||
def change_vf_without_lt_supported(self) -> bool:
|
||||
"""
|
||||
Set and get Video format change without LT flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._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)
|
||||
|
||||
@property
|
||||
def e_ddc_protocol_supported(self) -> bool:
|
||||
"""
|
||||
Set and get E-DDC protocol flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._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)
|
||||
|
||||
@property
|
||||
def audio_transmission_supported(self) -> bool:
|
||||
"""
|
||||
Set and get Audio Info Frame for 2 channel audio transmission flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._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)
|
||||
|
||||
@property
|
||||
def dut_is_type_c_device(self) -> bool:
|
||||
"""
|
||||
Set and get Define that DUT is Type-C device flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._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)
|
||||
|
||||
@property
|
||||
def fec_supported(self) -> bool:
|
||||
"""
|
||||
Set and get FEC flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._get_by_bitmask(8, bool)
|
||||
|
||||
@fec_supported.setter
|
||||
def fec_supported(self, fec_supported: bool):
|
||||
self._set_by_bitmask(fec_supported, 8)
|
||||
|
||||
@property
|
||||
def fec_disable_sequence_supported(self) -> bool:
|
||||
"""
|
||||
Set and get FEC disable sequence flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._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)
|
||||
|
||||
@property
|
||||
def audio_without_video_supported(self) -> bool:
|
||||
"""
|
||||
Set and get Audio without Video flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._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)
|
||||
|
||||
@property
|
||||
def dsc_supported(self) -> bool:
|
||||
"""
|
||||
Set and get DSC flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._get_by_bitmask(11, bool)
|
||||
|
||||
@dsc_supported.setter
|
||||
def dsc_supported(self, dsc_supported: bool):
|
||||
self._set_by_bitmask(dsc_supported, 11)
|
||||
|
||||
@property
|
||||
def dsc_block_prediction_supported(self) -> bool:
|
||||
"""
|
||||
Set and get DSC block prediction flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._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)
|
||||
|
||||
@property
|
||||
def max_link_bandwidth_policy_supported(self):
|
||||
"""
|
||||
Set and get Maximum link bandwidth policy flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._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)
|
||||
|
||||
@property
|
||||
def use_3tap_conversion(self):
|
||||
"""
|
||||
Set and get 3TAP conversion flag using.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._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)
|
||||
|
||||
@property
|
||||
def usb4_tunnel_presented(self):
|
||||
"""
|
||||
Set and get USB4 tunnel presented flag.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._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)
|
||||
|
||||
@property
|
||||
def native_display_id_read(self) -> bool:
|
||||
"""
|
||||
Set and get DUT supports native Display ID read flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._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)
|
||||
|
||||
@property
|
||||
def display_id_vii_supported(self) -> bool:
|
||||
"""
|
||||
Set and get DisplayID Type VII Detailed Timing Descriptor flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._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)
|
||||
|
||||
@property
|
||||
def display_id_viii_supported(self) -> bool:
|
||||
"""
|
||||
Set and get DisplayID Type VIII Detailed Timing Descriptor flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._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)
|
||||
|
||||
|
||||
@property
|
||||
def display_id_ix_supported(self) -> bool:
|
||||
"""
|
||||
Set and get DisplayID Type IX Detailed Timing Descriptor flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._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)
|
||||
|
||||
@property
|
||||
def display_id_x_supported(self) -> bool:
|
||||
"""
|
||||
Set and get DisplayID Type X Detailed Timing Descriptor flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._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)
|
||||
|
||||
@property
|
||||
def display_id_tiled_display_topology(self) -> bool:
|
||||
"""
|
||||
Set and get 2x1 tiled display and DisplayID Tiled Display Topology data block flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._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)
|
||||
|
||||
@property
|
||||
def display_id_tiled_stereo_display(self) -> bool:
|
||||
"""
|
||||
Set and get Field sequential stereo and DisplayID Tiled Stereo Display Interface data block flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._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)
|
||||
|
||||
@property
|
||||
def stacked_frame_stereo_supported(self) -> bool:
|
||||
"""
|
||||
Set and get Stacked frame stereo and DisplayID Tiled Stereo Display Interface data flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._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)
|
||||
|
||||
@property
|
||||
def dynamic_refresh_rate_support(self) -> bool:
|
||||
"""
|
||||
Set and get Dynamic Refresh Rate with VBlank stretch with MSA_TIMING_PAR_IGNORED flag supported.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._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)
|
||||
|
||||
|
||||
class DutCapsDp21:
|
||||
"""
|
||||
Class `DutCapsDp21` defines the DUT capabilities and allows setting:
|
||||
- Defines the maximum number of lanes supported by the DUT `max_lanes`.
|
||||
- Maximum link rate supported by the DUT `max_link_rate`.
|
||||
- Dut capabilities flags `dut_caps_flags` type `DutCapsFlags`.
|
||||
"""
|
||||
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"])
|
||||
|
||||
@property
|
||||
def max_lanes(self) -> int:
|
||||
"""
|
||||
Set and get number of maximum lanes.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__max_lanes.default_value
|
||||
|
||||
@max_lanes.setter
|
||||
def max_lanes(self, max_lanes: int):
|
||||
if max_lanes not in [1, 2, 4]:
|
||||
raise ValueError(f"Max lane count must be from list: 1, 2, 4. Current value: {max_lanes}")
|
||||
self.__max_lanes.default_value = max_lanes
|
||||
|
||||
@property
|
||||
def max_link_rate(self):
|
||||
"""
|
||||
Set and get number of maximum link rate.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__max_link_rate
|
||||
|
||||
@max_link_rate.setter
|
||||
def max_link_rate(self, max_link_rate: float):
|
||||
if max_link_rate not in [1.62, 2.7, 5.4, 8.1]:
|
||||
raise ValueError(f"Max link rate must be from list: 1.62, 2.7, 5.4, 8.1. Current value: {max_link_rate}")
|
||||
self.__max_link_rate.default_value = round(max_link_rate / 0.27)
|
||||
|
||||
@property
|
||||
def dut_caps_flags(self) -> DutCapsDp21Flags:
|
||||
"""
|
||||
Set and get DUT capabilities flags.
|
||||
|
||||
Returns:
|
||||
object of `DutCapsFlags` type
|
||||
"""
|
||||
return self.__dut_caps_flags
|
||||
|
||||
@dut_caps_flags.setter
|
||||
def dut_caps_flags(self, dut_caps_flags: DutCapsDp21Flags):
|
||||
self.__dut_caps_flags = dut_caps_flags
|
||||
|
||||
|
||||
class DebugOptions:
|
||||
|
||||
def __init__(self, json_obj):
|
||||
self.__param = Param(json_obj["TSI_DP20_SRCCTS_DUT_DEBUG_CONF"])
|
||||
|
||||
@property
|
||||
def continue_on_fail(self) -> bool:
|
||||
"""
|
||||
Set and get continue on fail flag.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__param._get_by_bitmask(0, bool)
|
||||
|
||||
@continue_on_fail.setter
|
||||
def continue_on_fail(self, continue_on_fail: bool):
|
||||
self.__param.default_value = update_default_value(value=continue_on_fail,
|
||||
default_value=self.__param.default_value,
|
||||
mask=self.__param.bit_field_list[0].mask)
|
||||
|
||||
@property
|
||||
def force_visual_check(self) -> bool:
|
||||
"""
|
||||
Set and get Force manual visual check flag.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__param._get_by_bitmask(1, bool)
|
||||
|
||||
@force_visual_check.setter
|
||||
def force_visual_check(self, force_visual_check: bool):
|
||||
self.__param.default_value = update_default_value(value=force_visual_check,
|
||||
default_value=self.__param.default_value,
|
||||
mask=self.__param.bit_field_list[1].mask)
|
||||
|
||||
|
||||
class GeneralSourceDUTDp21SettingTab:
|
||||
"""
|
||||
Class `GeneralSourceDUTDp21SettingTab` inherited of class`GeneralSourceDUTDp14SettingTab` allows working with
|
||||
parameters from General source part.
|
||||
- Set and get timeout `timeout`.
|
||||
- Set and get `hpd_pulse_duration`. Describes duration of long HPD pulses generated, in milliseconds.
|
||||
- Set and get DUT capabilities `dut_caps` type `DutCapsDp21`.
|
||||
- Set and get DUT link rates `dut_link_rates` type `LinkRateDp21`.
|
||||
- Set and get LTTPR device count `lttpr_device_count`.
|
||||
- Set and get maximum link bandwidth policy `max_link_bw_policy` type `MaxLinkBwPolicy`.
|
||||
- Set and get DSC maximum slice number `dsc_max_slice`.
|
||||
- Set and get DSC version `dsc_version`.
|
||||
- Set and get debug options `debug_options` type `DebugOptions`
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__timeout = Param(json_obj["TSI_DP20_SRCCTS_TIMEOUT"])
|
||||
self.__dut_caps = DutCapsDp21(json_obj)
|
||||
self.__test_automation = TestAutomationFlagsDP21(json_obj["TSI_DP20_SRCCTS_DUT_TA"])
|
||||
self.__hpd_pulse_duration = Param(json_obj["TSI_DP20_SRCCTS_LONG_HPD_PULSE"])
|
||||
self.__dut_link_rates = LinkRateDp21(json_obj["TSI_DP20_SRCCTS_DUT_LINK_RATES"])
|
||||
self.__lttpr_device_count = Param(json_obj["TSI_DP20_SRCCTS_LTTPR_DEVICE_COUNT"])
|
||||
self.__max_link_bw_policy = Param(json_obj["TSI_DP20_SRCCTS_MAX_LINK_BW_POLICY"]) # MaxLinkBwPolicy
|
||||
self.__dsc_max_slice = Param(json_obj["TSI_DP20_SRCCTS_DSC_DUT_MAX_SLICE"])
|
||||
self.__dsc_version = Param(json_obj["TSI_DP20_SRCCTS_DSC_VERSION"])
|
||||
self.__debug_options = DebugOptions(json_obj)
|
||||
|
||||
@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(self) -> DutCapsDp21:
|
||||
"""
|
||||
Set and get DUT caps.
|
||||
|
||||
Returns:
|
||||
object DutCapsDp21
|
||||
"""
|
||||
return self.__dut_caps
|
||||
|
||||
@dut_caps.setter
|
||||
def dut_caps(self, dut_caps: DutCapsDp21):
|
||||
self.__dut_caps = dut_caps
|
||||
|
||||
@property
|
||||
def hpd_pulse_duration(self) -> int:
|
||||
"""
|
||||
Set and get HPD pulse duration.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__hpd_pulse_duration.default_value
|
||||
|
||||
@hpd_pulse_duration.setter
|
||||
def hpd_pulse_duration(self, hpd_pulse_duration: int):
|
||||
if not(self.__hpd_pulse_duration.min_value < hpd_pulse_duration < self.__hpd_pulse_duration.max_value):
|
||||
raise ValueError(f"HPD pulse duration cannot be less than {self.__timeout.min_value} and more than "
|
||||
f"{self.__hpd_pulse_duration.max_value}.")
|
||||
self.__hpd_pulse_duration.default_value = hpd_pulse_duration
|
||||
|
||||
@property
|
||||
def test_automation(self) -> TestAutomationFlagsDP21:
|
||||
"""
|
||||
Set and get test automation flags.
|
||||
|
||||
Returns:
|
||||
object TestAutomationFlags
|
||||
"""
|
||||
return self.__test_automation
|
||||
|
||||
@test_automation.setter
|
||||
def test_automation(self, test_automation: TestAutomationFlagsDP21):
|
||||
self.__test_automation = test_automation
|
||||
|
||||
@property
|
||||
def dut_link_rates(self) -> LinkRateDp21:
|
||||
"""
|
||||
Set and get DUT link rates.
|
||||
|
||||
Returns:
|
||||
object LinkRateDp21
|
||||
"""
|
||||
return self.__dut_link_rates
|
||||
|
||||
@dut_link_rates.setter
|
||||
def dut_link_rates(self, dut_link_rates: LinkRateDp21):
|
||||
self.__dut_link_rates = dut_link_rates
|
||||
|
||||
@property
|
||||
def max_link_bw_policy(self) -> int:
|
||||
"""
|
||||
Set and get maximum link bandwidth policy.
|
||||
|
||||
Returns:
|
||||
object int
|
||||
"""
|
||||
return self.__max_link_bw_policy.default_value
|
||||
|
||||
@max_link_bw_policy.setter
|
||||
def max_link_bw_policy(self, max_link_bw_policy: MaxLinkBwPolicy):
|
||||
self.__max_link_bw_policy = max_link_bw_policy.value
|
||||
|
||||
@property
|
||||
def lttpr_device_count(self) -> int:
|
||||
"""
|
||||
Set and get LTTPR device count.
|
||||
|
||||
Returns:
|
||||
object int
|
||||
"""
|
||||
return self.__lttpr_device_count.default_value
|
||||
|
||||
@lttpr_device_count.setter
|
||||
def lttpr_device_count(self, lttpr_device_count: int):
|
||||
if not(self.__lttpr_device_count.min_value < lttpr_device_count < self.__lttpr_device_count.max_value):
|
||||
raise ValueError(f"LTTPR device count cannot be less than "
|
||||
f"{self.__lttpr_device_count.min_value} and more than "
|
||||
f"{self.__lttpr_device_count.max_value}.")
|
||||
self.__lttpr_device_count.default_value = lttpr_device_count
|
||||
|
||||
@property
|
||||
def dsc_max_slice(self) -> int:
|
||||
"""
|
||||
Set and get DSC maximum slice number.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__dsc_max_slice.default_value
|
||||
|
||||
@dsc_max_slice.setter
|
||||
def dsc_max_slice(self, dsc_max_slice: int):
|
||||
if dsc_max_slice not in [1, 2, 4, 8, 10, 12, 16, 20, 24]:
|
||||
raise ValueError(f"DSC Max slice count available values {[1, 2, 4, 8, 10, 12, 16, 20, 24]}")
|
||||
self.__dsc_max_slice.default_value = dsc_max_slice
|
||||
|
||||
@property
|
||||
def dsc_version(self) -> list:
|
||||
"""
|
||||
Set and get DSC version.
|
||||
Setter: .dsc_version((1, 2))
|
||||
|
||||
Returns:
|
||||
object of list type
|
||||
"""
|
||||
return [self.__dsc_version.default_value >> 16 & 0xF, self.__dsc_version.default_value & 0xF]
|
||||
|
||||
@dsc_version.setter
|
||||
def dsc_version(self, dsc_version: tuple):
|
||||
version = (dsc_version[0] << 16) | dsc_version[1]
|
||||
if version not in [65537, 65538]:
|
||||
raise ValueError("DSC Version must be 1.1 or 1.2")
|
||||
self.__dsc_version.default_value = version
|
||||
|
||||
@property
|
||||
def debug_options(self) -> DebugOptions:
|
||||
"""
|
||||
Set and get debug options.
|
||||
|
||||
Returns:
|
||||
object of 'DebugOptions' type
|
||||
"""
|
||||
return self.__debug_options
|
||||
|
||||
@debug_options.setter
|
||||
def debug_options(self, debug_config: DebugOptions):
|
||||
self.__debug_options = debug_config
|
||||
|
||||
@@ -0,0 +1,365 @@
|
||||
from warnings import warn
|
||||
|
||||
from UniTAP.dev.modules.dut_tests.dut_default_params.dp_2_1_common_video_modes import VideoModeInfo
|
||||
|
||||
|
||||
class Dp21AvailableVideoModes:
|
||||
"""
|
||||
Class `Dp21AvailableVideoModes` allows working with video modes.
|
||||
- Set and get...
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__768x480_85hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_768_480_85"])
|
||||
self.__1024x640_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_1024_640_60"])
|
||||
self.__1152x720_75hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_1152_720_75"])
|
||||
self.__1280x720_24hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_1280_720_24"])
|
||||
self.__1280x720_120hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_1280_720_120"])
|
||||
self.__1280x768_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_1280_768_60"])
|
||||
self.__1280x960_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_1280_960_60"])
|
||||
self.__1440x240_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_1440_240_60"])
|
||||
self.__1440x480_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_1440_480_60"])
|
||||
self.__1440x900_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_1440_900_60"])
|
||||
self.__1536x960_85hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_1536_960_85"])
|
||||
self.__1920x1080_30hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_1920_1080_30"])
|
||||
self.__1920x1080_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_1920_1080_60"])
|
||||
self.__1920x1080_85hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_1920_1080_85"])
|
||||
self.__1920x1080_100hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_1920_1080_100"])
|
||||
self.__1920x1080_120hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_1920_1080_120"])
|
||||
self.__1920x1080_144hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_1920_1080_144"])
|
||||
self.__1920x1080_240hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_1920_1080_240"])
|
||||
self.__1920x1440_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_1920_1440_60"])
|
||||
self.__2048x1280_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_2048_1280_60"])
|
||||
self.__2048x1536_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_2048_1536_60"])
|
||||
self.__2128x1200_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_2128_1200_60"])
|
||||
self.__2456x1536_50hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_2456_1536_50"])
|
||||
self.__2456x1536_75hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_2456_1536_75"])
|
||||
self.__2560x1080_30hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_2560_1080_30"])
|
||||
self.__2560x1080_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_2560_1080_60"])
|
||||
self.__2560x1080_120hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_2560_1080_120"])
|
||||
self.__2560x1600_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_2560_1600_60"])
|
||||
self.__2560x1920_75hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_2560_1920_75"])
|
||||
self.__2728x1536_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_2728_1536_60"])
|
||||
self.__3840x2160_30hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_3840_2160_30"])
|
||||
self.__3840x2160_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_3840_2160_60"])
|
||||
self.__3840x2160_120hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_3840_2160_120"])
|
||||
self.__3840x2160_144hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_3840_2160_144"])
|
||||
self.__3840x2160_240hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_3840_2160_240"])
|
||||
self.__3840x2400_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_3840_2400_60"])
|
||||
self.__4096x2160_30hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_4096_2160_30"])
|
||||
self.__5120x2160_30hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_5120_2160_30"])
|
||||
self.__5120x2160_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_5120_2160_60"])
|
||||
self.__5120x2160_120hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_5120_2160_120"])
|
||||
self.__5120x2160_144hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_5120_2160_144"])
|
||||
self.__5120x2160_240hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_5120_2160_240"])
|
||||
self.__5120x2880_30hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_5120_2880_30"])
|
||||
self.__5120x2880_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_5120_2880_60"])
|
||||
self.__5120x2880_120hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_5120_2880_120"])
|
||||
self.__7680x4320_24hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_7680_4320_24"])
|
||||
self.__7680x4320_30hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_7680_4320_30"])
|
||||
self.__7680x4320_50hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_7680_4320_50"])
|
||||
self.__7680x4320_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_7680_4320_60"])
|
||||
self.__7680x4320_120hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_7680_4320_120"])
|
||||
self.__10240x4320_24hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_10240_4320_24"])
|
||||
self.__10240x4320_30hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_10240_4320_30"])
|
||||
self.__10240x4320_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_VMT_10240_4320_60"])
|
||||
|
||||
@property
|
||||
def vm_768x480_85hz(self) -> VideoModeInfo:
|
||||
return self.__768x480_85hz
|
||||
|
||||
@property
|
||||
def vm_1024x640_60hz(self) -> VideoModeInfo:
|
||||
return self.__1024x640_60hz
|
||||
|
||||
@property
|
||||
def vm_1152x720_75hz(self) -> VideoModeInfo:
|
||||
return self.__1152x720_75hz
|
||||
|
||||
@property
|
||||
def vm_1280x720_24hz(self) -> VideoModeInfo:
|
||||
return self.__1280x720_24hz
|
||||
|
||||
@property
|
||||
def vm_1280x720_120hz(self) -> VideoModeInfo:
|
||||
return self.__1280x720_120hz
|
||||
|
||||
@property
|
||||
def vm_1280x768_60hz(self) -> VideoModeInfo:
|
||||
return self.__1280x768_60hz
|
||||
|
||||
@property
|
||||
def vm_1280x960_60hz(self) -> VideoModeInfo:
|
||||
return self.__1280x960_60hz
|
||||
|
||||
@property
|
||||
def vm_1440x240_60hz(self) -> VideoModeInfo:
|
||||
return self.__1440x240_60hz
|
||||
|
||||
@property
|
||||
def vm_1440x480_60hz(self) -> VideoModeInfo:
|
||||
return self.__1440x480_60hz
|
||||
|
||||
@property
|
||||
def vm_1440x900_60hz(self) -> VideoModeInfo:
|
||||
return self.__1440x900_60hz
|
||||
|
||||
@property
|
||||
def vm_1536x960_85hz(self) -> VideoModeInfo:
|
||||
return self.__1536x960_85hz
|
||||
|
||||
@property
|
||||
def vm_1920x1080_30hz(self) -> VideoModeInfo:
|
||||
return self.__1920x1080_30hz
|
||||
|
||||
@property
|
||||
def vm_1920x1080_60hz(self) -> VideoModeInfo:
|
||||
return self.__1920x1080_60hz
|
||||
|
||||
@property
|
||||
def vm_1920x1080_85hz(self) -> VideoModeInfo:
|
||||
return self.__1920x1080_85hz
|
||||
|
||||
@property
|
||||
def vm_1920x1080_100hz(self) -> VideoModeInfo:
|
||||
return self.__1920x1080_100hz
|
||||
|
||||
@property
|
||||
def vm_1920x1080_120hz(self) -> VideoModeInfo:
|
||||
return self.__1920x1080_120hz
|
||||
|
||||
@property
|
||||
def vm_1920x1080_144hz(self) -> VideoModeInfo:
|
||||
warn("This video mode is DSC only, please configure this video mode using dsc_video_modes.", DeprecationWarning,
|
||||
2)
|
||||
return self.__1920x1080_144hz
|
||||
|
||||
@property
|
||||
def vm_1920x1080_240hz(self) -> VideoModeInfo:
|
||||
warn("This video mode is DSC only, please configure this video mode using dsc_video_modes.", DeprecationWarning,
|
||||
2)
|
||||
return self.__1920x1080_240hz
|
||||
|
||||
@property
|
||||
def vm_1920x1440_60hz(self) -> VideoModeInfo:
|
||||
return self.__1920x1440_60hz
|
||||
|
||||
@property
|
||||
def vm_2048x1280_60hz(self) -> VideoModeInfo:
|
||||
return self.__2048x1280_60hz
|
||||
|
||||
@property
|
||||
def vm_2048x1536_60hz(self) -> VideoModeInfo:
|
||||
return self.__2048x1536_60hz
|
||||
|
||||
@property
|
||||
def vm_2128x1200_60hz(self) -> VideoModeInfo:
|
||||
return self.__2128x1200_60hz
|
||||
|
||||
@property
|
||||
def vm_2456x1536_50hz(self) -> VideoModeInfo:
|
||||
return self.__2456x1536_50hz
|
||||
|
||||
@property
|
||||
def vm_2456x1536_75hz(self) -> VideoModeInfo:
|
||||
return self.__2456x1536_75hz
|
||||
|
||||
@property
|
||||
def vm_2560x1080_30hz(self) -> VideoModeInfo:
|
||||
return self.__2560x1080_30hz
|
||||
|
||||
@property
|
||||
def vm_2560x1080_60hz(self) -> VideoModeInfo:
|
||||
return self.__2560x1080_60hz
|
||||
|
||||
@property
|
||||
def vm_2560x1080_120hz(self) -> VideoModeInfo:
|
||||
return self.__2560x1080_120hz
|
||||
|
||||
@property
|
||||
def vm_2560x1600_60hz(self) -> VideoModeInfo:
|
||||
return self.__2560x1600_60hz
|
||||
|
||||
@property
|
||||
def vm_2560x1920_75hz(self) -> VideoModeInfo:
|
||||
return self.__2560x1920_75hz
|
||||
|
||||
@property
|
||||
def vm_2728x1536_60hz(self) -> VideoModeInfo:
|
||||
return self.__2728x1536_60hz
|
||||
|
||||
@property
|
||||
def vm_3840x2160_30hz(self) -> VideoModeInfo:
|
||||
warn("This video mode is DSC only, please configure this video mode using dsc_video_modes.", DeprecationWarning,
|
||||
2)
|
||||
return self.__3840x2160_30hz
|
||||
|
||||
@property
|
||||
def vm_3840x2160_60hz(self) -> VideoModeInfo:
|
||||
return self.__3840x2160_60hz
|
||||
|
||||
@property
|
||||
def vm_3840x2160_120hz(self) -> VideoModeInfo:
|
||||
return self.__3840x2160_120hz
|
||||
|
||||
@property
|
||||
def vm_3840x2160_144hz(self) -> VideoModeInfo:
|
||||
return self.__3840x2160_144hz
|
||||
|
||||
@property
|
||||
def vm_3840x2160_240hz(self) -> VideoModeInfo:
|
||||
warn("This video mode is DSC only, please configure this video mode using dsc_video_modes.", DeprecationWarning,
|
||||
2)
|
||||
return self.__3840x2160_240hz
|
||||
|
||||
@property
|
||||
def vm_3840x2400_60hz(self) -> VideoModeInfo:
|
||||
return self.__3840x2400_60hz
|
||||
|
||||
@property
|
||||
def vm_4096x2160_30hz(self) -> VideoModeInfo:
|
||||
return self.__4096x2160_30hz
|
||||
|
||||
@property
|
||||
def vm_5120x2160_30hz(self) -> VideoModeInfo:
|
||||
return self.__5120x2160_30hz
|
||||
|
||||
@property
|
||||
def vm_5120x2160_60hz(self) -> VideoModeInfo:
|
||||
return self.__5120x2160_60hz
|
||||
|
||||
@property
|
||||
def vm_5120x2160_120hz(self) -> VideoModeInfo:
|
||||
warn("This video mode is DSC only, please configure this video mode using dsc_video_modes.", DeprecationWarning,
|
||||
2)
|
||||
return self.__5120x2160_120hz
|
||||
|
||||
@property
|
||||
def vm_5120x2160_144hz(self) -> VideoModeInfo:
|
||||
return self.__5120x2160_144hz
|
||||
|
||||
@property
|
||||
def vm_5120x2160_240hz(self) -> VideoModeInfo:
|
||||
warn("This video mode is DSC only, please configure this video mode using dsc_video_modes.", DeprecationWarning,
|
||||
2)
|
||||
return self.__5120x2160_240hz
|
||||
|
||||
@property
|
||||
def vm_5120x2880_30hz(self) -> VideoModeInfo:
|
||||
return self.__5120x2880_30hz
|
||||
|
||||
@property
|
||||
def vm_5120x2880_60hz(self) -> VideoModeInfo:
|
||||
return self.__5120x2880_60hz
|
||||
|
||||
@property
|
||||
def vm_5120x2880_120hz(self) -> VideoModeInfo:
|
||||
return self.__5120x2880_120hz
|
||||
|
||||
@property
|
||||
def vm_7680x4320_24hz(self) -> VideoModeInfo:
|
||||
return self.__7680x4320_24hz
|
||||
|
||||
@property
|
||||
def vm_7680x4320_30hz(self) -> VideoModeInfo:
|
||||
return self.__7680x4320_30hz
|
||||
|
||||
@property
|
||||
def vm_7680x4320_50hz(self) -> VideoModeInfo:
|
||||
return self.__7680x4320_50hz
|
||||
|
||||
@property
|
||||
def vm_7680x4320_60hz(self) -> VideoModeInfo:
|
||||
return self.__7680x4320_60hz
|
||||
|
||||
@property
|
||||
def vm_7680x4320_120hz(self) -> VideoModeInfo:
|
||||
warn("This video mode is DSC only, please configure this video mode using dsc_video_modes.", DeprecationWarning,
|
||||
2)
|
||||
return self.__7680x4320_120hz
|
||||
|
||||
@property
|
||||
def vm_10240x4320_24hz(self) -> VideoModeInfo:
|
||||
return self.__10240x4320_24hz
|
||||
|
||||
@property
|
||||
def vm_10240x4320_30hz(self) -> VideoModeInfo:
|
||||
warn("This video mode is DSC only, please configure this video mode using dsc_video_modes.", DeprecationWarning,
|
||||
2)
|
||||
return self.__10240x4320_30hz
|
||||
|
||||
@property
|
||||
def vm_10240x4320_60hz(self) -> VideoModeInfo:
|
||||
warn("This video mode is DSC only, please configure this video mode using dsc_video_modes.", DeprecationWarning,
|
||||
2)
|
||||
return self.__10240x4320_60hz
|
||||
|
||||
def select_all_standards(self):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
self.__getattribute__(item).standard.set_all()
|
||||
|
||||
def select_all_cta_standard(self):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
self.__getattribute__(item).standard.cta = True
|
||||
|
||||
def select_all_dmt_standard(self):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
self.__getattribute__(item).standard.dmt = True
|
||||
|
||||
def select_all_cvt_standard(self):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
self.__getattribute__(item).standard.cvt = True
|
||||
|
||||
def select_all_cvt_rb1_standard(self):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
self.__getattribute__(item).standard.cvt_rb1 = True
|
||||
|
||||
def select_all_cvt_rb2_standard(self):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
self.__getattribute__(item).standard.cvt_rb2 = True
|
||||
|
||||
def select_all_ovt_standard(self):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
self.__getattribute__(item).standard.ovt = True
|
||||
|
||||
def select_all_colorimetries(self, bpc: int = 8):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
self.__getattribute__(item).colorimetry.set_all(bpc)
|
||||
|
||||
def select_all_rgb_colorimetry(self, bpc: int = 8):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
self.__getattribute__(item).colorimetry.rgb = bpc
|
||||
|
||||
def select_all_ycbcr444_colorimetry(self, bpc: int = 8):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
self.__getattribute__(item).colorimetry.ycbcr444 = bpc
|
||||
|
||||
def select_all_ycbcr422_colorimetry(self, bpc: int = 8):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
self.__getattribute__(item).colorimetry.ycbcr422 = bpc
|
||||
|
||||
def select_all_ycbcr_simple422_colorimetry(self, bpc: int = 8):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
self.__getattribute__(item).colorimetry.ycbcr_simple422 = bpc
|
||||
|
||||
def select_all_ycbcr420_colorimetry(self, bpc: int = 8):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
self.__getattribute__(item).colorimetry.ycbcr420 = bpc
|
||||
|
||||
def clear_all(self):
|
||||
var_list = self.__dict__
|
||||
for item in var_list:
|
||||
self.__getattribute__(item).colorimetry.clear_all()
|
||||
self.__getattribute__(item).standard.clear_all()
|
||||
@@ -0,0 +1,418 @@
|
||||
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
|
||||
from UniTAP.dev.modules.dut_tests.test_utils import update_default_value
|
||||
|
||||
|
||||
class DpDutTaCaps(Param):
|
||||
"""
|
||||
Class `DpDutTaCaps` describes DUT Test automation capabilities flags and allows settings values.
|
||||
- DUT is capable for test link training `dut_capable_link_training`.
|
||||
- DUT is capable for test video pattern `dut_capable_video_pattern`
|
||||
- DUT is capable for test EDID read `dut_capable_edid_read`.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
super().__init__(json_obj)
|
||||
|
||||
@property
|
||||
def dut_capable_link_training(self) -> bool:
|
||||
"""
|
||||
Set and get DUT is capable for test link training flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._get_by_bitmask(0, bool)
|
||||
|
||||
@dut_capable_link_training.setter
|
||||
def dut_capable_link_training(self, dut_capable_link_training: bool):
|
||||
self._set_by_bitmask(dut_capable_link_training, 0)
|
||||
|
||||
@property
|
||||
def dut_capable_video_pattern(self) -> bool:
|
||||
"""
|
||||
Set and get DUT is capable for test video pattern flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._get_by_bitmask(1, bool)
|
||||
|
||||
@dut_capable_video_pattern.setter
|
||||
def dut_capable_video_pattern(self, dut_capable_video_pattern: bool):
|
||||
self._set_by_bitmask(dut_capable_video_pattern, 1)
|
||||
|
||||
@property
|
||||
def dut_capable_edid_read(self) -> bool:
|
||||
"""
|
||||
Set and get DUT is capable for test EDID read flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._get_by_bitmask(2, bool)
|
||||
|
||||
@dut_capable_edid_read.setter
|
||||
def dut_capable_edid_read(self, dut_capable_edid_read: bool):
|
||||
self._set_by_bitmask(dut_capable_edid_read, 2)
|
||||
|
||||
|
||||
class DpElectricalTestParam:
|
||||
"""
|
||||
Class `DpElectricalTestParam` describes parameters for DP electrical tests.
|
||||
- Test timeout, in milliseconds `timeout`.
|
||||
- Main link low voltage limit, mV `links_low_voltage`.
|
||||
- Main link high voltage limit, mV `links_high_voltage`.
|
||||
- HPD line logical zero low voltage level limit, mV `hpd_zero_low_voltage`.
|
||||
- HPD line logical zero high voltage level limit, mV `hpd_zero_high_voltage`.
|
||||
- HPD line logical one low voltage level limit, mV `hpd_one_low_voltage`.
|
||||
- HPD line logical one high voltage level limit, mV `hpd_one_high_voltage`.
|
||||
- AUX + line idle low voltage level limit, mV `aux_positive_idle_low_voltage`.
|
||||
- AUX + line idle high voltage level limit, mV `aux_positive_idle_high_voltage`.
|
||||
- AUX - line idle low voltage level limit, mV `aux_negative_idle_low_voltage`.
|
||||
- AUX - line idle high voltage level limit, mV `aux_negative_idle_high_voltage`.
|
||||
- AUX + line signal trigger level, mV `aux_positive_trig_voltage`.
|
||||
- AUX - line signal trigger level, mV `aux_negative_trig_voltage`.
|
||||
- AUX signal capture timeout, milliseconds `aux_signal_capture_timeout`.
|
||||
- AUX signal capture attempts, times `aux_signal_capture_count`.
|
||||
- Maximum lanes count supported by DUT `dut_max_lanes`.
|
||||
- Maximum data rate supported by DUT in 0.27Gbps `dut_max_link_rate`.
|
||||
- DUT Test automation capabilities flags `dut_ta_caps` type `DpDutTaCaps`.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__timeout = Param(json_obj["TSI_DP_RX_TEST_TIMEOUT"])
|
||||
self.__links_low_voltage = Param(json_obj["TSI_DP_RX_LINKS_LOW_VOLTAGE"])
|
||||
self.__links_high_voltage = Param(json_obj["TSI_DP_RX_LINKS_HI_VOLTAGE"])
|
||||
self.__hpd_zero_low_voltage = Param(json_obj["TSI_DP_RX_HPD_ZERO_LOW_VOLTAGE"])
|
||||
self.__hpd_zero_high_voltage = Param(json_obj["TSI_DP_RX_HPD_ZERO_HI_VOLTAGE"])
|
||||
self.__hpd_one_low_voltage = Param(json_obj["TSI_DP_RX_HPD_ONE_LOW_VOLTAGE"])
|
||||
self.__hpd_one_high_voltage = Param(json_obj["TSI_DP_RX_HPD_ONE_HI_VOLTAGE"])
|
||||
self.__aux_positive_idle_low_voltage = Param(json_obj["TSI_DP_RX_AUX_P_IDLE_LOW_VOLTAGE"])
|
||||
self.__aux_positive_idle_high_voltage = Param(json_obj["TSI_DP_RX_AUX_P_IDLE_HI_VOLTAGE"])
|
||||
self.__aux_negative_idle_low_voltage = Param(json_obj["TSI_DP_RX_AUX_N_IDLE_LOW_VOLTAGE"])
|
||||
self.__aux_negative_idle_high_voltage = Param(json_obj["TSI_DP_RX_AUX_N_IDLE_HI_VOLTAGE"])
|
||||
self.__aux_positive_trig_voltage = Param(json_obj["TSI_DP_RX_AUX_P_TRIG_VOLTAGE"])
|
||||
self.__aux_negative_trig_voltage = Param(json_obj["TSI_DP_RX_AUX_N_TRIG_VOLTAGE"])
|
||||
self.__aux_signal_capture_timeout = Param(json_obj["TSI_DP_RX_AUX_SIGNAL_CAPT_TIMEOUT"])
|
||||
self.__aux_signal_capture_count = Param(json_obj["TSI_DP_RX_AUX_SIGNAL_CAPT_TRIES"])
|
||||
self.__dut_max_lanes = Param(json_obj["TSI_DP_RX_MAX_DUT_MAX_LANES"])
|
||||
self.__dut_max_link_rate = Param(json_obj["TSI_DP_RX_MAX_DUT_LANE_RATE"])
|
||||
self.__unused_dut_caps_flag = Param(json_obj["TSI_DP_RX_DUT_CAPS"])
|
||||
self.__dut_ta_caps = DpDutTaCaps(json_obj["TSI_DP_RX_DUT_TA_CAPS"])
|
||||
|
||||
@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 links_low_voltage(self) -> int:
|
||||
"""
|
||||
Set and get Main link low voltage limit.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__links_low_voltage.default_value
|
||||
|
||||
@links_low_voltage.setter
|
||||
def links_low_voltage(self, links_low_voltage: int):
|
||||
if not(self.__links_low_voltage.min_value < links_low_voltage < self.__links_low_voltage.max_value):
|
||||
raise ValueError(f"Links low voltage cannot be less than {self.__links_low_voltage.min_value} and more than"
|
||||
f" {self.__links_low_voltage.max_value}.")
|
||||
self.__links_low_voltage.default_value = links_low_voltage
|
||||
|
||||
@property
|
||||
def links_high_voltage(self) -> int:
|
||||
"""
|
||||
Set and get Main link high voltage limit.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__links_high_voltage.default_value
|
||||
|
||||
@links_high_voltage.setter
|
||||
def links_high_voltage(self, links_high_voltage: int):
|
||||
if not(self.__links_high_voltage.min_value < links_high_voltage < self.__links_high_voltage.max_value):
|
||||
raise ValueError(f"Links high voltage cannot be less than {self.__links_high_voltage.min_value} "
|
||||
f"and more than {self.__links_high_voltage.max_value}.")
|
||||
self.__links_high_voltage.default_value = links_high_voltage
|
||||
|
||||
@property
|
||||
def hpd_zero_low_voltage(self) -> int:
|
||||
"""
|
||||
Set and get HPD line logical zero low voltage level limit.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__hpd_zero_low_voltage.default_value
|
||||
|
||||
@hpd_zero_low_voltage.setter
|
||||
def hpd_zero_low_voltage(self, hpd_zero_low_voltage: int):
|
||||
if not(self.__hpd_zero_low_voltage.min_value < hpd_zero_low_voltage < self.__hpd_zero_low_voltage.max_value):
|
||||
raise ValueError(f"HDP zero low voltage cannot be less than {self.__hpd_zero_low_voltage.min_value} "
|
||||
f"and more than {self.__hpd_zero_low_voltage.max_value}.")
|
||||
self.__hpd_zero_low_voltage.default_value = hpd_zero_low_voltage
|
||||
|
||||
@property
|
||||
def hpd_zero_high_voltage(self) -> int:
|
||||
"""
|
||||
Set and get HPD line logical zero high voltage level limit.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__hpd_zero_high_voltage.default_value
|
||||
|
||||
@hpd_zero_high_voltage.setter
|
||||
def hpd_zero_high_voltage(self, hpd_zero_high_voltage: int):
|
||||
if not(self.__hpd_zero_high_voltage.min_value < hpd_zero_high_voltage < self.__hpd_zero_high_voltage.max_value):
|
||||
raise ValueError(f"HDP zero high voltage cannot be less than {self.__hpd_zero_high_voltage.min_value} "
|
||||
f"and more than {self.__hpd_zero_high_voltage.max_value}.")
|
||||
self.__hpd_zero_high_voltage.default_value = hpd_zero_high_voltage
|
||||
|
||||
@property
|
||||
def hpd_one_low_voltage(self) -> int:
|
||||
"""
|
||||
Set and get HPD line logical one low voltage level limit.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__hpd_one_low_voltage.default_value
|
||||
|
||||
@hpd_one_low_voltage.setter
|
||||
def hpd_one_low_voltage(self, hpd_one_low_voltage: int):
|
||||
if not(self.__hpd_one_low_voltage.min_value < hpd_one_low_voltage < self.__hpd_one_low_voltage.max_value):
|
||||
raise ValueError(f"HDP one low voltage cannot be less than {self.__hpd_one_low_voltage.min_value} "
|
||||
f"and more than {self.__timeout.max_value}.")
|
||||
self.__hpd_one_low_voltage.default_value = hpd_one_low_voltage
|
||||
|
||||
@property
|
||||
def hpd_one_high_voltage(self) -> int:
|
||||
"""
|
||||
Set and get HPD line logical one high voltage level limit.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__hpd_one_high_voltage.default_value
|
||||
|
||||
@hpd_one_high_voltage.setter
|
||||
def hpd_one_high_voltage(self, hpd_one_high_voltage: int):
|
||||
if not(self.__hpd_one_high_voltage.min_value < hpd_one_high_voltage < self.__hpd_one_high_voltage.max_value):
|
||||
raise ValueError(f"HDP one high voltage cannot be less than {self.__hpd_one_high_voltage.min_value} "
|
||||
f"and more than {self.__hpd_one_high_voltage.max_value}.")
|
||||
self.__hpd_one_high_voltage.default_value = hpd_one_high_voltage
|
||||
|
||||
@property
|
||||
def aux_positive_idle_low_voltage(self) -> int:
|
||||
"""
|
||||
Set and get AUX + line idle low voltage level limit.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__aux_positive_idle_low_voltage.default_value
|
||||
|
||||
@aux_positive_idle_low_voltage.setter
|
||||
def aux_positive_idle_low_voltage(self, aux_positive_idle_low_voltage: int):
|
||||
if not(self.__aux_positive_idle_low_voltage.min_value < aux_positive_idle_low_voltage <
|
||||
self.__aux_positive_idle_low_voltage.max_value):
|
||||
raise ValueError(f"AUX positive IDLE low voltage cannot be less than "
|
||||
f"{self.__aux_positive_idle_low_voltage.min_value} and more than "
|
||||
f"{self.__aux_positive_idle_low_voltage.max_value}.")
|
||||
self.__aux_positive_idle_low_voltage.default_value = aux_positive_idle_low_voltage
|
||||
|
||||
@property
|
||||
def aux_positive_idle_high_voltage(self) -> int:
|
||||
"""
|
||||
Set and get AUX + line idle high voltage level limit.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__aux_positive_idle_high_voltage.default_value
|
||||
|
||||
@aux_positive_idle_high_voltage.setter
|
||||
def aux_positive_idle_high_voltage(self, aux_positive_idle_high_voltage: int):
|
||||
if not(self.__aux_positive_idle_high_voltage.min_value < aux_positive_idle_high_voltage <
|
||||
self.__aux_positive_idle_high_voltage.max_value):
|
||||
raise ValueError(f"AUX positive IDLE high voltage cannot be less than "
|
||||
f"{self.__aux_positive_idle_high_voltage.min_value} and more than "
|
||||
f"{self.__aux_positive_idle_high_voltage.max_value}.")
|
||||
self.__aux_positive_idle_high_voltage.default_value = aux_positive_idle_high_voltage
|
||||
|
||||
@property
|
||||
def aux_negative_idle_low_voltage(self) -> int:
|
||||
"""
|
||||
Set and get AUX - line idle low voltage level limit.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__aux_negative_idle_low_voltage.default_value
|
||||
|
||||
@aux_negative_idle_low_voltage.setter
|
||||
def aux_negative_idle_low_voltage(self, aux_negative_idle_low_voltage: int):
|
||||
if not(self.__aux_negative_idle_low_voltage.min_value < aux_negative_idle_low_voltage <
|
||||
self.__aux_negative_idle_low_voltage.max_value):
|
||||
raise ValueError(f"AUX negative IDLE low voltage cannot be less than "
|
||||
f"{self.__aux_negative_idle_low_voltage.min_value} and more than "
|
||||
f"{self.__aux_negative_idle_low_voltage.max_value}.")
|
||||
self.__aux_negative_idle_low_voltage.default_value = aux_negative_idle_low_voltage
|
||||
|
||||
@property
|
||||
def aux_negative_idle_high_voltage(self) -> int:
|
||||
"""
|
||||
Set and get AUX - line idle high voltage level limit.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__aux_negative_idle_high_voltage.default_value
|
||||
|
||||
@aux_negative_idle_high_voltage.setter
|
||||
def aux_negative_idle_high_voltage(self, aux_negative_idle_high_voltage: int):
|
||||
if not(self.__aux_negative_idle_high_voltage.min_value < aux_negative_idle_high_voltage <
|
||||
self.__aux_negative_idle_high_voltage.max_value):
|
||||
raise ValueError(f"AUX negative IDLE high voltage cannot be less than "
|
||||
f"{self.__aux_negative_idle_high_voltage.min_value} and more than "
|
||||
f"{self.__aux_negative_idle_high_voltage.max_value}.")
|
||||
self.__aux_negative_idle_high_voltage.default_value = aux_negative_idle_high_voltage
|
||||
|
||||
@property
|
||||
def aux_positive_trig_voltage(self) -> int:
|
||||
"""
|
||||
Set and get AUX + line signal trigger level.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__aux_positive_trig_voltage.default_value
|
||||
|
||||
@aux_positive_trig_voltage.setter
|
||||
def aux_positive_trig_voltage(self, aux_positive_trig_voltage: int):
|
||||
if not(self.__aux_positive_trig_voltage.min_value < aux_positive_trig_voltage <
|
||||
self.__aux_positive_trig_voltage.max_value):
|
||||
raise ValueError(f"AUX positive trig voltage cannot be less than "
|
||||
f"{self.__aux_positive_trig_voltage.min_value} and more than "
|
||||
f"{self.__aux_positive_trig_voltage.max_value}.")
|
||||
self.__aux_positive_trig_voltage.default_value = aux_positive_trig_voltage
|
||||
|
||||
@property
|
||||
def aux_negative_trig_voltage(self) -> int:
|
||||
"""
|
||||
Set and get AUX - line signal trigger level.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__aux_negative_trig_voltage.default_value
|
||||
|
||||
@aux_negative_trig_voltage.setter
|
||||
def aux_negative_trig_voltage(self, aux_negative_trig_voltage: int):
|
||||
if not(self.__aux_negative_trig_voltage.min_value < aux_negative_trig_voltage <
|
||||
self.__aux_negative_trig_voltage.max_value):
|
||||
raise ValueError(f"AUX negative trig voltage cannot be less than "
|
||||
f"{self.__aux_negative_trig_voltage.min_value} and more than "
|
||||
f"{self.__aux_negative_trig_voltage.max_value}.")
|
||||
self.__aux_negative_trig_voltage.default_value = aux_negative_trig_voltage
|
||||
|
||||
@property
|
||||
def aux_signal_capture_timeout(self) -> int:
|
||||
"""
|
||||
Set and get AUX signal capture timeout, milliseconds.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__aux_signal_capture_timeout.default_value
|
||||
|
||||
@aux_signal_capture_timeout.setter
|
||||
def aux_signal_capture_timeout(self, aux_signal_capture_timeout: int):
|
||||
if not(self.__aux_signal_capture_timeout.min_value < aux_signal_capture_timeout <
|
||||
self.__aux_signal_capture_timeout.max_value):
|
||||
raise ValueError(f"AUX signal capture timeout cannot be less than "
|
||||
f"{self.__aux_signal_capture_timeout.min_value} and more than "
|
||||
f"{self.__aux_signal_capture_timeout.max_value}.")
|
||||
self.__aux_signal_capture_timeout.default_value = aux_signal_capture_timeout
|
||||
|
||||
@property
|
||||
def aux_signal_capture_count(self) -> int:
|
||||
"""
|
||||
Set and get AUX signal capture attempts.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__aux_signal_capture_count.default_value
|
||||
|
||||
@aux_signal_capture_count.setter
|
||||
def aux_signal_capture_count(self, aux_signal_capture_count: int):
|
||||
if not(self.__aux_signal_capture_count.min_value < aux_signal_capture_count <
|
||||
self.__aux_signal_capture_count.max_value):
|
||||
raise ValueError(f"AUX signal capture count cannot be less than "
|
||||
f"{self.__aux_signal_capture_count.min_value} and more than "
|
||||
f"{self.__aux_signal_capture_count.max_value}.")
|
||||
self.__aux_signal_capture_count.default_value = aux_signal_capture_count
|
||||
|
||||
@property
|
||||
def dut_max_lanes(self) -> int:
|
||||
"""
|
||||
Set and get Maximum lanes count supported by DUT.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__dut_max_lanes.default_value
|
||||
|
||||
@dut_max_lanes.setter
|
||||
def dut_max_lanes(self, dut_max_lanes: int):
|
||||
if not(self.__dut_max_lanes.min_value < dut_max_lanes < self.__dut_max_lanes.max_value):
|
||||
raise ValueError(f"DUT max lanes cannot be less than {self.__dut_max_lanes.min_value} and more than "
|
||||
f"{self.__dut_max_lanes.max_value}.")
|
||||
self.__dut_max_lanes.default_value = dut_max_lanes
|
||||
|
||||
@property
|
||||
def dut_max_link_rate(self) -> int:
|
||||
"""
|
||||
Set and get Maximum data rate supported by DUT in 0.27Gbps.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__dut_max_link_rate.default_value
|
||||
|
||||
@dut_max_link_rate.setter
|
||||
def dut_max_link_rate(self, dut_max_link_rate: int):
|
||||
if not(self.__dut_max_link_rate.min_value < dut_max_link_rate < self.__dut_max_link_rate.max_value):
|
||||
raise ValueError(f"DUT max link rate cannot be less than {self.__dut_max_link_rate.min_value} and more than "
|
||||
f"{self.__dut_max_link_rate.max_value}.")
|
||||
self.__dut_max_link_rate.default_value = dut_max_link_rate
|
||||
|
||||
@property
|
||||
def dut_ta_caps(self):
|
||||
"""
|
||||
Set and get DUT Test automation capabilities flags.
|
||||
|
||||
Returns:
|
||||
object DpDutTaCaps
|
||||
"""
|
||||
return self.__dut_ta_caps
|
||||
|
||||
@dut_ta_caps.setter
|
||||
def dut_ta_caps(self, dut_ta_caps: DpDutTaCaps):
|
||||
self.__dut_ta_caps = dut_ta_caps
|
||||
@@ -0,0 +1,343 @@
|
||||
from enum import IntEnum
|
||||
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
|
||||
from UniTAP.dev.modules.dut_tests.test_utils import update_default_value
|
||||
|
||||
|
||||
class RangeMinRate(IntEnum):
|
||||
"""
|
||||
Describes available values for rate in Adaptive-Sync tests.
|
||||
"""
|
||||
Rate_59_940Hz = 0
|
||||
Rate_47_952Hz = 1
|
||||
Rate_29_970Hz = 2
|
||||
Rate_23_976Hz = 3
|
||||
|
||||
|
||||
class AdaptiveSyncDpCaps(Param):
|
||||
"""
|
||||
Class `AdaptiveSyncDp14Caps` defines adaptive-sync capabilities and allows setting:
|
||||
- Support Adaptive-Sync `support_adaptive_sync`.
|
||||
- Support fixed average `support_fixed_average`.
|
||||
- Support duration increase and decrease `support_duration_increase_and_decrease`.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
super().__init__(json_obj)
|
||||
|
||||
@property
|
||||
def support_adaptive_sync(self):
|
||||
"""
|
||||
Set and get adaptive-sync flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._get_by_bitmask(0, bool)
|
||||
|
||||
@support_adaptive_sync.setter
|
||||
def support_adaptive_sync(self, support: bool):
|
||||
self._set_by_bitmask(support, 0)
|
||||
|
||||
@property
|
||||
def support_fixed_average(self):
|
||||
"""
|
||||
Set and get fixed average flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._get_by_bitmask(1, bool)
|
||||
|
||||
@support_fixed_average.setter
|
||||
def support_fixed_average(self, support: bool):
|
||||
self._set_by_bitmask(support, 1)
|
||||
|
||||
@property
|
||||
def support_duration_increase_and_decrease(self):
|
||||
"""
|
||||
Set and get duration increase and decrease flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._get_by_bitmask(2, bool)
|
||||
|
||||
@support_duration_increase_and_decrease.setter
|
||||
def support_duration_increase_and_decrease(self, support: bool):
|
||||
self._set_by_bitmask(support, 2)
|
||||
|
||||
@property
|
||||
def enable_manually(self):
|
||||
"""
|
||||
Set and get enable manually flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._get_by_bitmask(3, bool)
|
||||
|
||||
@enable_manually.setter
|
||||
def enable_manually(self, enable: bool):
|
||||
self._set_by_bitmask(enable, 3)
|
||||
|
||||
|
||||
class AdaptiveSyncDpConfigTabBase:
|
||||
def __init__(self, caps: AdaptiveSyncDpCaps, as_range_min_rate,
|
||||
max_rate_1920x1080,
|
||||
max_rate_2560x1080,
|
||||
max_rate_2560x1440,
|
||||
max_rate_3840x2160,
|
||||
max_rate_4096x2160,
|
||||
max_rate_5120x2160,
|
||||
max_rate_7680x4320,
|
||||
max_rate_10240x4320):
|
||||
self._caps = caps
|
||||
self._as_range_min_rate = as_range_min_rate
|
||||
self._max_rate_1920x1080 = max_rate_1920x1080
|
||||
self._max_rate_2560x1080 = max_rate_2560x1080
|
||||
self._max_rate_2560x1440 = max_rate_2560x1440
|
||||
self._max_rate_3840x2160 = max_rate_3840x2160
|
||||
self._max_rate_4096x2160 = max_rate_4096x2160
|
||||
self._max_rate_5120x2160 = max_rate_5120x2160
|
||||
self._max_rate_7680x4320 = max_rate_7680x4320
|
||||
self._max_rate_10240x4320 = max_rate_10240x4320
|
||||
|
||||
@property
|
||||
def as_caps(self) -> AdaptiveSyncDpCaps:
|
||||
"""
|
||||
Set and get adaptive-sync capabilities.
|
||||
|
||||
Returns:
|
||||
object `AdaptiveSyncDp14Caps`
|
||||
"""
|
||||
return self._caps
|
||||
|
||||
@as_caps.setter
|
||||
def as_caps(self, caps: AdaptiveSyncDpCaps):
|
||||
self._caps = caps
|
||||
|
||||
@property
|
||||
def as_range_min_rate(self) -> int:
|
||||
"""
|
||||
Set and get adaptive-sync minimum rate.
|
||||
|
||||
Returns:
|
||||
object `RangeMinRate`
|
||||
"""
|
||||
return self._as_range_min_rate
|
||||
|
||||
@as_range_min_rate.setter
|
||||
def as_range_min_rate(self, as_range_min_rate: RangeMinRate):
|
||||
self._as_range_min_rate.default_value = as_range_min_rate.value
|
||||
|
||||
@property
|
||||
def max_rate_1920x1080(self) -> int:
|
||||
"""
|
||||
Set and get maximum rate for resolution 1920x1080
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self._max_rate_1920x1080.default_value
|
||||
|
||||
@max_rate_1920x1080.setter
|
||||
def max_rate_1920x1080(self, max_rate_1920x1080: int):
|
||||
if not (
|
||||
self._max_rate_1920x1080.min_value <= max_rate_1920x1080 < self._max_rate_1920x1080.max_value):
|
||||
raise ValueError(f"Max rate for 1920x1080 cannot be less than "
|
||||
f"{self._max_rate_1920x1080.min_value} and more than "
|
||||
f"{self._max_rate_1920x1080.max_value}.")
|
||||
self._max_rate_1920x1080.default_value = max_rate_1920x1080
|
||||
|
||||
@property
|
||||
def max_rate_2560x1080(self) -> int:
|
||||
"""
|
||||
Set and get maximum rate for resolution 2560x1080
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self._max_rate_2560x1080.default_value
|
||||
|
||||
@max_rate_2560x1080.setter
|
||||
def max_rate_2560x1080(self, max_rate_2560x1080: int):
|
||||
if not (
|
||||
self._max_rate_2560x1080.min_value <= max_rate_2560x1080 < self._max_rate_2560x1080.max_value):
|
||||
raise ValueError(f"Max rate for 2560x1080 cannot be less than "
|
||||
f"{self._max_rate_2560x1080.min_value} and more than "
|
||||
f"{self._max_rate_2560x1080.max_value}.")
|
||||
self._max_rate_2560x1080.default_value = max_rate_2560x1080
|
||||
|
||||
@property
|
||||
def max_rate_2560x1440(self) -> int:
|
||||
"""
|
||||
Set and get maximum rate for resolution 2560x1440
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self._max_rate_2560x1440.default_value
|
||||
|
||||
@max_rate_2560x1440.setter
|
||||
def max_rate_2560x1440(self, max_rate_2560x1440: int):
|
||||
if not (
|
||||
self._max_rate_2560x1440.min_value <= max_rate_2560x1440 < self._max_rate_2560x1440.max_value):
|
||||
raise ValueError(f"Max rate for 2560x1080 cannot be less than "
|
||||
f"{self._max_rate_2560x1440.min_value} and more than "
|
||||
f"{self._max_rate_2560x1440.max_value}.")
|
||||
self._max_rate_2560x1440.default_value = max_rate_2560x1440
|
||||
|
||||
@property
|
||||
def max_rate_3840x2160(self) -> int:
|
||||
"""
|
||||
Set and get maximum rate for resolution 3840x2160
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self._max_rate_3840x2160.default_value
|
||||
|
||||
@max_rate_3840x2160.setter
|
||||
def max_rate_3840x2160(self, max_rate_3840x2160: int):
|
||||
if not (
|
||||
self._max_rate_3840x2160.min_value <= max_rate_3840x2160 < self._max_rate_3840x2160.max_value):
|
||||
raise ValueError(f"Max rate for 3840x2160 cannot be less than "
|
||||
f"{self._max_rate_3840x2160.min_value} and more than "
|
||||
f"{self._max_rate_3840x2160.max_value}.")
|
||||
self._max_rate_3840x2160.default_value = max_rate_3840x2160
|
||||
|
||||
@property
|
||||
def max_rate_4096x2160(self) -> int:
|
||||
"""
|
||||
Set and get maximum rate for resolution 4096x2160
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self._max_rate_4096x2160.default_value
|
||||
|
||||
@max_rate_4096x2160.setter
|
||||
def max_rate_4096x2160(self, max_rate_4096x2160: int):
|
||||
if not (
|
||||
self._max_rate_4096x2160.min_value <= max_rate_4096x2160 < self._max_rate_4096x2160.max_value):
|
||||
raise ValueError(f"Max rate for 4096x2160 cannot be less than "
|
||||
f"{self._max_rate_4096x2160.min_value} and more than "
|
||||
f"{self._max_rate_4096x2160.max_value}.")
|
||||
self._max_rate_4096x2160.default_value = max_rate_4096x2160
|
||||
|
||||
@property
|
||||
def max_rate_5120x2160(self) -> int:
|
||||
"""
|
||||
Set and get maximum rate for resolution 5120x2160
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self._max_rate_5120x2160.default_value
|
||||
|
||||
@max_rate_5120x2160.setter
|
||||
def max_rate_5120x2160(self, max_rate_5120x2160: int):
|
||||
if not (
|
||||
self._max_rate_5120x2160.min_value <= max_rate_5120x2160 < self._max_rate_5120x2160.max_value):
|
||||
raise ValueError(f"Max rate for 5120x2160 cannot be less than "
|
||||
f"{self._max_rate_5120x2160.min_value} and more than "
|
||||
f"{self._max_rate_5120x2160.max_value}.")
|
||||
self._max_rate_5120x2160.default_value = max_rate_5120x2160
|
||||
|
||||
@property
|
||||
def max_rate_7680x4320(self) -> int:
|
||||
"""
|
||||
Set and get maximum rate for resolution 7680x4320
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self._max_rate_7680x4320.default_value
|
||||
|
||||
@max_rate_7680x4320.setter
|
||||
def max_rate_7680x4320(self, max_rate_7680x4320: int):
|
||||
if not (
|
||||
self._max_rate_7680x4320.min_value <= max_rate_7680x4320 < self._max_rate_7680x4320.max_value):
|
||||
raise ValueError(f"Max rate for 7680x4320 cannot be less than "
|
||||
f"{self._max_rate_7680x4320.min_value} and more than "
|
||||
f"{self._max_rate_7680x4320.max_value}.")
|
||||
self._max_rate_7680x4320.default_value = max_rate_7680x4320
|
||||
|
||||
@property
|
||||
def max_rate_10240x4320(self) -> int:
|
||||
"""
|
||||
Set and get maximum rate for resolution 10240x4320
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self._max_rate_10240x4320.default_value
|
||||
|
||||
@max_rate_10240x4320.setter
|
||||
def max_rate_10240x4320(self, max_rate_10240x4320: int):
|
||||
if not (
|
||||
self._max_rate_10240x4320.min_value <= max_rate_10240x4320 < self._max_rate_10240x4320.max_value):
|
||||
raise ValueError(f"Max rate for 10240x4320 cannot be less than "
|
||||
f"{self._max_rate_10240x4320.min_value} and more than "
|
||||
f"{self._max_rate_10240x4320.max_value}.")
|
||||
self._max_rate_10240x4320.default_value = max_rate_10240x4320
|
||||
|
||||
def clear_max_rates(self):
|
||||
"""
|
||||
Clear rates settings.
|
||||
"""
|
||||
self.max_rate_1920x1080 = 0
|
||||
self.max_rate_2560x1080 = 0
|
||||
self.max_rate_2560x1440 = 0
|
||||
self.max_rate_3840x2160 = 0
|
||||
self.max_rate_4096x2160 = 0
|
||||
self.max_rate_5120x2160 = 0
|
||||
self.max_rate_7680x4320 = 0
|
||||
self.max_rate_10240x4320 = 0
|
||||
|
||||
|
||||
class AdaptiveSyncDp14ConfigTab(AdaptiveSyncDpConfigTabBase):
|
||||
"""
|
||||
Class `AdaptiveSyncDp14ConfigTab` allows working with parameters for DP 1.4 Adaptive-Sync tests.
|
||||
- Set and get capabilities `as_caps` type `AdaptiveSyncDp14Caps`.
|
||||
- Set and get adaptive-sync range minimum rate `as_range_min_rate` type `RangeMinRate`.
|
||||
- Set and get maximum rate for resolution 1920x1080 `max_rate_1920x1080`.
|
||||
- Set and get maximum rate for resolution 2560x1080 `max_rate_2560x1080`.
|
||||
- Set and get maximum rate for resolution 2560x1440 `max_rate_2560x1440`.
|
||||
- Set and get maximum rate for resolution 3840x2160 `max_rate_3840x2160`.
|
||||
- Set and get maximum rate for resolution 4096x2160 `max_rate_4096x2160`.
|
||||
- Set and get maximum rate for resolution 5120x2160 `max_rate_5120x2160`.
|
||||
- Set and get maximum rate for resolution 7680x4320 `max_rate_7680x4320`.
|
||||
- Set and get maximum rate for resolution 10240x4320 `max_rate_10240x4320`.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
super().__init__(AdaptiveSyncDpCaps(json_obj["TSI_DP14_SRCCTS_AS_DUT_CAPS"]),
|
||||
Param(json_obj["TSI_DP14_SRCCTS_AS_RANGE_MIN_RATE"]),
|
||||
Param(json_obj["TSI_DP14_SRCCTS_AS_RANGE_MAX_RATE_0"]),
|
||||
Param(json_obj["TSI_DP14_SRCCTS_AS_RANGE_MAX_RATE_1"]),
|
||||
Param(json_obj["TSI_DP14_SRCCTS_AS_RANGE_MAX_RATE_2"]),
|
||||
Param(json_obj["TSI_DP14_SRCCTS_AS_RANGE_MAX_RATE_3"]),
|
||||
Param(json_obj["TSI_DP14_SRCCTS_AS_RANGE_MAX_RATE_4"]),
|
||||
Param(json_obj["TSI_DP14_SRCCTS_AS_RANGE_MAX_RATE_5"]),
|
||||
Param(json_obj["TSI_DP14_SRCCTS_AS_RANGE_MAX_RATE_6"]),
|
||||
Param(json_obj["TSI_DP14_SRCCTS_AS_RANGE_MAX_RATE_7"])
|
||||
)
|
||||
|
||||
|
||||
class AdaptiveSyncDp21ConfigTab(AdaptiveSyncDpConfigTabBase):
|
||||
"""
|
||||
Class `AdaptiveSyncDp21ConfigTab` inherited of class`AdaptiveSyncDp14ConfigTab` allows working with
|
||||
parameters for DP 2.1 Adaptive-Sync tests
|
||||
Class `AdaptiveSyncDp21ConfigTab` has all the `AdaptiveSyncDp14ConfigTab` functionality.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
super().__init__(AdaptiveSyncDpCaps(json_obj["TSI_DP20_SRCCTS_AS_DUT_CAPS"]),
|
||||
Param(json_obj["TSI_DP20_SRCCTS_AS_RANGE_MIN_RATE"]),
|
||||
Param(json_obj["TSI_DP20_SRCCTS_AS_RANGE_MAX_RATE_0"]),
|
||||
Param(json_obj["TSI_DP20_SRCCTS_AS_RANGE_MAX_RATE_1"]),
|
||||
Param(json_obj["TSI_DP20_SRCCTS_AS_RANGE_MAX_RATE_2"]),
|
||||
Param(json_obj["TSI_DP20_SRCCTS_AS_RANGE_MAX_RATE_3"]),
|
||||
Param(json_obj["TSI_DP20_SRCCTS_AS_RANGE_MAX_RATE_4"]),
|
||||
Param(json_obj["TSI_DP20_SRCCTS_AS_RANGE_MAX_RATE_5"]),
|
||||
Param(json_obj["TSI_DP20_SRCCTS_AS_RANGE_MAX_RATE_6"]),
|
||||
Param(json_obj["TSI_DP20_SRCCTS_AS_RANGE_MAX_RATE_7"])
|
||||
)
|
||||
@@ -0,0 +1,305 @@
|
||||
from typing import List
|
||||
from enum import IntEnum
|
||||
|
||||
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
|
||||
|
||||
|
||||
class AudioTestPattern(IntEnum):
|
||||
"""
|
||||
Describes available values for audio test pattern.
|
||||
"""
|
||||
OperatorSpecificWaveform = 0
|
||||
SawtoothWaveform = 1
|
||||
|
||||
|
||||
class AudioDpChannelsConfig:
|
||||
"""
|
||||
Class `AudioDp14ChannelsConfig` allows working with audio channel configurations.
|
||||
- Get Channel count `channels_count`.
|
||||
- Select type of audio channel `select_channels`.
|
||||
|
||||
List of audio channel types:
|
||||
- FL+FR
|
||||
- RL+RR
|
||||
- FLH+FRH
|
||||
- TC
|
||||
- LFE
|
||||
- RLC+RRC
|
||||
- FLW+FRW
|
||||
- FHC
|
||||
- FC
|
||||
- RC
|
||||
- FLC+FRC
|
||||
"""
|
||||
__AUDIO_CHANNELS_INFO = {"FL+FR": 0x001, "RL+RR": 0x008, "FLH+FRH": 0x100, "TC": 0x200, 'LFE': 0x002,
|
||||
"RLC+RRC": 0x040, "FLW+FRW": 0x080, "FHC": 0x400, 'FC': 0x004, 'RC': 0x010,
|
||||
"FLC+FRC": 0x020}
|
||||
|
||||
__AUDIO_CHANNELS_COUNT = {0x001: 2, 0x008: 2, 0x100: 2, 0x200: 1, 0x002: 1, 0x040: 2, 0x080: 2, 0x400: 1, 0x004: 1,
|
||||
0x010: 1, 0x020: 2}
|
||||
|
||||
__AUDIO_CHANNELS_VARIANTS = '\n'.join(__AUDIO_CHANNELS_INFO.keys())
|
||||
|
||||
def __init__(self, parameters):
|
||||
self.__channels_count = parameters[0]
|
||||
self.__channels_config = parameters[1]
|
||||
|
||||
@property
|
||||
def channels_count(self) -> int:
|
||||
"""
|
||||
Get channels count.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__channels_count.default_value
|
||||
|
||||
def __check_audio(self, channel_type: str) -> bool:
|
||||
old_value = new_value = self.__channels_config.default_value
|
||||
new_value &= ~ self.__AUDIO_CHANNELS_INFO.get(channel_type)
|
||||
return old_value == new_value
|
||||
|
||||
def __already_selected(self) -> List[str]:
|
||||
selected = []
|
||||
for item in self.__AUDIO_CHANNELS_INFO.keys():
|
||||
if self.__channels_config.default_value & self.__AUDIO_CHANNELS_INFO.get(item):
|
||||
selected.append(item)
|
||||
return selected
|
||||
|
||||
def select_channels(self, channels: List[str], enable: bool):
|
||||
"""
|
||||
Set channels types.
|
||||
|
||||
Args:
|
||||
channels (list[str])
|
||||
enable (bool)
|
||||
"""
|
||||
if all(item in list(self.__AUDIO_CHANNELS_INFO.keys()) for item in channels) is False:
|
||||
channels_type = '\n'.join(channels)
|
||||
raise ValueError(f"Incorrect channels type{'s' if len(channels) > 1 else ''} {channels_type}. "
|
||||
f"Available audio channels variants:\n{self.__AUDIO_CHANNELS_VARIANTS}")
|
||||
if enable:
|
||||
count = int(self.channels_count)
|
||||
new_value = self.__channels_config.default_value
|
||||
for channel_type in channels:
|
||||
if self.__check_audio(channel_type):
|
||||
count += self.__AUDIO_CHANNELS_COUNT.get(self.__AUDIO_CHANNELS_INFO.get(channel_type))
|
||||
new_value |= self.__AUDIO_CHANNELS_INFO.get(channel_type)
|
||||
if count >= 9:
|
||||
already_selected_list = self.__already_selected()
|
||||
already_selected_list.extend(channels)
|
||||
already_selected = ', '.join(already_selected_list)
|
||||
raise ValueError(f"Max supported audio channels = 8. Current channels count = {count}, "
|
||||
f"selected - {already_selected}")
|
||||
else:
|
||||
self.__channels_config.default_value |= new_value
|
||||
self.__channels_count.default_value = count
|
||||
else:
|
||||
count = 0
|
||||
old_value = new_value = self.__channels_config.default_value
|
||||
for channel_type in channels:
|
||||
if not self.__check_audio(channel_type):
|
||||
count += self.__AUDIO_CHANNELS_COUNT.get(self.__AUDIO_CHANNELS_INFO.get(channel_type))
|
||||
new_value &= ~self.__AUDIO_CHANNELS_INFO.get(channel_type)
|
||||
if old_value != new_value:
|
||||
self.__channels_count.default_value -= count
|
||||
self.__channels_config.default_value = new_value
|
||||
|
||||
def clear_all(self):
|
||||
"""
|
||||
Clear channel count and configs.
|
||||
"""
|
||||
self.__channels_count.default_value = 0
|
||||
self.__channels_config.default_value = 0
|
||||
|
||||
|
||||
class AudioSourceDpSettingTabBase:
|
||||
__SAMPLE_RATE = [32000, 44100, 48000, 88200, 96000, 176400, 192000]
|
||||
__available_variants = '\n'.join(map(str, __SAMPLE_RATE))
|
||||
|
||||
def __init__(self,
|
||||
min_sample_rate,
|
||||
max_sample_rate,
|
||||
min_ch_config_min_rate,
|
||||
max_ch_config_min_rate,
|
||||
min_ch_config_max_rate,
|
||||
max_ch_config_max_rate,
|
||||
audio_pattern,
|
||||
sample_size):
|
||||
self.__min_sample_rate = min_sample_rate
|
||||
self.__max_sample_rate = max_sample_rate
|
||||
self.__min_ch_config_min_rate = AudioDpChannelsConfig(min_ch_config_min_rate)
|
||||
self.__max_ch_config_min_rate = AudioDpChannelsConfig(max_ch_config_min_rate)
|
||||
self.__min_ch_config_max_rate = AudioDpChannelsConfig(min_ch_config_max_rate)
|
||||
self.__max_ch_config_max_rate = AudioDpChannelsConfig(max_ch_config_max_rate)
|
||||
self.__audio_pattern = audio_pattern # AudioTestPattern
|
||||
self.__sample_size = sample_size
|
||||
|
||||
@property
|
||||
def min_sample_rate(self) -> int:
|
||||
"""
|
||||
Set and get minimum sample rate.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return int(self.__min_sample_rate.default_value)
|
||||
|
||||
@min_sample_rate.setter
|
||||
def min_sample_rate(self, min_sample_rate: int):
|
||||
if min_sample_rate not in self.__SAMPLE_RATE:
|
||||
raise ValueError(
|
||||
f"Value {min_sample_rate} not in available variants:\n{self.__available_variants}")
|
||||
self.__min_sample_rate.default_value = min_sample_rate
|
||||
|
||||
@property
|
||||
def max_sample_rate(self) -> int:
|
||||
"""
|
||||
Set and get maximum sample rate.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return int(self.__max_sample_rate.default_value)
|
||||
|
||||
@max_sample_rate.setter
|
||||
def max_sample_rate(self, max_sample_rate: int):
|
||||
if max_sample_rate not in self.__SAMPLE_RATE:
|
||||
raise ValueError(
|
||||
f"Value {max_sample_rate} not in available variants:\n{self.__available_variants}")
|
||||
self.__max_sample_rate.default_value = max_sample_rate
|
||||
|
||||
@property
|
||||
def min_ch_config_min_rate(self) -> AudioDpChannelsConfig:
|
||||
"""
|
||||
Get object of config minimum channels and minimum sample rate.
|
||||
|
||||
Returns:
|
||||
object of `AudioDp14ChannelsConfig` type
|
||||
"""
|
||||
return self.__min_ch_config_min_rate
|
||||
|
||||
@property
|
||||
def max_ch_config_min_rate(self) -> AudioDpChannelsConfig:
|
||||
"""
|
||||
Get object of config maximum channels and minimum sample rate.
|
||||
|
||||
Returns:
|
||||
object of `AudioDp14ChannelsConfig` type
|
||||
"""
|
||||
return self.__max_ch_config_min_rate
|
||||
|
||||
@property
|
||||
def min_ch_config_max_rate(self) -> AudioDpChannelsConfig:
|
||||
"""
|
||||
Get object of config minimum channels and maximum sample rate.
|
||||
|
||||
Returns:
|
||||
object of `AudioDp14ChannelsConfig` type
|
||||
"""
|
||||
return self.__min_ch_config_max_rate
|
||||
|
||||
@property
|
||||
def max_ch_config_max_rate(self) -> AudioDpChannelsConfig:
|
||||
"""
|
||||
Get object of config maximum channels and maximum sample rate.
|
||||
|
||||
Returns:
|
||||
object of `AudioDp14ChannelsConfig` type
|
||||
"""
|
||||
return self.__max_ch_config_max_rate
|
||||
|
||||
@property
|
||||
def audio_pattern(self):
|
||||
"""
|
||||
Set and get audio pattern.
|
||||
|
||||
Returns:
|
||||
object of `AudioTestPattern` type
|
||||
"""
|
||||
return self.__audio_pattern
|
||||
|
||||
@audio_pattern.setter
|
||||
def audio_pattern(self, audio_pattern: AudioTestPattern):
|
||||
self.__audio_pattern.default_value = audio_pattern.value
|
||||
|
||||
@property
|
||||
def sample_size(self) -> int:
|
||||
"""
|
||||
Set and get sample size.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return int(self.__sample_size.default_value)
|
||||
|
||||
@sample_size.setter
|
||||
def sample_size(self, sample_size: int):
|
||||
if sample_size not in [16, 20, 24]:
|
||||
raise ValueError(f"Value {sample_size} not in available variants:\n16\n20\n24\n")
|
||||
self.__sample_size.default_value = sample_size
|
||||
|
||||
def clear_all(self):
|
||||
"""
|
||||
Clear all settings.
|
||||
"""
|
||||
self.__min_sample_rate.default_value = 32000
|
||||
self.__max_sample_rate.default_value = 32000
|
||||
self.min_ch_config_min_rate.clear_all()
|
||||
self.max_ch_config_min_rate.clear_all()
|
||||
self.min_ch_config_max_rate.clear_all()
|
||||
self.max_ch_config_max_rate.clear_all()
|
||||
self.__sample_size.default_value = 16
|
||||
|
||||
|
||||
class AudioSourceDp14SettingTab(AudioSourceDpSettingTabBase):
|
||||
"""
|
||||
Class `AudioSourceDp14SettingTab` allows working with audio parameters for DP 1.4 DP LLCTS tests.
|
||||
- Set and get minimum sample rate `min_sample_rate`.
|
||||
- Set and get maximum sample rate `max_sample_rate`.
|
||||
- Set and get minimum channels and minimum sample rate `min_ch_config_min_rate` type `AudioDp14ChannelsConfig`.
|
||||
- Set and get maximum channels and minimum sample rate `max_ch_config_min_rate` type `AudioDp14ChannelsConfig`.
|
||||
- Set and get minimum channels and maximum sample rate `min_ch_config_max_rate` type `AudioDp14ChannelsConfig`.
|
||||
- Set and get maximum channels and maximum sample rate `max_ch_config_max_rate` type `AudioDp14ChannelsConfig`.
|
||||
- Set and get audio pattern `audio_pattern` type `AudioTestPattern`.
|
||||
- Set and get sample `sample_size``.
|
||||
"""
|
||||
|
||||
def __init__(self, json_obj):
|
||||
super().__init__(
|
||||
Param(json_obj["TSI_DP14_SRCCTS_MIN_SAMPLE_RATE"]),
|
||||
Param(json_obj["TSI_DP14_SRCCTS_MAX_SAMPLE_RATE"]),
|
||||
(Param(json_obj["TSI_DP14_SRCCTS_CHANNELS1"]),
|
||||
Param(json_obj["TSI_DP14_SRCCTS_CH_ALLOC1"])),
|
||||
(Param(json_obj["TSI_DP14_SRCCTS_CHANNELS2"]),
|
||||
Param(json_obj["TSI_DP14_SRCCTS_CH_ALLOC2"])),
|
||||
(Param(json_obj["TSI_DP14_SRCCTS_CHANNELS3"]),
|
||||
Param(json_obj["TSI_DP14_SRCCTS_CH_ALLOC3"])),
|
||||
(Param(json_obj["TSI_DP14_SRCCTS_CHANNELS4"]),
|
||||
Param(json_obj["TSI_DP14_SRCCTS_CH_ALLOC4"])),
|
||||
Param(json_obj["TSI_DP14_SRCCTS_AUDIO_TEST_PATTERN"]),
|
||||
Param(json_obj["TSI_DP14_SRCCTS_EDID_SAMPLE_SIZE"])
|
||||
)
|
||||
|
||||
|
||||
class AudioSourceDp21SettingTab(AudioSourceDpSettingTabBase):
|
||||
"""
|
||||
Class `AudioSourceDp21SettingTab` inherited of class`AudioSourceDp14SettingTab` allows working with
|
||||
audio parameters for DP 1.4 DP LLCTS tests.
|
||||
Class `AudioSourceDp21SettingTab` has all the `AudioSourceDp14SettingTab` functionality.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
super().__init__(
|
||||
Param(json_obj["TSI_DP20_SRCCTS_MIN_SAMPLE_RATE"]),
|
||||
Param(json_obj["TSI_DP20_SRCCTS_MAX_SAMPLE_RATE"]),
|
||||
(Param(json_obj["TSI_DP20_SRCCTS_CHANNELS1"]),
|
||||
Param(json_obj["TSI_DP20_SRCCTS_CH_ALLOC1"])),
|
||||
(Param(json_obj["TSI_DP20_SRCCTS_CHANNELS2"]),
|
||||
Param(json_obj["TSI_DP20_SRCCTS_CH_ALLOC2"])),
|
||||
(Param(json_obj["TSI_DP20_SRCCTS_CHANNELS3"]),
|
||||
Param(json_obj["TSI_DP20_SRCCTS_CH_ALLOC3"])),
|
||||
(Param(json_obj["TSI_DP20_SRCCTS_CHANNELS4"]),
|
||||
Param(json_obj["TSI_DP20_SRCCTS_CH_ALLOC4"])),
|
||||
Param(json_obj["TSI_DP20_SRCCTS_AUDIO_TEST_PATTERN"]),
|
||||
Param(json_obj["TSI_DP20_SRCCTS_EDID_SAMPLE_SIZE"])
|
||||
)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,703 @@
|
||||
from enum import IntEnum
|
||||
from typing import Tuple
|
||||
from UniTAP.dev.modules.dut_tests.test_utils import CMTFormat, CMTVSCFormat, CMTBitDepth, CMTVSCBitDepth,\
|
||||
make_cf, make_vsc_cf
|
||||
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
|
||||
|
||||
|
||||
class Timing:
|
||||
"""
|
||||
Class `Timing` describes available supported timings standard.
|
||||
- CTA `cta` (enable/disable).
|
||||
- RB1 `rb1` (enable/disable).
|
||||
- RB2 `rb2` (enable/disable).
|
||||
- Set all standards `set_all`.
|
||||
"""
|
||||
def __init__(self, timing_value):
|
||||
self.__value = Param(timing_value)
|
||||
|
||||
@property
|
||||
def cta(self) -> bool:
|
||||
"""
|
||||
Set and get CTA flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return bool(self.__value._get_by_bitmask(0))
|
||||
|
||||
@property
|
||||
def rb1(self) -> bool:
|
||||
"""
|
||||
Set and get RB1 flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return bool(self.__value._get_by_bitmask(1))
|
||||
|
||||
@property
|
||||
def rb2(self) -> bool:
|
||||
"""
|
||||
Set and get RB2 flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return bool(self.__value._get_by_bitmask(2))
|
||||
|
||||
@cta.setter
|
||||
def cta(self, value: bool):
|
||||
self.__value._set_by_bitmask(value, 0)
|
||||
|
||||
@rb1.setter
|
||||
def rb1(self, value: bool):
|
||||
self.__value._set_by_bitmask(value, 1)
|
||||
|
||||
@rb2.setter
|
||||
def rb2(self, value: bool):
|
||||
self.__value._set_by_bitmask(value, 2)
|
||||
|
||||
def set_all(self):
|
||||
self.cta = True
|
||||
self.rb1 = True
|
||||
self.rb2 = True
|
||||
|
||||
def clear_all(self):
|
||||
self.cta = False
|
||||
self.rb1 = False
|
||||
self.rb2 = False
|
||||
|
||||
|
||||
class ColorimetryDp14:
|
||||
"""
|
||||
Class `ColorimetryDp14` describes optional and additional color modes to be used with DP CTS tests.
|
||||
- RGB 8 bpc VESA `rgb_8bpc_vesa`.
|
||||
- RGB 10 bpc VESA `rgb_10bpc_vesa`.
|
||||
- RGB 12 bpc VESA `rgb_12bpc_vesa`.
|
||||
- YCbCr-444 8 bpc CTA ITU-709 `ycbcr444_8bpc_cta_itu709`.
|
||||
- YCbCr-444 10 bpc CTA ITU-709 `ycbcr444_10bpc_cta_itu709`.
|
||||
- YCbCr-444 12 bpc CTA ITU-709 `ycbcr444_12bpc_cta_itu709`.
|
||||
- YCbCr-422 8 bpc CTA ITU-709 `ycbcr422_8bpc_cta_itu709`.
|
||||
- YCbCr-422 10 bpc CTA ITU-709 `ycbcr422_10bpc_cta_itu709`.
|
||||
- YCbCr-422 12 bpc CTA ITU-709 `ycbcr422_10bpc_cta_itu709`.
|
||||
- YCbCr-422 simple 8 bpc CTA ITU-709 `ycbcr422_simple_8bpc_cta_itu709`.
|
||||
- YCbCr-422 simple 10 bpc CTA ITU-709 `ycbcr422_simple_10bpc_cta_itu709`.
|
||||
- YCbCr-422 simple 12 bpc CTA ITU-709 `ycbcr422_simple_12bpc_cta_itu709`.
|
||||
- YCbCr-420 8 bpc CTA ITU-709 `ycbcr420_8bpc_cta_itu709`.
|
||||
- YCbCr-420 10 bpc CTA ITU-709 `ycbcr420_10bpc_cta_itu709`.
|
||||
- YCbCr-420 12 bpc CTA ITU-709 `ycbcr420_12bpc_cta_itu709`.
|
||||
- Clear all settings `clear_all`.
|
||||
- Select all settings `select_all`.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__rgb_8bpc_vesa = Param(json_obj["TSI_DP14_SRCCTS_DSC_COLOR_MODE_0"])
|
||||
self.__rgb_10bpc_vesa = Param(json_obj["TSI_DP14_SRCCTS_DSC_COLOR_MODE_1"])
|
||||
self.__rgb_12bpc_vesa = Param(json_obj["TSI_DP14_SRCCTS_DSC_COLOR_MODE_2"])
|
||||
|
||||
self.__ycbcr444_8bpc_cta_itu709 = Param(json_obj["TSI_DP14_SRCCTS_DSC_COLOR_MODE_3"])
|
||||
self.__ycbcr444_10bpc_cta_itu709 = Param(json_obj["TSI_DP14_SRCCTS_DSC_COLOR_MODE_4"])
|
||||
self.__ycbcr444_12bpc_cta_itu709 = Param(json_obj["TSI_DP14_SRCCTS_DSC_COLOR_MODE_5"])
|
||||
|
||||
self.__ycbcr422_8bpc_cta_itu709 = Param(json_obj["TSI_DP14_SRCCTS_DSC_COLOR_MODE_6"])
|
||||
self.__ycbcr422_10bpc_cta_itu709 = Param(json_obj["TSI_DP14_SRCCTS_DSC_COLOR_MODE_7"])
|
||||
self.__ycbcr422_12bpc_cta_itu709 = Param(json_obj["TSI_DP14_SRCCTS_DSC_COLOR_MODE_8"])
|
||||
|
||||
self.__ycbcr422_simple_8bpc_cta_itu709 = Param(json_obj["TSI_DP14_SRCCTS_DSC_COLOR_MODE_9"])
|
||||
self.__ycbcr422_simple_10bpc_cta_itu709 = Param(json_obj["TSI_DP14_SRCCTS_DSC_COLOR_MODE_10"])
|
||||
self.__ycbcr422_simple_12bpc_cta_itu709 = Param(json_obj["TSI_DP14_SRCCTS_DSC_COLOR_MODE_11"])
|
||||
|
||||
self.__ycbcr420_8bpc_cta_itu709 = Param(json_obj["TSI_DP14_SRCCTS_DSC_COLOR_MODE_12"])
|
||||
self.__ycbcr420_10bpc_cta_itu709 = Param(json_obj["TSI_DP14_SRCCTS_DSC_COLOR_MODE_13"])
|
||||
self.__ycbcr420_12bpc_cta_itu709 = Param(json_obj["TSI_DP14_SRCCTS_DSC_COLOR_MODE_14"])
|
||||
|
||||
# Pass 126-142
|
||||
|
||||
self.__color_formats = Param(json_obj["TSI_DP14_SRCCTS_DSC_COLOR_FORMATS"])
|
||||
self.__color_formats.default_value = 32
|
||||
|
||||
def clear_all(self):
|
||||
"""
|
||||
Clear all modes (disable).
|
||||
"""
|
||||
self.rgb_8bpc_vesa = False
|
||||
self.rgb_10bpc_vesa = False
|
||||
self.rgb_12bpc_vesa = False
|
||||
|
||||
self.ycbcr444_8bpc_cta_itu709 = False
|
||||
self.ycbcr444_10bpc_cta_itu709 = False
|
||||
self.ycbcr444_12bpc_cta_itu709 = False
|
||||
|
||||
self.ycbcr422_8bpc_cta_itu709 = False
|
||||
self.ycbcr422_10bpc_cta_itu709 = False
|
||||
self.ycbcr422_12bpc_cta_itu709 = False
|
||||
|
||||
self.ycbcr422_simple_8bpc_cta_itu709 = False
|
||||
self.ycbcr422_simple_10bpc_cta_itu709 = False
|
||||
self.ycbcr422_simple_12bpc_cta_itu709 = False
|
||||
|
||||
self.ycbcr420_8bpc_cta_itu709 = False
|
||||
self.ycbcr420_10bpc_cta_itu709 = False
|
||||
self.ycbcr420_12bpc_cta_itu709 = False
|
||||
|
||||
def select_all(self):
|
||||
"""
|
||||
Select all modes (enable).
|
||||
"""
|
||||
self.rgb_8bpc_vesa = True
|
||||
self.rgb_10bpc_vesa = True
|
||||
self.rgb_12bpc_vesa = True
|
||||
|
||||
self.ycbcr444_8bpc_cta_itu709 = True
|
||||
self.ycbcr444_10bpc_cta_itu709 = True
|
||||
self.ycbcr444_12bpc_cta_itu709 = True
|
||||
|
||||
self.ycbcr422_8bpc_cta_itu709 = True
|
||||
self.ycbcr422_10bpc_cta_itu709 = True
|
||||
self.ycbcr422_12bpc_cta_itu709 = True
|
||||
|
||||
self.ycbcr422_simple_8bpc_cta_itu709 = True
|
||||
self.ycbcr422_simple_10bpc_cta_itu709 = True
|
||||
self.ycbcr422_simple_12bpc_cta_itu709 = True
|
||||
|
||||
self.ycbcr420_8bpc_cta_itu709 = True
|
||||
self.ycbcr420_10bpc_cta_itu709 = True
|
||||
self.ycbcr420_12bpc_cta_itu709 = True
|
||||
|
||||
@property
|
||||
def rgb_8bpc_vesa(self):
|
||||
"""
|
||||
Set and get RGB 8 bpc VESA flag support.
|
||||
|
||||
Returns:
|
||||
object
|
||||
"""
|
||||
return self.__rgb_8bpc_vesa
|
||||
|
||||
@rgb_8bpc_vesa.setter
|
||||
def rgb_8bpc_vesa(self, value: bool):
|
||||
cf_value = make_cf(CMTFormat.RGB_LEGACY, CMTBitDepth.BPC_8) if value else 0
|
||||
if self.__rgb_8bpc_vesa.default_value != cf_value:
|
||||
self.__rgb_8bpc_vesa.default_value = cf_value
|
||||
|
||||
@property
|
||||
def rgb_10bpc_vesa(self):
|
||||
"""
|
||||
Set and get RGB 10 bpc VESA flag support.
|
||||
|
||||
Returns:
|
||||
object
|
||||
"""
|
||||
return self.__rgb_10bpc_vesa
|
||||
|
||||
@rgb_10bpc_vesa.setter
|
||||
def rgb_10bpc_vesa(self, value: bool):
|
||||
cf_value = make_cf(CMTFormat.RGB_LEGACY, CMTBitDepth.BPC_10) if value else 0
|
||||
if self.__rgb_10bpc_vesa.default_value != cf_value:
|
||||
self.__rgb_10bpc_vesa.default_value = cf_value
|
||||
|
||||
@property
|
||||
def rgb_12bpc_vesa(self):
|
||||
"""
|
||||
Set and get RGB 12 bpc VESA flag support.
|
||||
|
||||
Returns:
|
||||
object
|
||||
"""
|
||||
return self.__rgb_12bpc_vesa
|
||||
|
||||
@rgb_12bpc_vesa.setter
|
||||
def rgb_12bpc_vesa(self, value: bool):
|
||||
cf_value = make_cf(CMTFormat.RGB_LEGACY, CMTBitDepth.BPC_12) if value else 0
|
||||
if self.__rgb_12bpc_vesa.default_value != cf_value:
|
||||
self.__rgb_12bpc_vesa.default_value = cf_value
|
||||
|
||||
@property
|
||||
def ycbcr444_8bpc_cta_itu709(self):
|
||||
"""
|
||||
Set and get YCbCr-444 8 bpc CTA ITU-709 flag support.
|
||||
|
||||
Returns:
|
||||
object
|
||||
"""
|
||||
return self.__ycbcr444_8bpc_cta_itu709
|
||||
|
||||
@ycbcr444_8bpc_cta_itu709.setter
|
||||
def ycbcr444_8bpc_cta_itu709(self, value: bool):
|
||||
cf_value = make_cf(CMTFormat.YCBCR_444_BT709, CMTBitDepth.BPC_8) if value else 0
|
||||
if self.__ycbcr444_8bpc_cta_itu709.default_value != cf_value:
|
||||
self.__ycbcr444_8bpc_cta_itu709.default_value = cf_value
|
||||
|
||||
@property
|
||||
def ycbcr444_10bpc_cta_itu709(self):
|
||||
"""
|
||||
Set and get YCbCr-444 10 bpc CTA ITU-709 flag support.
|
||||
|
||||
Returns:
|
||||
object
|
||||
"""
|
||||
return self.__ycbcr444_10bpc_cta_itu709
|
||||
|
||||
@ycbcr444_10bpc_cta_itu709.setter
|
||||
def ycbcr444_10bpc_cta_itu709(self, value: bool):
|
||||
cf_value = make_cf(CMTFormat.YCBCR_444_BT709, CMTBitDepth.BPC_10) if value else 0
|
||||
if self.__ycbcr444_10bpc_cta_itu709.default_value != cf_value:
|
||||
self.__ycbcr444_10bpc_cta_itu709.default_value = cf_value
|
||||
|
||||
@property
|
||||
def ycbcr444_12bpc_cta_itu709(self):
|
||||
"""
|
||||
Set and get YCbCr-444 12 bpc CTA ITU-709 flag support.
|
||||
|
||||
Returns:
|
||||
object
|
||||
"""
|
||||
return self.__ycbcr444_12bpc_cta_itu709
|
||||
|
||||
@ycbcr444_12bpc_cta_itu709.setter
|
||||
def ycbcr444_12bpc_cta_itu709(self, value: bool):
|
||||
cf_value = make_cf(CMTFormat.YCBCR_444_BT709, CMTBitDepth.BPC_12) if value else 0
|
||||
if self.__ycbcr444_12bpc_cta_itu709.default_value != cf_value:
|
||||
self.__ycbcr444_12bpc_cta_itu709.default_value = cf_value
|
||||
|
||||
@property
|
||||
def ycbcr422_8bpc_cta_itu709(self):
|
||||
"""
|
||||
Set and get YCbCr-422 8 bpc CTA ITU-709 flag support.
|
||||
|
||||
Returns:
|
||||
object
|
||||
"""
|
||||
return self.__ycbcr422_8bpc_cta_itu709
|
||||
|
||||
@ycbcr422_8bpc_cta_itu709.setter
|
||||
def ycbcr422_8bpc_cta_itu709(self, value: bool):
|
||||
cf_value = make_cf(CMTFormat.YCBCR_422_BT709, CMTBitDepth.BPC_8) if value else 0
|
||||
if self.__ycbcr444_12bpc_cta_itu709.default_value != cf_value:
|
||||
self.__ycbcr444_12bpc_cta_itu709.default_value = cf_value
|
||||
|
||||
@property
|
||||
def ycbcr422_10bpc_cta_itu709(self):
|
||||
"""
|
||||
Set and get YCbCr-422 10 bpc CTA ITU-709 flag support.
|
||||
|
||||
Returns:
|
||||
object
|
||||
"""
|
||||
return self.__ycbcr422_10bpc_cta_itu709
|
||||
|
||||
@ycbcr422_10bpc_cta_itu709.setter
|
||||
def ycbcr422_10bpc_cta_itu709(self, value: bool):
|
||||
cf_value = make_cf(CMTFormat.YCBCR_422_BT709, CMTBitDepth.BPC_10) if value else 0
|
||||
if self.__ycbcr422_10bpc_cta_itu709.default_value != cf_value:
|
||||
self.__ycbcr422_10bpc_cta_itu709.default_value = cf_value
|
||||
|
||||
@property
|
||||
def ycbcr422_12bpc_cta_itu709(self):
|
||||
"""
|
||||
Set and get YCbCr-422 12 bpc CTA ITU-709 flag support.
|
||||
|
||||
Returns:
|
||||
object
|
||||
"""
|
||||
return self.__ycbcr422_12bpc_cta_itu709
|
||||
|
||||
@ycbcr422_12bpc_cta_itu709.setter
|
||||
def ycbcr422_12bpc_cta_itu709(self, value: bool):
|
||||
cf_value = make_cf(CMTFormat.YCBCR_422_BT709, CMTBitDepth.BPC_12) if value else 0
|
||||
if self.__ycbcr422_12bpc_cta_itu709.default_value != cf_value:
|
||||
self.__ycbcr422_12bpc_cta_itu709.default_value = cf_value
|
||||
|
||||
@property
|
||||
def ycbcr422_simple_8bpc_cta_itu709(self):
|
||||
"""
|
||||
Set and get YCbCr-422 Simple 8 bpc CTA ITU-709 flag support.
|
||||
|
||||
Returns:
|
||||
object
|
||||
"""
|
||||
return self.__ycbcr422_simple_8bpc_cta_itu709
|
||||
|
||||
@ycbcr422_simple_8bpc_cta_itu709.setter
|
||||
def ycbcr422_simple_8bpc_cta_itu709(self, value: bool):
|
||||
cf_value = make_vsc_cf(CMTVSCFormat.YCBCR_SIMPLE_422_BT709, CMTVSCBitDepth.BPC_YCBCR_8) if value else 0
|
||||
if self.__ycbcr422_simple_8bpc_cta_itu709.default_value != cf_value:
|
||||
self.__ycbcr422_simple_8bpc_cta_itu709.default_value = cf_value
|
||||
|
||||
@property
|
||||
def ycbcr422_simple_10bpc_cta_itu709(self):
|
||||
"""
|
||||
Set and get YCbCr-422 Simple 10 bpc CTA ITU-709 flag support.
|
||||
|
||||
Returns:
|
||||
object
|
||||
"""
|
||||
return self.__ycbcr422_simple_10bpc_cta_itu709
|
||||
|
||||
@ycbcr422_simple_10bpc_cta_itu709.setter
|
||||
def ycbcr422_simple_10bpc_cta_itu709(self, value: bool):
|
||||
cf_value = make_vsc_cf(CMTVSCFormat.YCBCR_SIMPLE_422_BT709, CMTVSCBitDepth.BPC_YCBCR_10) if value else 0
|
||||
if self.__ycbcr422_simple_10bpc_cta_itu709.default_value != cf_value:
|
||||
self.__ycbcr422_simple_10bpc_cta_itu709.default_value = cf_value
|
||||
|
||||
@property
|
||||
def ycbcr422_simple_12bpc_cta_itu709(self):
|
||||
"""
|
||||
Set and get YCbCr-422 Simple 12 bpc CTA ITU-709 flag support.
|
||||
|
||||
Returns:
|
||||
object
|
||||
"""
|
||||
return self.__ycbcr422_simple_12bpc_cta_itu709
|
||||
|
||||
@ycbcr422_simple_12bpc_cta_itu709.setter
|
||||
def ycbcr422_simple_12bpc_cta_itu709(self, value: bool):
|
||||
cf_value = make_vsc_cf(CMTVSCFormat.YCBCR_SIMPLE_422_BT709, CMTVSCBitDepth.BPC_YCBCR_12) if value else 0
|
||||
if self.__ycbcr422_simple_12bpc_cta_itu709.default_value != cf_value:
|
||||
self.__ycbcr422_simple_12bpc_cta_itu709.default_value = cf_value
|
||||
|
||||
@property
|
||||
def ycbcr420_8bpc_cta_itu709(self):
|
||||
"""
|
||||
Set and get YCbCr-420 8 bpc CTA ITU-709 flag support.
|
||||
|
||||
Returns:
|
||||
object
|
||||
"""
|
||||
return self.__ycbcr420_8bpc_cta_itu709
|
||||
|
||||
@ycbcr420_8bpc_cta_itu709.setter
|
||||
def ycbcr420_8bpc_cta_itu709(self, value: bool):
|
||||
cf_value = make_vsc_cf(CMTVSCFormat.YCBCR_420_BT709, CMTVSCBitDepth.BPC_YCBCR_8) if value else 0
|
||||
if self.__ycbcr420_8bpc_cta_itu709.default_value != cf_value:
|
||||
self.__ycbcr420_8bpc_cta_itu709.default_value = cf_value
|
||||
|
||||
@property
|
||||
def ycbcr420_10bpc_cta_itu709(self):
|
||||
"""
|
||||
Set and get YCbCr-420 10 bpc CTA ITU-709 flag support.
|
||||
|
||||
Returns:
|
||||
object
|
||||
"""
|
||||
return self.__ycbcr420_10bpc_cta_itu709
|
||||
|
||||
@ycbcr420_10bpc_cta_itu709.setter
|
||||
def ycbcr420_10bpc_cta_itu709(self, value: bool):
|
||||
cf_value = make_vsc_cf(CMTVSCFormat.YCBCR_420_BT709, CMTVSCBitDepth.BPC_YCBCR_10) if value else 0
|
||||
if self.__ycbcr420_10bpc_cta_itu709.default_value != cf_value:
|
||||
self.__ycbcr420_10bpc_cta_itu709.default_value = cf_value
|
||||
|
||||
@property
|
||||
def ycbcr420_12bpc_cta_itu709(self):
|
||||
"""
|
||||
Set and get YCbCr-420 12 bpc CTA ITU-709 flag support.
|
||||
|
||||
Returns:
|
||||
object
|
||||
"""
|
||||
return self.__ycbcr420_12bpc_cta_itu709
|
||||
|
||||
@ycbcr420_12bpc_cta_itu709.setter
|
||||
def ycbcr420_12bpc_cta_itu709(self, value: bool):
|
||||
cf_value = make_vsc_cf(CMTVSCFormat.YCBCR_420_BT709, CMTVSCBitDepth.BPC_YCBCR_12) if value else 0
|
||||
if self.__ycbcr420_12bpc_cta_itu709.default_value != cf_value:
|
||||
self.__ycbcr420_12bpc_cta_itu709.default_value = cf_value
|
||||
|
||||
|
||||
class DscVideoModesDp14:
|
||||
"""
|
||||
Class `DscVideoModesDp14` describes available timings for DSC tests.
|
||||
- 1920x1080 30Hz `vm_1920x1080_30hz`.
|
||||
- 1920x1080 60Hz `vm_1920x1080_60hz`.
|
||||
- 1920x1080 120Hz `vm_1920x1080_120hz`.
|
||||
- 3840x2160 30Hz `vm_3840x2160_30hz`.
|
||||
- 3840x2160 60Hz `vm_3840x2160_60hz`.
|
||||
- 3840x2160 120Hz `vm_3840x2160_120hz`.
|
||||
- 5120x2160 30Hz `vm_5120x2160_30hz`.
|
||||
- 5120x2160 60Hz `vm_5120x2160_60hz`.
|
||||
- 5120x2160 120Hz `vm_5120x2160_120hz`.
|
||||
- 7680x4320 30Hz `vm_7680x4320_30hz`.
|
||||
- 7680x4320 60Hz `vm_7680x4320_60hz`.
|
||||
- 7680x4320 100Hz `vm_7680x4320_120hz`.
|
||||
- Disable all timings `clear_all`.
|
||||
- Select all timings `select_all`.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__id_1920x1080_30Hz = Param(json_obj["TSI_DP14_SRCCTS_DSC_VMT_0_ID"])
|
||||
self.__lc_lr_1920x1080_30Hz = Param(json_obj["TSI_DP14_SRCCTS_DSC_VMT_0_LC_LR"])
|
||||
self.__1920x1080_30Hz = Timing(json_obj["TSI_DP14_SRCCTS_DSC_VMT_0_TIMINGS"])
|
||||
|
||||
self.__id_1920x1080_60Hz = Param(json_obj["TSI_DP14_SRCCTS_DSC_VMT_1_ID"])
|
||||
self.__lc_lr_1920x1080_60Hz = Param(json_obj["TSI_DP14_SRCCTS_DSC_VMT_1_LC_LR"])
|
||||
self.__1920x1080_60Hz = Timing(json_obj["TSI_DP14_SRCCTS_DSC_VMT_1_TIMINGS"])
|
||||
|
||||
self.__id_1920x1080_120Hz = Param(json_obj["TSI_DP14_SRCCTS_DSC_VMT_2_ID"])
|
||||
self.__lc_lr_1920x1080_120Hz = Param(json_obj["TSI_DP14_SRCCTS_DSC_VMT_2_LC_LR"])
|
||||
self.__1920x1080_120Hz = Timing(json_obj["TSI_DP14_SRCCTS_DSC_VMT_2_TIMINGS"])
|
||||
|
||||
self.__id_3840x2160_30Hz = Param(json_obj["TSI_DP14_SRCCTS_DSC_VMT_3_ID"])
|
||||
self.__lc_lr_3840x2160_30Hz = Param(json_obj["TSI_DP14_SRCCTS_DSC_VMT_3_LC_LR"])
|
||||
self.__3840x2160_30Hz = Timing(json_obj["TSI_DP14_SRCCTS_DSC_VMT_3_TIMINGS"])
|
||||
|
||||
self.__id_3840x2160_60Hz = Param(json_obj["TSI_DP14_SRCCTS_DSC_VMT_4_ID"])
|
||||
self.__lc_lr_3840x2160_60Hz = Param(json_obj["TSI_DP14_SRCCTS_DSC_VMT_4_LC_LR"])
|
||||
self.__3840x2160_60Hz = Timing(json_obj["TSI_DP14_SRCCTS_DSC_VMT_4_TIMINGS"])
|
||||
|
||||
self.__id_3840x2160_120Hz = Param(json_obj["TSI_DP14_SRCCTS_DSC_VMT_5_ID"])
|
||||
self.__lc_lr_3840x2160_120Hz = Param(json_obj["TSI_DP14_SRCCTS_DSC_VMT_5_LC_LR"])
|
||||
self.__3840x2160_120Hz = Timing(json_obj["TSI_DP14_SRCCTS_DSC_VMT_5_TIMINGS"])
|
||||
|
||||
self.__id_5120x2160_30Hz = Param(json_obj["TSI_DP14_SRCCTS_DSC_VMT_6_ID"])
|
||||
self.__lc_lr_5120x2160_30Hz = Param(json_obj["TSI_DP14_SRCCTS_DSC_VMT_6_LC_LR"])
|
||||
self.__5120x2160_30Hz = Timing(json_obj["TSI_DP14_SRCCTS_DSC_VMT_6_TIMINGS"])
|
||||
|
||||
self.__id_5120x2160_60Hz = Param(json_obj["TSI_DP14_SRCCTS_DSC_VMT_7_ID"])
|
||||
self.__lc_lr_5120x2160_60Hz = Param(json_obj["TSI_DP14_SRCCTS_DSC_VMT_7_LC_LR"])
|
||||
self.__5120x2160_60Hz = Timing(json_obj["TSI_DP14_SRCCTS_DSC_VMT_7_TIMINGS"])
|
||||
|
||||
self.__id_5120x2160_120Hz = Param(json_obj["TSI_DP14_SRCCTS_DSC_VMT_8_ID"])
|
||||
self.__lc_lr_5120x2160_120Hz = Param(json_obj["TSI_DP14_SRCCTS_DSC_VMT_8_LC_LR"])
|
||||
self.__5120x2160_120Hz = Timing(json_obj["TSI_DP14_SRCCTS_DSC_VMT_8_TIMINGS"])
|
||||
|
||||
self.__id_7680x4320_30Hz = Param(json_obj["TSI_DP14_SRCCTS_DSC_VMT_9_ID"])
|
||||
self.__lc_lr_7680x4320_30Hz = Param(json_obj["TSI_DP14_SRCCTS_DSC_VMT_9_LC_LR"])
|
||||
self.__7680x4320_30Hz = Timing(json_obj["TSI_DP14_SRCCTS_DSC_VMT_9_TIMINGS"])
|
||||
|
||||
self.__id_7680x4320_60Hz = Param(json_obj["TSI_DP14_SRCCTS_DSC_VMT_10_ID"])
|
||||
self.__lc_lr_7680x4320_60Hz = Param(json_obj["TSI_DP14_SRCCTS_DSC_VMT_10_LC_LR"])
|
||||
self.__7680x4320_60Hz = Timing(json_obj["TSI_DP14_SRCCTS_DSC_VMT_10_TIMINGS"])
|
||||
|
||||
self.__id_7680x4320_100Hz = Param(json_obj["TSI_DP14_SRCCTS_DSC_VMT_11_ID"])
|
||||
self.__lc_lr_7680x4320_100Hz = Param(json_obj["TSI_DP14_SRCCTS_DSC_VMT_11_LC_LR"])
|
||||
self.__7680x4320_100Hz = Timing(json_obj["TSI_DP14_SRCCTS_DSC_VMT_11_TIMINGS"])
|
||||
|
||||
@property
|
||||
def vm_1920x1080_30hz(self) -> Timing:
|
||||
"""
|
||||
Set and get 1920x1080 30Hz timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__1920x1080_30Hz
|
||||
|
||||
@property
|
||||
def vm_1920x1080_60hz(self) -> Timing:
|
||||
"""
|
||||
Set and get 1920x1080 60Hz timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__1920x1080_60Hz
|
||||
|
||||
@property
|
||||
def vm_1920x1080_120hz(self) -> Timing:
|
||||
"""
|
||||
Set and get 1920x1080 120Hz timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__1920x1080_120Hz
|
||||
|
||||
@property
|
||||
def vm_3840x2160_30hz(self) -> Timing:
|
||||
"""
|
||||
Set and get 3840x2160 30Hz timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__3840x2160_30Hz
|
||||
|
||||
@property
|
||||
def vm_3840x2160_60hz(self) -> Timing:
|
||||
"""
|
||||
Set and get 3840x2160 60Hz timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__3840x2160_60Hz
|
||||
|
||||
@property
|
||||
def vm_3840x2160_120hz(self) -> Timing:
|
||||
"""
|
||||
Set and get 3840x2160 120Hz timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__3840x2160_120Hz
|
||||
|
||||
@property
|
||||
def vm_5120x2160_30hz(self) -> Timing:
|
||||
"""
|
||||
Set and get 5120x2160 30Hz timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__5120x2160_30Hz
|
||||
|
||||
@property
|
||||
def vm_5120x2160_60hz(self) -> Timing:
|
||||
"""
|
||||
Set and get 5120x2160 60Hz timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__5120x2160_60Hz
|
||||
|
||||
@property
|
||||
def vm_5120x2160_120hz(self) -> Timing:
|
||||
"""
|
||||
Set and get 5120x2160 120Hz timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__5120x2160_120Hz
|
||||
|
||||
@property
|
||||
def vm_7680x4320_30hz(self) -> Timing:
|
||||
"""
|
||||
Set and get 7680x4320 30Hz timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__7680x4320_30Hz
|
||||
|
||||
@property
|
||||
def vm_7680x4320_60hz(self) -> Timing:
|
||||
"""
|
||||
Set and get 7680x4320 60Hz timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__7680x4320_60Hz
|
||||
|
||||
@property
|
||||
def vm_7680x4320_100hz(self) -> Timing:
|
||||
"""
|
||||
Set and get 7680x4320 100Hz timing flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__7680x4320_100Hz
|
||||
|
||||
def clear_all(self):
|
||||
"""
|
||||
Clear (disable) all timings.
|
||||
"""
|
||||
self.vm_1920x1080_30hz.clear_all()
|
||||
self.vm_1920x1080_60hz.clear_all()
|
||||
self.vm_1920x1080_120hz.clear_all()
|
||||
self.vm_3840x2160_30hz.clear_all()
|
||||
self.vm_3840x2160_60hz.clear_all()
|
||||
self.vm_3840x2160_120hz.clear_all()
|
||||
self.vm_5120x2160_30hz.clear_all()
|
||||
self.vm_5120x2160_60hz.clear_all()
|
||||
self.vm_5120x2160_120hz.clear_all()
|
||||
self.vm_7680x4320_30hz.clear_all()
|
||||
self.vm_7680x4320_60hz.clear_all()
|
||||
self.vm_7680x4320_100hz.clear_all()
|
||||
|
||||
def select_all(self):
|
||||
"""
|
||||
Select (enable) all timings.
|
||||
"""
|
||||
self.vm_1920x1080_30hz.set_all()
|
||||
self.vm_1920x1080_60hz.set_all()
|
||||
self.vm_1920x1080_120hz.set_all()
|
||||
self.vm_3840x2160_30hz.set_all()
|
||||
self.vm_3840x2160_60hz.set_all()
|
||||
self.vm_3840x2160_120hz.set_all()
|
||||
self.vm_5120x2160_30hz.set_all()
|
||||
self.vm_5120x2160_60hz.set_all()
|
||||
self.vm_5120x2160_120hz.set_all()
|
||||
self.vm_7680x4320_30hz.set_all()
|
||||
self.vm_7680x4320_60hz.set_all()
|
||||
self.vm_7680x4320_100hz.set_all()
|
||||
|
||||
|
||||
class DscConfigDp14Tab:
|
||||
"""
|
||||
Class `DscConfigDp14Tab` allows working with settings for DP DSC LLCTS tests.
|
||||
- Set and get DSC maximum slice number `dsc_max_slice`.
|
||||
- Set and get DSC version `dsc_version`.
|
||||
- Set and get DSC video modes `dsc_video_modes` type `DscVideoModesDp14`.
|
||||
- Set and get colorimetry `ColorimetryDp14`.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__dsc_max_slice = Param(json_obj["TSI_DP14_SRCCTS_DSC_DUT_MAX_SLICE"]) # DscMaxSliceNumber
|
||||
self.__dsc_version = Param(json_obj["TSI_DP14_SRCCTS_DSC_VERSION"]) # DscVersion
|
||||
self.__dsc_video_modes = DscVideoModesDp14(json_obj)
|
||||
self.__colorimetry = ColorimetryDp14(json_obj)
|
||||
|
||||
@property
|
||||
def dsc_max_slice(self) -> int:
|
||||
"""
|
||||
Set and get DSC maximum slice number.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__dsc_max_slice.default_value
|
||||
|
||||
@dsc_max_slice.setter
|
||||
def dsc_max_slice(self, dsc_max_slice: int):
|
||||
if dsc_max_slice not in [1, 2, 4, 8, 10, 12, 16, 20, 24]:
|
||||
raise ValueError(f"DSC Max slice count available values {[1, 2, 4, 8, 10, 12, 16, 20, 24]}")
|
||||
self.__dsc_max_slice.default_value = dsc_max_slice
|
||||
|
||||
@property
|
||||
def dsc_version(self) -> list:
|
||||
"""
|
||||
Set and get DSC version.
|
||||
|
||||
Returns:
|
||||
object of list type
|
||||
"""
|
||||
return [self.__dsc_version.default_value >> 16 & 0xF, self.__dsc_version.default_value & 0xF]
|
||||
|
||||
@dsc_version.setter
|
||||
def dsc_version(self, dsc_version: Tuple[int, int]):
|
||||
version = (dsc_version[0] << 16) | dsc_version[1]
|
||||
if version not in [65537, 65538]:
|
||||
raise ValueError("DSC Version must be 1.1 or 1.2")
|
||||
self.__dsc_version.default_value = version
|
||||
|
||||
@property
|
||||
def dsc_video_modes(self) -> DscVideoModesDp14:
|
||||
"""
|
||||
Set and get DSC video modes.
|
||||
|
||||
Returns:
|
||||
object of `DscVideoModesDp14` type
|
||||
"""
|
||||
return self.__dsc_video_modes
|
||||
|
||||
@dsc_video_modes.setter
|
||||
def dsc_video_modes(self, dsc_video_modes: DscVideoModesDp14):
|
||||
self.__dsc_video_modes = dsc_video_modes
|
||||
|
||||
@property
|
||||
def colorimetry(self) -> ColorimetryDp14:
|
||||
"""
|
||||
Set and get colorimetry.
|
||||
|
||||
Returns:
|
||||
object of `ColorimetryDp14` type
|
||||
"""
|
||||
return self.__colorimetry
|
||||
|
||||
@colorimetry.setter
|
||||
def colorimetry(self, colorimetry: ColorimetryDp14):
|
||||
self.__colorimetry = colorimetry
|
||||
@@ -0,0 +1,61 @@
|
||||
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
|
||||
|
||||
|
||||
class Hdcp1ATestParam:
|
||||
"""
|
||||
Class `Hdcp1ATestParam` describes requirement parameters for HDCP 1A tests:
|
||||
- Set and get `timeout`. Describes test timeout, in milliseconds.
|
||||
- Set and get `revoke_id`. Describes Revoke ID.
|
||||
- Set and get `dut_caps_flag`. Describes source DUT capabilities flags.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__timeout = Param(json_obj["TSI_TEST_CFG_HDCP2_1A_TIMEOUT"])
|
||||
self.__revoke_id = Param(json_obj["TSI_TEST_CFG_HDCP2_1A_REVOKEID"])
|
||||
self.__dut_caps_flag = Param(json_obj["TSI_TEST_CFG_HDCP2_1A_SRC_DUT_CAP"])
|
||||
|
||||
@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 revoke_id(self) -> int:
|
||||
"""
|
||||
Set and get Revoke ID.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__revoke_id.default_value
|
||||
|
||||
@revoke_id.setter
|
||||
def revoke_id(self, revoke_id: list):
|
||||
if len(revoke_id) == 0:
|
||||
raise ValueError(f"Revoke ID list length must more than 0")
|
||||
self.__revoke_id.default_value = revoke_id
|
||||
|
||||
@property
|
||||
def dut_caps_flag(self) -> bool:
|
||||
"""
|
||||
Set and get DUT caps flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__dut_caps_flag.default_value
|
||||
|
||||
@dut_caps_flag.setter
|
||||
def dut_caps_flag(self, dut_caps_flag: bool):
|
||||
self.__dut_caps_flag.default_value = dut_caps_flag
|
||||
@@ -0,0 +1,27 @@
|
||||
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
|
||||
|
||||
|
||||
class Hdcp1BTestParam:
|
||||
"""
|
||||
Class `Hdcp1BTestParam` describes requirement parameters for HDCP 1B tests:
|
||||
- Set and get `timeout`. Describes test timeout, in milliseconds.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__timeout = Param(json_obj["TSI_TEST_CFG_HDCP2_1B_TIMEOUT"])
|
||||
|
||||
@property
|
||||
def timeout(self):
|
||||
"""
|
||||
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 Hdcp2CTestParam:
|
||||
"""
|
||||
Class `Hdcp2CTestParam` describes requirement parameters for HDCP 2C tests:
|
||||
- Set and get `timeout`. Describes test timeout, in milliseconds.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__timeout = Param(json_obj["TSI_TEST_CFG_HDCP2_2C_TIMEOUT"])
|
||||
|
||||
@property
|
||||
def timeout(self):
|
||||
"""
|
||||
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 Hdcp3ATestParam:
|
||||
"""
|
||||
Class `Hdcp3ATestParam` describes requirement parameters for HDCP 3A tests:
|
||||
- Set and get `timeout`. Describes test timeout, in milliseconds.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__timeout = Param(json_obj["TSI_TEST_CFG_HDCP2_3A_TIMEOUT"])
|
||||
|
||||
@property
|
||||
def timeout(self):
|
||||
"""
|
||||
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 Hdcp3BTestParam:
|
||||
"""
|
||||
Class `Hdcp3BTestParam` describes requirement parameters for HDCP 3B tests:
|
||||
- Set and get `timeout`. Describes test timeout, in milliseconds.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__timeout = Param(json_obj["TSI_TEST_CFG_HDCP2_3B_TIMEOUT"])
|
||||
|
||||
@property
|
||||
def timeout(self):
|
||||
"""
|
||||
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,43 @@
|
||||
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
|
||||
|
||||
|
||||
class Hdcp3CTestParam:
|
||||
"""
|
||||
Class `Hdcp3CTestParam` describes requirement parameters for HDCP 3C tests:
|
||||
- Set and get `timeout`. Describes test timeout, in milliseconds.
|
||||
- Set and get `repeater_multiple_outputs`. Describes repeater multiple outputs (enable/disable).
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__timeout = Param(json_obj["TSI_TEST_CFG_HDCP2_3C_TIMEOUT"])
|
||||
self.__repeater_multiple_outputs = Param(json_obj["TSI_TEST_CFG_HDCP2_3C_REPEATER_MULTIPLE_OUTPUTS"])
|
||||
|
||||
@property
|
||||
def timeout(self):
|
||||
"""
|
||||
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 repeater_multiple_outputs(self) -> bool:
|
||||
"""
|
||||
Set and get repeater multiple outputs (enable/disable).
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__repeater_multiple_outputs.default_value
|
||||
|
||||
@repeater_multiple_outputs.setter
|
||||
def repeater_multiple_outputs(self, repeater_multiple_outputs: bool):
|
||||
self.__repeater_multiple_outputs.default_value = repeater_multiple_outputs
|
||||
@@ -0,0 +1,293 @@
|
||||
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
|
||||
|
||||
|
||||
class HdmiElectricalTestParam:
|
||||
"""
|
||||
Class `DpElectricalTestParam` describes parameters for DP electrical tests.
|
||||
- Test timeout, in milliseconds `timeout`.
|
||||
- HDMI power line voltage low limit, in millivolts `power_low_limit`.
|
||||
- HDMI power line voltage high limit, in millivolts `power_high_limit`.
|
||||
- HDMI link line voltage low limit, in millivolts `link_low_limit`.
|
||||
- HDMI link line voltage high limit, in millivolts `link_high_limit`.
|
||||
- HDMI HPD logical zero voltage level, lower limit, in millivolts `hpd_zero_low_limit`.
|
||||
- HDMI HPD logical zero voltage level, higher limit, in millivolts `hpd_zero_high_limit`.
|
||||
- HDMI HPD logical one voltage level, lower limit, in millivolts `hpd_one_low_limit`.
|
||||
- HDMI HPD logical one voltage level, higher limit, in millivolts `hpd_one_high_limit`.
|
||||
- DDC Line voltage low limit, in millivolts `ddc_low_limit`.
|
||||
- DDC Line voltage high limit, in millivolts `_ddc_high_limit`.
|
||||
- CCE Line logical zero voltage level, lower limit, in millivolts `cec_zero_low_limit`.
|
||||
- CCE Line logical zero voltage level, higher limit, in millivolts `cec_zero_high_limit`.
|
||||
- CCE Line logical one voltage level, lower limit, in millivolts `cec_one_low_limit`.
|
||||
- CCE Line logical one voltage level, higher limit, in millivolts `cec_one_high_limit`.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__timeout = Param(json_obj["TSI_HDMI_RX_TIMEOUT"])
|
||||
self.__power_low_limit = Param(json_obj["TSI_HDMI_RX_POWER_LOW_LIMIT"])
|
||||
self.__power_high_limit = Param(json_obj["TSI_HDMI_RX_POWER_HIGH_LIMIT"])
|
||||
self.__link_low_limit = Param(json_obj["TSI_HDMI_RX_LINK_LOW_LIMIT"])
|
||||
self.__link_high_limit = Param(json_obj["TSI_HDMI_RX_LINK_HIGH_LIMIT"])
|
||||
self.__hpd_zero_low_limit = Param(json_obj["TSI_HDMI_RX_HPD_ZERO_LOW_LIMIT"])
|
||||
self.__hpd_zero_high_limit = Param(json_obj["TSI_HDMI_RX_HPD_ZERO_HIGH_LIMIT"])
|
||||
self.__hpd_one_low_limit = Param(json_obj["TSI_HDMI_RX_HPD_ONE_LOW_LIMIT"])
|
||||
self.__hpd_one_high_limit = Param(json_obj["TSI_HDMI_RX_HPD_ONE_HIGHT_LIMIT"])
|
||||
self.__ddc_low_limit = Param(json_obj["TSI_HDMI_RX_DDC_LOW_LIMIT"])
|
||||
self.__ddc_high_limit = Param(json_obj["TSI_HDMI_RX_DDC_HIGH_LIMIT"])
|
||||
self.__cec_zero_low_limit = Param(json_obj["TSI_HDMI_RX_CEC_ZERO_LOW_LIMIT"])
|
||||
self.__cec_zero_high_limit = Param(json_obj["TSI_HDMI_RX_CEC_ZERO_HIGH_LIMIT"])
|
||||
self.__cec_one_low_limit = Param(json_obj["TSI_HDMI_RX_CEC_ONE_LOW_LIMIT"])
|
||||
self.__cec_one_high_limit = Param(json_obj["TSI_HDMI_RX_CEC_ONE_HIGH_LIMIT"])
|
||||
|
||||
@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 power_low_limit(self) -> int:
|
||||
"""
|
||||
Set and get HDMI power line voltage low limit.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__power_low_limit.default_value
|
||||
|
||||
@power_low_limit.setter
|
||||
def power_low_limit(self, power_low_limit: int):
|
||||
if not(self.__power_low_limit.min_value < power_low_limit < self.__power_low_limit.max_value):
|
||||
raise ValueError(f"Power low limit cannot be less than {self.__power_low_limit.min_value} and more than "
|
||||
f"{self.__power_low_limit.max_value}.")
|
||||
self.__power_low_limit.default_value = power_low_limit
|
||||
|
||||
@property
|
||||
def power_high_limit(self) -> int:
|
||||
"""
|
||||
Set and get HDMI power line voltage high limit.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__power_high_limit.default_value
|
||||
|
||||
@power_high_limit.setter
|
||||
def power_high_limit(self, power_high_limit: int):
|
||||
if not(self.__power_high_limit.min_value < power_high_limit < self.__power_high_limit.max_value):
|
||||
raise ValueError(f"Power high limit cannot be less than {self.__power_high_limit.min_value} and more than "
|
||||
f"{self.__power_high_limit.max_value}.")
|
||||
self.__power_high_limit.default_value = power_high_limit
|
||||
|
||||
@property
|
||||
def link_low_limit(self) -> int:
|
||||
"""
|
||||
Set and get HDMI link line voltage low limit.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__link_low_limit.default_value
|
||||
|
||||
@link_low_limit.setter
|
||||
def link_low_limit(self, link_low_limit: int):
|
||||
if not(self.__link_low_limit.min_value < link_low_limit < self.__link_low_limit.max_value):
|
||||
raise ValueError(f"Link low limit cannot be less than {self.__link_low_limit.min_value} and more than "
|
||||
f"{self.__link_low_limit.max_value}.")
|
||||
self.__link_low_limit.default_value = link_low_limit
|
||||
|
||||
@property
|
||||
def link_high_limit(self) -> int:
|
||||
"""
|
||||
Set and get HDMI link line voltage high limit.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__link_high_limit.default_value
|
||||
|
||||
@link_high_limit.setter
|
||||
def link_high_limit(self, link_high_limit: int):
|
||||
if not(self.__link_high_limit.min_value < link_high_limit < self.__link_high_limit.max_value):
|
||||
raise ValueError(f"Link high limit cannot be less than {self.__link_high_limit.min_value} and more than "
|
||||
f"{self.__link_high_limit.max_value}.")
|
||||
self.__link_high_limit.default_value = link_high_limit
|
||||
|
||||
@property
|
||||
def hpd_zero_low_limit(self) -> int:
|
||||
"""
|
||||
Set and get HDMI HPD logical zero voltage level, lower limit.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__hpd_zero_low_limit.default_value
|
||||
|
||||
@hpd_zero_low_limit.setter
|
||||
def hpd_zero_low_limit(self, hpd_zero_low_limit: int):
|
||||
if not(self.__hpd_zero_low_limit.min_value < hpd_zero_low_limit < self.__hpd_zero_low_limit.max_value):
|
||||
raise ValueError(f"HPD zero low limit cannot be less than {self.__hpd_zero_low_limit.min_value} "
|
||||
f"and more than {self.__hpd_zero_low_limit.max_value}.")
|
||||
self.__hpd_zero_low_limit.default_value = hpd_zero_low_limit
|
||||
|
||||
@property
|
||||
def hpd_zero_high_limit(self) -> int:
|
||||
"""
|
||||
Set and get HDMI HPD logical zero voltage level, higher limit.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__hpd_zero_high_limit.default_value
|
||||
|
||||
@hpd_zero_high_limit.setter
|
||||
def hpd_zero_high_limit(self, hpd_zero_high_limit: int):
|
||||
if not(self.__hpd_zero_high_limit.min_value < hpd_zero_high_limit < self.__hpd_zero_high_limit.max_value):
|
||||
raise ValueError(f"HPD zero high limit cannot be less than {self.__hpd_zero_high_limit.min_value} "
|
||||
f"and more than {self.__hpd_zero_high_limit.max_value}.")
|
||||
self.__hpd_zero_high_limit.default_value = hpd_zero_high_limit
|
||||
|
||||
@property
|
||||
def hpd_one_low_limit(self) -> int:
|
||||
"""
|
||||
Set and get HDMI HPD logical one voltage level, lower limit.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__hpd_one_low_limit.default_value
|
||||
|
||||
@hpd_one_low_limit.setter
|
||||
def hpd_one_low_limit(self, hpd_one_low_limit: int):
|
||||
if not(self.__hpd_one_low_limit.min_value < hpd_one_low_limit < self.__hpd_one_low_limit.max_value):
|
||||
raise ValueError(f"HPD one low limit cannot be less than {self.__hpd_one_low_limit.min_value} "
|
||||
f"and more than {self.__hpd_one_low_limit.max_value}.")
|
||||
self.__hpd_one_low_limit.default_value = hpd_one_low_limit
|
||||
|
||||
@property
|
||||
def hpd_one_high_limit(self) -> int:
|
||||
"""
|
||||
Set and get HDMI HPD logical one voltage level, higher limit.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__hpd_one_high_limit.default_value
|
||||
|
||||
@hpd_one_high_limit.setter
|
||||
def hpd_one_high_limit(self, hpd_one_high_limit: int):
|
||||
if not(self.__hpd_one_high_limit.min_value < hpd_one_high_limit < self.__hpd_one_high_limit.max_value):
|
||||
raise ValueError(f"HPD one high limit cannot be less than {self.__hpd_one_high_limit.min_value} "
|
||||
f"and more than {self.__hpd_one_high_limit.max_value}.")
|
||||
self.__hpd_one_high_limit.default_value = hpd_one_high_limit
|
||||
|
||||
@property
|
||||
def ddc_low_limit(self) -> int:
|
||||
"""
|
||||
Set and get DDC Line voltage low limit.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__ddc_low_limit.default_value
|
||||
|
||||
@ddc_low_limit.setter
|
||||
def ddc_low_limit(self, ddc_low_limit: int):
|
||||
if not(self.__ddc_low_limit.min_value < ddc_low_limit < self.__ddc_low_limit.max_value):
|
||||
raise ValueError(f"DDC low limit cannot be less than {self.__ddc_low_limit.min_value} and more than "
|
||||
f"{self.__ddc_low_limit.max_value}.")
|
||||
self.__ddc_low_limit.default_value = ddc_low_limit
|
||||
|
||||
@property
|
||||
def ddc_high_limit(self) -> int:
|
||||
"""
|
||||
Set and get DDC Line voltage high limit.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__ddc_high_limit.default_value
|
||||
|
||||
@ddc_high_limit.setter
|
||||
def ddc_high_limit(self, ddc_high_limit: int):
|
||||
if not(self.__ddc_high_limit.min_value < ddc_high_limit < self.__ddc_high_limit.max_value):
|
||||
raise ValueError(f"DDC high limit cannot be less than {self.__ddc_high_limit.min_value} and more than "
|
||||
f"{self.__ddc_high_limit.max_value}.")
|
||||
self.__ddc_high_limit.default_value = ddc_high_limit
|
||||
|
||||
@property
|
||||
def cec_zero_low_limit(self) -> int:
|
||||
"""
|
||||
Set and get CCE Line logical zero voltage level, lower limit.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__cec_zero_low_limit.default_value
|
||||
|
||||
@cec_zero_low_limit.setter
|
||||
def cec_zero_low_limit(self, cec_zero_low_limit: int):
|
||||
if not(self.__cec_zero_low_limit.min_value < cec_zero_low_limit < self.__cec_zero_low_limit.max_value):
|
||||
raise ValueError(f"CEC zero low limit cannot be less than {self.__cec_zero_low_limit.min_value} "
|
||||
f"and more than {self.__cec_zero_low_limit.max_value}.")
|
||||
self.__cec_zero_low_limit.default_value = cec_zero_low_limit
|
||||
|
||||
@property
|
||||
def cec_zero_high_limit(self) -> int:
|
||||
"""
|
||||
Set and get CCE Line logical zero voltage level, higher limit.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__cec_zero_high_limit.default_value
|
||||
|
||||
@cec_zero_high_limit.setter
|
||||
def cec_zero_high_limit(self, cec_zero_high_limit: int):
|
||||
if not(self.__cec_zero_high_limit.min_value < cec_zero_high_limit < self.__cec_zero_high_limit.max_value):
|
||||
raise ValueError(f"CEC zero high limit cannot be less than {self.__cec_zero_high_limit.min_value} "
|
||||
f"and more than {self.__cec_zero_high_limit.max_value}.")
|
||||
self.__cec_zero_high_limit.default_value = cec_zero_high_limit
|
||||
|
||||
@property
|
||||
def cec_one_low_limit(self) -> int:
|
||||
"""
|
||||
Set and get CCE Line logical one voltage level, lower limit.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__cec_one_low_limit.default_value
|
||||
|
||||
@cec_one_low_limit.setter
|
||||
def cec_one_low_limit(self, cec_one_low_limit: int):
|
||||
if not(self.__cec_one_low_limit.min_value < cec_one_low_limit < self.__cec_one_low_limit.max_value):
|
||||
raise ValueError(f"CEC one low limit cannot be less than {self.__cec_one_low_limit.min_value} "
|
||||
f"and more than {self.__cec_one_low_limit.max_value}.")
|
||||
self.__cec_one_low_limit.default_value = cec_one_low_limit
|
||||
|
||||
@property
|
||||
def cec_one_high_limit(self) -> int:
|
||||
"""
|
||||
Set and get CCE Line logical one voltage level, higher limit.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__cec_one_high_limit.default_value
|
||||
|
||||
@cec_one_high_limit.setter
|
||||
def cec_one_high_limit(self, cec_one_high_limit: int):
|
||||
if not(self.__cec_one_high_limit.min_value < cec_one_high_limit < self.__cec_one_high_limit.max_value):
|
||||
raise ValueError(f"CEC one high limit cannot be less than {self.__cec_one_high_limit.min_value} "
|
||||
f"and more than {self.__cec_one_high_limit.max_value}.")
|
||||
self.__cec_one_high_limit.default_value = cec_one_high_limit
|
||||
@@ -0,0 +1,217 @@
|
||||
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
|
||||
from .hdmi_sink_tests import HdmiFrlRate
|
||||
from enum import IntEnum
|
||||
|
||||
|
||||
class CableTestMode(IntEnum):
|
||||
HighSpeed = 0
|
||||
LowSpeed = 1
|
||||
All = 2
|
||||
|
||||
|
||||
class LowSpeedLineSelection(Param):
|
||||
"""
|
||||
Class `LowSpeedLineSelection` defines variants of tests:
|
||||
- Voltage swing level 3 (1.2V) supported `voltage_swing_supported`.
|
||||
- Pre-emphasis level 3 (9.5dB) supported `pre_emphasis_supported`.
|
||||
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
super().__init__(json_obj)
|
||||
|
||||
@property
|
||||
def hpd(self) -> bool:
|
||||
"""
|
||||
Configure if HPD line will be tested.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._get_by_bitmask(0, bool)
|
||||
|
||||
@hpd.setter
|
||||
def hpd(self, hpd_test: bool):
|
||||
self._set_by_bitmask(hpd_test, 0)
|
||||
|
||||
@property
|
||||
def i2c(self) -> bool:
|
||||
"""
|
||||
Configure if I2C line will be tested.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._get_by_bitmask(1, bool)
|
||||
|
||||
@i2c.setter
|
||||
def i2c(self, i2c_test: bool):
|
||||
self._set_by_bitmask(i2c_test, 1)
|
||||
|
||||
@property
|
||||
def cec(self) -> bool:
|
||||
"""
|
||||
Configure if CEC line will be tested.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._get_by_bitmask(2, bool)
|
||||
|
||||
@cec.setter
|
||||
def cec(self, cec_test: bool):
|
||||
self._set_by_bitmask(cec_test, 2)
|
||||
|
||||
@property
|
||||
def voltage_5v(self) -> bool:
|
||||
"""
|
||||
Configure if 5V line will be tested.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._get_by_bitmask(3, bool)
|
||||
|
||||
@voltage_5v.setter
|
||||
def voltage_5v(self, voltage_5v_test: bool):
|
||||
self._set_by_bitmask(voltage_5v_test, 3)
|
||||
|
||||
@property
|
||||
def utility(self) -> bool:
|
||||
"""
|
||||
Configure if utility line will be tested.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._get_by_bitmask(4, bool)
|
||||
|
||||
@utility.setter
|
||||
def utility(self, utility_test: bool):
|
||||
self._set_by_bitmask(utility_test, 4)
|
||||
|
||||
|
||||
class HdmiSinkCableCheckTestParam:
|
||||
"""
|
||||
Class `HdmiSinkDUTTestParam` allows working with parameters from HDMI DSC source part.
|
||||
- Set and get test timeout `test_timeout`.
|
||||
- Seg and get test mode `test_mode` type `CableTestMode`.
|
||||
- Set and get MIN FRL rate `min_frl_rate` type `HdmiFrlRate`.
|
||||
- Set and get MAX FRL rate `max_frl_rate` type `HdmiFrlRate`.
|
||||
- Set and get amount of allowed errors per lane `allowed_errors_per_lane`.
|
||||
- Set and get errors capture timeout `errors_capture_timeout `.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__test_timeout = Param(json_obj["TSI_HDMI_SNKCTS_CABLE_TIMEOUT"])
|
||||
self.__test_mode = Param(json_obj["TSI_HDMI_SNKCTS_CABLE_TEST_MODE"])
|
||||
self.__min_frl_rate = Param(json_obj["TSI_HDMI_SNKCTS_CABLE_MIN_FRL_RATE"])
|
||||
self.__max_frl_rate = Param(json_obj["TSI_HDMI_SNKCTS_CABLE_MAX_FRL_RATE"])
|
||||
self.__allowed_errors_per_lane = Param(json_obj["TSI_HDMI_SNKCTS_CABLE_ERROR_PER_LANE"])
|
||||
self.__errors_capture_timeout = Param(json_obj["TSI_HDMI_SNKCTS_CABLE_CAPTURE_TIMEOUT"])
|
||||
self.__low_speed_line_selection = LowSpeedLineSelection(json_obj["TSI_HDMI_SNKCTS_CABLE_LOW_SPEED_LINE"])
|
||||
|
||||
@property
|
||||
def test_timeout(self) -> int:
|
||||
"""
|
||||
Set and get test timeout, in seconds.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__test_timeout.default_value
|
||||
|
||||
@test_timeout.setter
|
||||
def test_timeout(self, test_timeout: int):
|
||||
if not(self.__test_timeout.min_value < test_timeout < self.__test_timeout.max_value):
|
||||
raise ValueError(f"Test timeout cannot be less than {self.__test_timeout.min_value} and more than "
|
||||
f"{self.__test_timeout.max_value}.")
|
||||
self.__test_timeout.default_value = test_timeout
|
||||
|
||||
@property
|
||||
def test_mode(self) -> CableTestMode:
|
||||
"""
|
||||
Set and get test mode.
|
||||
|
||||
Returns:
|
||||
object of `CableTestMode` type
|
||||
"""
|
||||
return CableTestMode(self.__test_mode.default_value)
|
||||
|
||||
@test_mode.setter
|
||||
def test_mode(self, test_mode: CableTestMode):
|
||||
self.__test_mode.default_value = test_mode.value
|
||||
|
||||
@property
|
||||
def min_frl_rate(self) -> HdmiFrlRate:
|
||||
"""
|
||||
Set and get the minimum FRL rate supported by the cable.
|
||||
|
||||
Returns:
|
||||
object of `HdmiFrlRate` type
|
||||
"""
|
||||
return HdmiFrlRate(self.__min_frl_rate.default_value)
|
||||
|
||||
@min_frl_rate.setter
|
||||
def min_frl_rate(self, min_frl_rate: HdmiFrlRate):
|
||||
self.__min_frl_rate.default_value = min_frl_rate.value
|
||||
|
||||
@property
|
||||
def max_frl_rate(self) -> HdmiFrlRate:
|
||||
"""
|
||||
Set and get the maximum FRL rate supported by the cable.
|
||||
|
||||
Returns:
|
||||
object of `HdmiFrlRate` type
|
||||
"""
|
||||
return HdmiFrlRate(self.__max_frl_rate.default_value)
|
||||
|
||||
@max_frl_rate.setter
|
||||
def max_frl_rate(self, max_frl_rate: HdmiFrlRate):
|
||||
self.__max_frl_rate.default_value = max_frl_rate.value
|
||||
|
||||
@property
|
||||
def allowed_errors_per_lane(self) -> int:
|
||||
"""
|
||||
Set and get allowed errors per lane.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__allowed_errors_per_lane.default_value
|
||||
|
||||
@allowed_errors_per_lane.setter
|
||||
def allowed_errors_per_lane(self, allowed_errors_per_lane: int):
|
||||
if not(self.__allowed_errors_per_lane.min_value < allowed_errors_per_lane < self.__allowed_errors_per_lane.max_value):
|
||||
raise ValueError(f"Amount of allowed errors per lane cannot be less than {self.__allowed_errors_per_lane.min_value} and more than "
|
||||
f"{self.__allowed_errors_per_lane.max_value}.")
|
||||
self.__allowed_errors_per_lane.default_value = allowed_errors_per_lane
|
||||
|
||||
@property
|
||||
def errors_capture_timeout(self) -> int:
|
||||
"""
|
||||
Set and get errors capture timeout, in seconds.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__errors_capture_timeout.default_value
|
||||
|
||||
@errors_capture_timeout.setter
|
||||
def errors_capture_timeout(self, errors_capture_timeout: int):
|
||||
if not(self.__errors_capture_timeout.min_value < errors_capture_timeout < self.__errors_capture_timeout.max_value):
|
||||
raise ValueError(f"Errors capture timeout cannot be less than {self.__errors_capture_timeout.min_value} and more than "
|
||||
f"{self.__errors_capture_timeout.max_value}.")
|
||||
self.__errors_capture_timeout.default_value = errors_capture_timeout
|
||||
|
||||
@property
|
||||
def low_speed_line_selection(self) -> LowSpeedLineSelection:
|
||||
"""
|
||||
Set and get low speed lines for testing.
|
||||
|
||||
Returns:
|
||||
object `LowSpeedLineSelection`
|
||||
"""
|
||||
return self.__low_speed_line_selection
|
||||
|
||||
@low_speed_line_selection.setter
|
||||
def low_speed_line_selection(self, low_speed_line_selection: LowSpeedLineSelection):
|
||||
self.__low_speed_line_selection = low_speed_line_selection
|
||||
@@ -0,0 +1,120 @@
|
||||
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
|
||||
|
||||
|
||||
class HdmiSinkContinuityDUTTestParam:
|
||||
"""
|
||||
Class `HdmiSinkContinuityDUTTestParam` allows working with parameters from HDMI Continuity part.
|
||||
- Set and get total test time `test_time`, in seconds. Default value is 60s.
|
||||
- Set and get status period `status_period`, in seconds.
|
||||
- Set and get stop flag `stop_flag`. Stop testing when status fail.
|
||||
- Set and get flag of enabling scdc version `enable_scdc_version`. Enable to check SCDC version.
|
||||
- Set and get flag of enabling scdc status `enable_scdc_status`. Enable to check SCDC status flag.
|
||||
- Set and get flag of enabling scdc error count `enable_scdc_error_count`. Enable to check SCDC error counters.
|
||||
- Set and get SDCD error counter fail threshold `scdc_error_count`. Default value is 10.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__test_time = Param(json_obj["TSI_HDMI_SNKCTS_TEST_TIME"])
|
||||
self.__status_period = Param(json_obj["TSI_HDMI_SNKCTS_STATUS_PERIOD"])
|
||||
self.__stop_flag = Param(json_obj["TSI_HDMI_SNKCTS_STOP_TESTING"])
|
||||
self.__enable_scdc_version = Param(json_obj["TSI_HDMI_SNKCTS_SCDC_VERSION"])
|
||||
self.__enable_scdc_status = Param(json_obj["TSI_HDMI_SNKCTS_SCDC_STATUS"])
|
||||
self.__enable_scdc_error_count = Param(json_obj["TSI_HDMI_SNKCTS_SCDC_ERROR"])
|
||||
self.__scdc_error_count = Param(json_obj["TSI_HDMI_SNKCTS_SCDC_ERROR_COUNTER"])
|
||||
|
||||
@property
|
||||
def test_time(self) -> int:
|
||||
"""
|
||||
Set and get test time.
|
||||
|
||||
Returns:
|
||||
object of `int` type
|
||||
"""
|
||||
return self.__test_time.default_value
|
||||
|
||||
@test_time.setter
|
||||
def test_time(self, test_time: int):
|
||||
self.__test_time.default_value = test_time
|
||||
|
||||
@property
|
||||
def status_period(self) -> int:
|
||||
"""
|
||||
Set and get status period.
|
||||
|
||||
Returns:
|
||||
object of `int` type
|
||||
"""
|
||||
return self.__status_period.default_value
|
||||
|
||||
@status_period.setter
|
||||
def status_period(self, status_period: int):
|
||||
self.__status_period.default_value = status_period
|
||||
|
||||
@property
|
||||
def stop_flag(self) -> bool:
|
||||
"""
|
||||
Set and get flag of stop testing when status fail.
|
||||
|
||||
Returns:
|
||||
object of `bool` type
|
||||
"""
|
||||
return self.__stop_flag.default_value
|
||||
|
||||
@stop_flag.setter
|
||||
def stop_flag(self, stop_flag: bool):
|
||||
self.__stop_flag.default_value = int(stop_flag)
|
||||
|
||||
@property
|
||||
def enable_scdc_version(self) -> int:
|
||||
"""
|
||||
Set and get flag of enabling scdc version.
|
||||
|
||||
Returns:
|
||||
object of `bool` type
|
||||
"""
|
||||
return self.__enable_scdc_version.default_value
|
||||
|
||||
@enable_scdc_version.setter
|
||||
def enable_scdc_version(self, enable_scdc_version: bool):
|
||||
self.__enable_scdc_version.default_value = int(enable_scdc_version)
|
||||
|
||||
@property
|
||||
def enable_scdc_status(self) -> bool:
|
||||
"""
|
||||
Set and get flag of enabling scdc status.
|
||||
|
||||
Returns:
|
||||
object of `bool` type
|
||||
"""
|
||||
return self.__test_time.default_value
|
||||
|
||||
@enable_scdc_status.setter
|
||||
def enable_scdc_status(self, enable_scdc_status: bool):
|
||||
self.__enable_scdc_status.default_value = int(enable_scdc_status)
|
||||
|
||||
@property
|
||||
def enable_scdc_error_count(self) -> bool:
|
||||
"""
|
||||
Set and get flag of enabling scdc error count.
|
||||
|
||||
Returns:
|
||||
object of `int` type
|
||||
"""
|
||||
return self.__enable_scdc_error_count.default_value
|
||||
|
||||
@enable_scdc_error_count.setter
|
||||
def enable_scdc_error_count(self, enable_scdc_error_count: bool):
|
||||
self.__enable_scdc_error_count.default_value = int(enable_scdc_error_count)
|
||||
|
||||
@property
|
||||
def scdc_error_count(self) -> int:
|
||||
"""
|
||||
Set and get scdc error count.
|
||||
|
||||
Returns:
|
||||
object of `int` type
|
||||
"""
|
||||
return self.__scdc_error_count.default_value
|
||||
|
||||
@scdc_error_count.setter
|
||||
def scdc_error_count(self, error_count: int):
|
||||
self.__scdc_error_count.default_value = error_count
|
||||
1172
UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_sink_tests.py
Normal file
1172
UniTAP/dev/modules/dut_tests/dut_default_params/hdmi_sink_tests.py
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,27 @@
|
||||
from UniTAP.dev.modules.dut_tests.test_group_params_types import param_by_ci_name
|
||||
|
||||
|
||||
class HdmiSourceDUTTestParam:
|
||||
"""
|
||||
Class `HdmiSourceDUTTestParam` allows working with parameters from HDMI DSC source part.
|
||||
- Set and get timeout `timeout`.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__timeout = json_obj["TSI_HDMI_SRCCTS_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 Hdr10TestParam:
|
||||
|
||||
def __init__(self, json_obj):
|
||||
self.__same_frame = Param(json_obj["TSI_HDR10_CTS_DISTR_SAME_FRAME"])
|
||||
self.__timeout = Param(json_obj["TSI_HDR10_CTS_DISTR_TIMEOUT"])
|
||||
|
||||
@property
|
||||
def timeout(self):
|
||||
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 same_frame(self):
|
||||
return self.__same_frame.default_value
|
||||
|
||||
@same_frame.setter
|
||||
def same_frame(self, same_frame: bool):
|
||||
self.__same_frame.default_value = same_frame
|
||||
@@ -0,0 +1,129 @@
|
||||
from enum import IntEnum
|
||||
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
|
||||
|
||||
|
||||
class LinkRate(IntEnum):
|
||||
"""
|
||||
Class `LinkRate` describes available supported link rates.
|
||||
"""
|
||||
Rate_1_62_Gbps = 6
|
||||
Rate_2_7_Gbps = 10
|
||||
Rate_5_4_Gbps = 20
|
||||
Rate_8_1_Gbpc = 30
|
||||
|
||||
|
||||
class LinkConfigTestParam:
|
||||
"""
|
||||
Class `LinkConfigTestParam` describes parameters for Link configuration test.
|
||||
- Test timeout, in milliseconds `timeout`.
|
||||
- Defines the maximum number of lanes to be tested `max_lane_count`. Possible variants: 1, 2, 4.
|
||||
- Defines the maximum link rate to be tested `max_rate` type `LinkRate`.
|
||||
- Defines the length of the HPD pulse used to start each test iteration, in milliseconds `hpd_pulse_duration`.
|
||||
- Defines how long the test waits for LT start after issuing HPD pulse, in milliseconds `lt_start_timeout`.
|
||||
- Defines the additional delay inserted in between test iterations, in milliseconds `test_loop_delay`.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__timeout = Param(json_obj["TSI_DP_LTT_TIMEOUT"])
|
||||
self.__max_lane_count = Param(json_obj["TSI_DP_LTT_MAX_LANE_COUNT"])
|
||||
self.__max_rate = Param(json_obj["TSI_DP_LTT_MAX_RATE"])
|
||||
self.__hpd_pulse_duration = Param(json_obj["TSI_DP_LTT_HPD_PULSE_DURATION"])
|
||||
self.__lt_start_timeout = Param(json_obj["TSI_DP_LTT_LT_START_TIMEOUT"])
|
||||
self.__test_loop_delay = Param(json_obj["TSI_DP_LTT_TEST_LOOP_DELAY"])
|
||||
|
||||
@property
|
||||
def timeout(self):
|
||||
"""
|
||||
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 max_lane_count(self) -> int:
|
||||
"""
|
||||
Set and get maximum number of lanes.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__max_lane_count.default_value
|
||||
|
||||
@max_lane_count.setter
|
||||
def max_lane_count(self, max_lane_count: int):
|
||||
if not max_lane_count in [1, 2, 4]:
|
||||
raise ValueError("Max lane count must be in range: 1, 2, or 4.")
|
||||
self.__max_lane_count.default_value = max_lane_count
|
||||
|
||||
@property
|
||||
def max_rate(self):
|
||||
"""
|
||||
Set and get maximum link rate.
|
||||
|
||||
Returns:
|
||||
object `LinkRate`
|
||||
"""
|
||||
return self.__max_rate.default_value
|
||||
|
||||
@max_rate.setter
|
||||
def max_rate(self, max_rate: LinkRate):
|
||||
self.__max_rate.default_value = max_rate.value
|
||||
|
||||
@property
|
||||
def hpd_pulse_duration(self) -> int:
|
||||
"""
|
||||
Set and get length of the HPD pulse.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__hpd_pulse_duration.default_value
|
||||
|
||||
@hpd_pulse_duration.setter
|
||||
def hpd_pulse_duration(self, hpd_pulse_duration: int):
|
||||
if not(self.__hpd_pulse_duration.min_value < hpd_pulse_duration < self.__hpd_pulse_duration.max_value):
|
||||
raise ValueError(f"HPD pulse duration must be less than {self.__hpd_pulse_duration.min_value} and more than"
|
||||
f" {self.__hpd_pulse_duration.max_value}.")
|
||||
self.__hpd_pulse_duration.default_value = hpd_pulse_duration
|
||||
|
||||
@property
|
||||
def lt_start_timeout(self) -> int:
|
||||
"""
|
||||
Set and get link training start timeout.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__lt_start_timeout.default_value
|
||||
|
||||
@lt_start_timeout.setter
|
||||
def lt_start_timeout(self, lt_start_timeout: int):
|
||||
if not(self.__lt_start_timeout.min_value < lt_start_timeout < self.__lt_start_timeout.max_value):
|
||||
raise ValueError(f"Link training start timeout cannot be less than {self.__lt_start_timeout.min_value} "
|
||||
f"and more than {self.__lt_start_timeout.max_value}.")
|
||||
self.__lt_start_timeout.default_value = lt_start_timeout
|
||||
|
||||
@property
|
||||
def test_loop_delay(self) -> int:
|
||||
"""
|
||||
Set and get test loop delay.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__test_loop_delay.default_value
|
||||
|
||||
@test_loop_delay.setter
|
||||
def test_loop_delay(self, test_loop_delay: int):
|
||||
if not(self.__test_loop_delay.min_value < test_loop_delay < self.__test_loop_delay.max_value):
|
||||
raise ValueError(f"Test loop delay cannot be less than {self.__test_loop_delay.min_value} "
|
||||
f"and more than {self.__test_loop_delay.max_value}.")
|
||||
self.__test_loop_delay.default_value = test_loop_delay
|
||||
125
UniTAP/dev/modules/dut_tests/dut_default_params/lttpr_tests.py
Normal file
125
UniTAP/dev/modules/dut_tests/dut_default_params/lttpr_tests.py
Normal file
@@ -0,0 +1,125 @@
|
||||
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
|
||||
from .dp_1_4_source_general_tab import TestAutomationFlags, update_default_value
|
||||
|
||||
|
||||
class LttprDutCapsFlags(Param):
|
||||
"""
|
||||
Class `LttprDutCapsFlags` defines the DUT capabilities as flags and allows setting:
|
||||
- Define that DUT is Type-C device `dut_is_type_c_device`.
|
||||
"""
|
||||
|
||||
def __init__(self, json_obj):
|
||||
super().__init__(json_obj)
|
||||
|
||||
@property
|
||||
def dut_is_type_c_device(self) -> bool:
|
||||
"""
|
||||
Set and get Define that DUT is Type-C device flag support.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self._get_by_bitmask(0, 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, 0)
|
||||
|
||||
def set_all_caps(self):
|
||||
"""
|
||||
Set all setting.
|
||||
"""
|
||||
self.dut_is_type_c_device = True
|
||||
|
||||
def clear_all_caps(self):
|
||||
"""
|
||||
Clear all settings.
|
||||
"""
|
||||
self.dut_is_type_c_device = False
|
||||
|
||||
|
||||
class DebugOptions:
|
||||
def __init__(self, json_obj):
|
||||
self.__cr_iteration_delay = Param(json_obj["TSI_DP20_LTTPR_DEBUG_CR_ITERATION_DELAY"])
|
||||
|
||||
@property
|
||||
def cr_iteration_delay(self) -> bool:
|
||||
"""
|
||||
Set and get Force manual visual check flag.
|
||||
|
||||
Returns:
|
||||
object of bool type
|
||||
"""
|
||||
return self.__cr_iteration_delay.default_value
|
||||
|
||||
@cr_iteration_delay.setter
|
||||
def cr_iteration_delay(self, delay: int):
|
||||
if not(self.__cr_iteration_delay.min_value < delay < self.__cr_iteration_delay.max_value):
|
||||
raise ValueError(f"Timeout cannot be less than {self.__cr_iteration_delay.min_value} and more than "
|
||||
f"{self.__cr_iteration_delay.max_value}.")
|
||||
self.__cr_iteration_delay.default_value = delay
|
||||
|
||||
|
||||
class DpLttprTestParam:
|
||||
"""
|
||||
Class `DpLttprTestParam` describes requirement parameters for LTTPR DP 1228b/132b tests:
|
||||
- Set and get `timeout`. Describes test timeout, in milliseconds.
|
||||
- Set and get `hpd_duration`. Describes duration of long HPD pulses generated, in milliseconds.
|
||||
- Set and get `dut_caps_flag`. Describes source DUT capabilities flags.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__timeout = Param(json_obj["TSI_DP20_LTTPR_TIMEOUT"])
|
||||
self.__max_lanes = Param(json_obj["TSI_DP20_LTTPR_MAX_LANES"]) # Not access
|
||||
self.__max_link_rate = Param(json_obj["TSI_DP20_LTTPR_MAX_LINK_RATE"]) # Not access
|
||||
self.__dut_caps = LttprDutCapsFlags(json_obj["TSI_DP20_LTTPR_DUT_CAPS"])
|
||||
self.__test_automation = TestAutomationFlags(json_obj["TSI_DP20_LTTPR_DUT_TA"]) # Not access
|
||||
self.__hpd_duration = Param(json_obj["TSI_DP20_LTTPR_LONG_HPD_PULSE"])
|
||||
self.__debug_options = DebugOptions(json_obj)
|
||||
|
||||
@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 hpd_duration(self) -> int:
|
||||
"""
|
||||
Set and get duration of long HPD pulses generated, in milliseconds.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__hpd_duration.default_value
|
||||
|
||||
@hpd_duration.setter
|
||||
def hpd_duration(self, hpd_duration: int):
|
||||
if not(self.__hpd_duration.min_value < hpd_duration < self.__hpd_duration.max_value):
|
||||
raise ValueError(f"Timeout cannot be less than {self.__hpd_duration.min_value} and more than "
|
||||
f"{self.__hpd_duration.max_value}.")
|
||||
self.__hpd_duration.default_value = hpd_duration
|
||||
|
||||
@property
|
||||
def dut_caps_flags(self) -> LttprDutCapsFlags:
|
||||
"""
|
||||
Set and get LTTPR DUT capabilities flags.
|
||||
|
||||
Returns:
|
||||
object of `DutCapsFlags` type
|
||||
"""
|
||||
return self.__dut_caps
|
||||
|
||||
@dut_caps_flags.setter
|
||||
def dut_caps_flags(self, dut_caps_flags: LttprDutCapsFlags):
|
||||
self.__dut_caps = dut_caps_flags
|
||||
@@ -0,0 +1,295 @@
|
||||
from typing import List, Union, Optional
|
||||
from enum import IntEnum
|
||||
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
|
||||
|
||||
|
||||
class VideoPixelTestColorDepth(IntEnum):
|
||||
"""
|
||||
Class `VideoPixelTestColorDepth` describes available supported color depth.
|
||||
"""
|
||||
ColorDepth6 = 6
|
||||
ColorDepth8 = 8
|
||||
ColorDepth10 = 10
|
||||
ColorDepth12 = 12
|
||||
ColorDepth16 = 16
|
||||
|
||||
|
||||
class VideoPixelTestElementFormat(IntEnum):
|
||||
"""
|
||||
Class `VideoPixelTestElementFormat` describes available supported color formats.
|
||||
"""
|
||||
RGB_6BPC = 16
|
||||
RGB_8BPC = 17
|
||||
RGB_10BPC = 18
|
||||
RGB_12BPC = 19
|
||||
RGB_16BPC = 20
|
||||
YCbCr444_080808 = 256
|
||||
YCbCr444_161616 = 257
|
||||
YCbCr420_8BPC_080808 = 800
|
||||
YCbCr420_10BPC_080808 = 801
|
||||
YCbCr420_12BPC_161616 = 802
|
||||
YCbCr420_16BPC_161616 = 803
|
||||
|
||||
|
||||
class VideoPixelTestAlignment(IntEnum):
|
||||
"""
|
||||
Class `VideoPixelTestColorDepth` describes available supported alignment.
|
||||
"""
|
||||
MSB = 0
|
||||
LSB = 1
|
||||
|
||||
|
||||
class VideoPixelTestExportFormat(IntEnum):
|
||||
"""
|
||||
Class `VideoPixelTestColorDepth` describes available supported files format.
|
||||
"""
|
||||
BIN = 0
|
||||
PPM = 1
|
||||
BMP = 2
|
||||
|
||||
|
||||
class VideoPixelTestParam:
|
||||
"""
|
||||
Class `VideoPixelTestParam` describes parameters for video pixel test.
|
||||
- Defines frame width as number of elements `image_width`.
|
||||
- Defines frame height as number of elements `image_height`.
|
||||
- Defines the color depth of the image as number of bits per color channel regardless of the color format
|
||||
`color_depth` type `VideoPixelTestColorDepth`.
|
||||
- Defines the element format used to encode the pixel data of the bitmap `frame_data`.
|
||||
- Defines type of alignment (LSB-MSB data alignment) `alignment` type `VideoPixelTestAlignment`.
|
||||
- Defines the length of the video test as number of frames `frames_number`.
|
||||
- Defines number of frame that are allowed to be considered as 'failed' before the entire test is considered as
|
||||
'failed' `frames_number_mismatch`.
|
||||
- Defines the number of pixels that allowed to be considered as 'failed' before the frame is considered as 'failed'
|
||||
`pixel_tolerance`.
|
||||
- Maximum number of frames failed frames saved per test run `max_auto_save_failed`.
|
||||
- Contains the full path to the folder where failed frames are to be saved without trailing backslash
|
||||
`failed_frame_folder`.
|
||||
- Defines the number of failed frames to be exported from the video test `max_export_failed_frames`.
|
||||
- Defines export file format `export_data_format` type `VideoPixelTestExportFormat`.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__image_width = Param(json_obj["TSI_REF1_WIDTH"])
|
||||
self.__image_height = Param(json_obj["TSI_REF1_HEIGHT"])
|
||||
self.__element_size = Param(json_obj["TSI_REF1_ELEMENT_SIZE"]) # Do not provide
|
||||
self.__element_width = Param(json_obj["TSI_REF1_ELEMENT_WIDTH"]) # Do not provide
|
||||
self.__element_height = Param(json_obj["TSI_REF1_ELEMENT_HEIGHT"]) # Do not provide
|
||||
self.__color_depth = Param(json_obj["TSI_REF1_COLOR_DEPTH"]) # VideoPixelTestColorDepth
|
||||
self.__element_format = Param(json_obj["TSI_REF1_ELEMENT_FORMAT"]) # VideoPixelTestElementFormat
|
||||
self.__frame_data = Param(json_obj["TSI_REF1_FRAME_DATA"])
|
||||
self.__alignment = Param(json_obj["TSI_REF1_LSB_MSB"]) # VideoPixelTestAlignment
|
||||
self.__frames_number = Param(json_obj["TSI_TEST_LENGTH"])
|
||||
self.__frames_number_mismatch = Param(json_obj["TSI_LIM_FRAME_MISMATCHES"])
|
||||
self.__pixel_tolerance = Param(json_obj["TSI_PIXEL_TOLERANCE"])
|
||||
self.__max_auto_save_failed = Param(json_obj["TSI_MAX_AUTO_SAVE_FAILED"])
|
||||
self.__failed_frame_folder = Param(json_obj["TSI_FAILED_FRAME_TARGET_FOLDER"])
|
||||
self.__max_export_failed_frames = Param(json_obj["TSI_MAX_EXPORT_FAILED"])
|
||||
self.__export_data_format = Param(json_obj["TSI_EXPORT_FORMAT"]) # Export format VideoPixelTestExportFormat
|
||||
|
||||
@property
|
||||
def image_width(self) -> int:
|
||||
"""
|
||||
Set and get frame width as number of elements.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__image_width.default_value
|
||||
|
||||
@image_width.setter
|
||||
def image_width(self, image_width: int):
|
||||
if not(self.__image_width.min_value < image_width < self.__image_width.max_value):
|
||||
raise ValueError(f"Image width cannot be less than {self.__image_width.min_value} and more than "
|
||||
f"{self.__image_width.max_value}.")
|
||||
self.__image_width.default_value = image_width
|
||||
|
||||
@property
|
||||
def image_height(self) -> int:
|
||||
"""
|
||||
Set and get frame height as number of elements.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__image_height.default_value
|
||||
|
||||
@image_height.setter
|
||||
def image_height(self, image_height: int):
|
||||
if not(self.__image_height.min_value < image_height < self.__image_height.max_value):
|
||||
raise ValueError(f"Image height cannot be less than {self.__image_height.min_value} and more than "
|
||||
f"{self.__image_height.max_value}.")
|
||||
self.__image_height.default_value = image_height
|
||||
|
||||
@property
|
||||
def color_depth(self):
|
||||
"""
|
||||
Set and get color depth of the image.
|
||||
|
||||
Returns:
|
||||
object `VideoPixelTestColorDepth`
|
||||
"""
|
||||
return self.__color_depth.default_value
|
||||
|
||||
@color_depth.setter
|
||||
def color_depth(self, color_depth: VideoPixelTestColorDepth):
|
||||
self.__color_depth.default_value = color_depth.value
|
||||
|
||||
@property
|
||||
def element_format(self):
|
||||
"""
|
||||
Set and get element format used to encode the pixel data.
|
||||
|
||||
Returns:
|
||||
object `VideoPixelTestElementFormat`
|
||||
"""
|
||||
return self.__element_format.default_value
|
||||
|
||||
@element_format.setter
|
||||
def element_format(self, element_format: VideoPixelTestElementFormat):
|
||||
self.__element_format.direct_set_def_value(element_format.value)
|
||||
|
||||
@property
|
||||
def frame_data(self) -> Optional[Union[bytearray, List[int], str]]:
|
||||
"""
|
||||
Set and get pixel data of image.
|
||||
|
||||
Returns:
|
||||
object bytearray | list[int] | None | str
|
||||
"""
|
||||
return self.__image_height.default_value
|
||||
|
||||
@frame_data.setter
|
||||
def frame_data(self, frame_data: Optional[Union[bytearray, List[int], str]]):
|
||||
self.__frame_data.default_value = frame_data
|
||||
|
||||
@property
|
||||
def alignment(self):
|
||||
"""
|
||||
Set and get type of alignment.
|
||||
|
||||
Returns:
|
||||
object `VideoPixelTestAlignment`
|
||||
"""
|
||||
return self.__alignment.default_value
|
||||
|
||||
@alignment.setter
|
||||
def alignment(self, alignment: VideoPixelTestAlignment):
|
||||
self.__alignment.default_value = alignment.value
|
||||
|
||||
@property
|
||||
def frames_number(self) -> int:
|
||||
"""
|
||||
Set and get length of the video test as number of frames.
|
||||
|
||||
Returns:
|
||||
object `VideoPixelTestAlignment`
|
||||
"""
|
||||
return self.__frames_number.default_value
|
||||
|
||||
@frames_number.setter
|
||||
def frames_number(self, frames_number: int):
|
||||
if not(self.__frames_number.min_value < frames_number < self.__frames_number.max_value):
|
||||
raise ValueError(f"Frames number cannot be less than {self.__frames_number.min_value} and more than "
|
||||
f"{self.__frames_number.max_value}.")
|
||||
self.__frames_number.default_value = frames_number
|
||||
|
||||
@property
|
||||
def frames_number_mismatch(self) -> int:
|
||||
"""
|
||||
Set and get number of frame that are allowed to be considered as 'failed' before the entire test is considered
|
||||
as 'failed'.
|
||||
|
||||
Returns:
|
||||
object `VideoPixelTestAlignment`
|
||||
"""
|
||||
return self.__frames_number_mismatch.default_value
|
||||
|
||||
@frames_number_mismatch.setter
|
||||
def frames_number_mismatch(self, frames_number_mismatch: int):
|
||||
if not(self.__frames_number_mismatch.min_value < frames_number_mismatch <
|
||||
self.__frames_number_mismatch.max_value):
|
||||
raise ValueError(f"Image height cannot be less than {self.__frames_number_mismatch.min_value} and more than"
|
||||
f" {self.__frames_number_mismatch.max_value}.")
|
||||
self.__frames_number_mismatch.default_value = frames_number_mismatch
|
||||
|
||||
@property
|
||||
def pixel_tolerance(self) -> int:
|
||||
"""
|
||||
Set and get number of pixels that allowed to be considered as 'failed' before the frame is considered as
|
||||
'failed'.
|
||||
|
||||
Returns:
|
||||
object `VideoPixelTestAlignment`
|
||||
"""
|
||||
return self.__pixel_tolerance.default_value
|
||||
|
||||
@pixel_tolerance.setter
|
||||
def pixel_tolerance(self, pixel_tolerance: int):
|
||||
if not(self.__pixel_tolerance.min_value < pixel_tolerance < self.__pixel_tolerance.max_value):
|
||||
raise ValueError(f"Pixel tolerance cannot be less than {self.__pixel_tolerance.min_value} and more than "
|
||||
f"{self.__image_height.max_value}.")
|
||||
self.__pixel_tolerance.default_value = pixel_tolerance
|
||||
|
||||
@property
|
||||
def max_auto_save_failed(self) -> int:
|
||||
"""
|
||||
Set and get maximum number of frames failed frames saved per test run.
|
||||
|
||||
Returns:
|
||||
object `VideoPixelTestAlignment`
|
||||
"""
|
||||
return self.__max_auto_save_failed.default_value
|
||||
|
||||
@max_auto_save_failed.setter
|
||||
def max_auto_save_failed(self, max_auto_save_failed: int):
|
||||
if not(self.__max_auto_save_failed.min_value < max_auto_save_failed < self.__max_auto_save_failed.max_value):
|
||||
raise ValueError(f"Max auto save failed frames cannot be less than {self.__max_auto_save_failed.min_value}"
|
||||
f" and more than {self.__max_auto_save_failed.max_value}.")
|
||||
self.__max_auto_save_failed.default_value = max_auto_save_failed
|
||||
|
||||
@property
|
||||
def failed_frame_folder(self):
|
||||
"""
|
||||
Set and get full path to the folder where failed frames are to be saved without trailing backslash.
|
||||
|
||||
Returns:
|
||||
object str
|
||||
"""
|
||||
return self.failed_frame_folder.default_value
|
||||
|
||||
@failed_frame_folder.setter
|
||||
def failed_frame_folder(self, failed_frame_folder: str):
|
||||
self.failed_frame_folder.default_value = failed_frame_folder
|
||||
|
||||
@property
|
||||
def max_export_failed_frames(self) -> int:
|
||||
"""
|
||||
Set and get number of failed frames to be exported from the video test.
|
||||
|
||||
Returns:
|
||||
object int
|
||||
"""
|
||||
return self.__max_export_failed_frames.default_value
|
||||
|
||||
@max_export_failed_frames.setter
|
||||
def max_export_failed_frames(self, max_export_failed_frames: int):
|
||||
if not(self.__max_export_failed_frames.min_value < max_export_failed_frames <
|
||||
self.__max_export_failed_frames.max_value):
|
||||
raise ValueError(f"Max export failed frames number cannot be less than "
|
||||
f"{self.__max_export_failed_frames.min_value} and more than "
|
||||
f"{self.__image_height.max_value}.")
|
||||
self.__max_export_failed_frames.default_value = max_export_failed_frames
|
||||
|
||||
@property
|
||||
def export_data_format(self):
|
||||
"""
|
||||
Set and get file format.
|
||||
|
||||
Returns:
|
||||
object `VideoPixelTestExportFormat`
|
||||
"""
|
||||
return self.__export_data_format.default_value
|
||||
|
||||
@export_data_format.setter
|
||||
def export_data_format(self, export_data_format: VideoPixelTestExportFormat):
|
||||
self.__export_data_format.default_value = export_data_format.value
|
||||
@@ -0,0 +1,546 @@
|
||||
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
|
||||
from UniTAP.dev.modules.dut_tests.test_utils import update_default_value
|
||||
|
||||
|
||||
class UsbcElTestDutCaps(Param):
|
||||
"""
|
||||
Class `UsbcElTestDutCaps` describes DUT capabilities flags and allows settings values.
|
||||
- DUT Support DisplayPort Alternate mode `support_dp_alt_mode`.
|
||||
- DUT can act as a power source `can_act_power_source`
|
||||
- DUT can act as a power sink `cab_act_power_sink`.
|
||||
- DUT does not support PD Contract `not_support_pd_contract`.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
super().__init__(json_obj)
|
||||
|
||||
@property
|
||||
def support_dp_alt_mode(self):
|
||||
"""
|
||||
Set and get DUT Support DisplayPort Alternate mode flag support.
|
||||
|
||||
Returns:
|
||||
object bool
|
||||
"""
|
||||
return self._get_by_bitmask(0, bool)
|
||||
|
||||
@support_dp_alt_mode.setter
|
||||
def support_dp_alt_mode(self, support_dp_alt_mode: bool):
|
||||
self._set_by_bitmask(support_dp_alt_mode, 0)
|
||||
|
||||
@property
|
||||
def can_act_power_source(self):
|
||||
"""
|
||||
Set and get DUT can act as a power source flag support.
|
||||
|
||||
Returns:
|
||||
object bool
|
||||
"""
|
||||
return self._get_by_bitmask(1, bool)
|
||||
|
||||
@can_act_power_source.setter
|
||||
def can_act_power_source(self, can_act_power_source: bool):
|
||||
self._set_by_bitmask(can_act_power_source, 1)
|
||||
|
||||
@property
|
||||
def cab_act_power_sink(self):
|
||||
"""
|
||||
Set and get DUT can act as a power sink flag support.
|
||||
|
||||
Returns:
|
||||
object bool
|
||||
"""
|
||||
return self._get_by_bitmask(2, bool)
|
||||
|
||||
@cab_act_power_sink.setter
|
||||
def cab_act_power_sink(self, cab_act_power_sink: bool):
|
||||
self._set_by_bitmask(cab_act_power_sink, 2)
|
||||
|
||||
@property
|
||||
def not_support_pd_contract(self):
|
||||
"""
|
||||
Set and get DUT does not support PD Contract flag support.
|
||||
|
||||
Returns:
|
||||
object bool
|
||||
"""
|
||||
return self._get_by_bitmask(3, bool)
|
||||
|
||||
@not_support_pd_contract.setter
|
||||
def not_support_pd_contract(self, not_support_pd_contract: bool):
|
||||
self._set_by_bitmask(not_support_pd_contract, 3)
|
||||
|
||||
|
||||
class UsbcElectricalTestParam:
|
||||
"""
|
||||
Class `DpElectricalTestParam` describes parameters for DP electrical tests.
|
||||
- Test timeout, in milliseconds `timeout`.
|
||||
- Defines DUT capabilities `dut_caps` type `UsbcElTestDutCaps`.
|
||||
- Defines the time period for USB Type-C re-plug simulation 'disconnected' state `re_plug_time`.
|
||||
- Defines the time period that the TE will wait for DUT to complete power contract negotiation `attach_timeout`.
|
||||
- Defines Power Contract timeout, in milliseconds `pwr_contract_timeout`.
|
||||
- Defines the low limit for the voltage window when power sink current is 0.5A or 0.9A `cc_low_voltage_1 `.
|
||||
- Defines the high limit for the voltage window when power sink current is 0.5A or 0.9A `cc_high_voltage_1`.
|
||||
- Defines the low limit for the voltage window when power sink current is 1.5A `cc_low_voltage_2`.
|
||||
- Defines the high limit for the voltage window when power sink current is 1.5A `cc_high_voltage_2`.
|
||||
- Defines the low limit for the voltage window when power sink current is 3.0A `cc_low_voltage_3`.
|
||||
- Defines the high limit for the voltage window when power sink current is 3.0A `cc_high_voltage_3`.
|
||||
- Defines the low limit for the Vcon voltage window `vconn_low_voltage`.
|
||||
- Defines the high limit for the Vcon voltage window `vconn_high_voltage`.
|
||||
- Defines the timeout the TE will wait for the DUT to enter into DisplayPort alternate mode `dp_alt_mode_timeout`.
|
||||
- Defines the low voltage limit for the positive DP AUX line when idle `aux_positive_idle_low_voltage`.
|
||||
- Defines the high voltage limit for the positive DP AUX line when idle `aux_positive_idle_high_voltage`.
|
||||
- Defines the low voltage limit for the negative DP AUX line when idle `aux_negative_idle_low_voltage`.
|
||||
- Defines the high voltage limit for the negative DP AUX line when idle `aux_negative_idle_high_voltage`.
|
||||
- Defines the low limit for Vbus voltage window. The limit is defined in millivolts (mV) `vbus_low_voltage`.
|
||||
- Defines the high limit for Vbus voltage window. The limit is defined in millivolts (mV) `vbus_high_voltage`.
|
||||
- Defines the highest allowed deviation between maximum and minimum currents measured from the individual Vbus
|
||||
pins as per-mill (‰) of total measured current. This means that if the total measured current is 3000mA, and the
|
||||
setting 100, the maximum difference that is allowed between maximum and minimum currents is 300mA
|
||||
`vbus_current_max`.
|
||||
- Defines the highest allowed deviation between maximum and minimum currents measured from the individual GND pins
|
||||
as per-mill (‰) of total measured current `gnd_current_max`.
|
||||
- Defines delay from end of power contract negotiation to voltage / current measurements `power_measure_delay`.
|
||||
- Defines the minimum current, in mA, that a Power Sink DUT must use in order to pass the test `min_dut_current`.
|
||||
- Delay after load resistor on, milliseconds. This helps to skip transient processes `resistor_on_delay`.
|
||||
- Delay for measure CC lines voltage after DUT plug detection, milliseconds `cc_measure_delay`.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
self.__timeout = Param(json_obj["TSI_USBC_EL_TIMEOUT"])
|
||||
self.__dut_caps = UsbcElTestDutCaps(json_obj["TSI_USBC_EL_DUT_CAPS"])
|
||||
self.__re_plug_time = Param(json_obj["TSI_USBC_EL_REPLUG_TIME"])
|
||||
self.__attach_timeout = Param(json_obj["TSI_USBC_EL_DUT_ATTACH_TIMEOUT"])
|
||||
self.__pwr_contract_timeout = Param(json_obj["TSI_USBC_EL_PWR_CONTRACT_TIMEOUT"])
|
||||
self.__cc_low_voltage_1 = Param(json_obj["TSI_USBC_EL_CC_LOW_VOLTAGE_1"])
|
||||
self.__cc_high_voltage_1 = Param(json_obj["TSI_USBC_EL_CC_HI_VOLTAGE_1"])
|
||||
self.__cc_low_voltage_2 = Param(json_obj["TSI_USBC_EL_CC_LOW_VOLTAGE_2"])
|
||||
self.__cc_high_voltage_2 = Param(json_obj["TSI_USBC_EL_CC_HI_VOLTAGE_2"])
|
||||
self.__cc_low_voltage_3 = Param(json_obj["TSI_USBC_EL_CC_LOW_VOLTAGE_3"])
|
||||
self.__cc_high_voltage_3 = Param(json_obj["TSI_USBC_EL_CC_HI_VOLTAGE_3"])
|
||||
self.__vconn_low_voltage = Param(json_obj["TSI_USBC_EL_VCON_LOW_VOLTAGE"])
|
||||
self.__vconn_high_voltage = Param(json_obj["TSI_USBC_EL_VCON_HI_VOLTAGE"])
|
||||
self.__dp_alt_mode_timeout = Param(json_obj["TSI_USBC_EL_DP_ALT_TIMEOUT"])
|
||||
self.__aux_positive_idle_low_voltage = Param(json_obj["TSI_USBC_EL_AUX_P_IDLE_LOW_VOLTAGE"])
|
||||
self.__aux_positive_idle_high_voltage = Param(json_obj["TSI_USBC_EL_AUX_P_IDLE_HI_VOLTAGE"])
|
||||
self.__aux_negative_idle_low_voltage = Param(json_obj["TSI_USBC_EL_AUX_N_IDLE_LOW_VOLTAGE"])
|
||||
self.__aux_negative_idle_high_voltage = Param(json_obj["TSI_USBC_EL_AUX_N_IDLE_HI_VOLTAGE"])
|
||||
self.__vbus_low_voltage = Param(json_obj["TSI_USBC_EL_VBUS_LOW_VOLTAGE"])
|
||||
self.__vbus_high_voltage = Param(json_obj["TSI_USBC_EL_VBUS_HI_VOLTAGE"])
|
||||
self.__vbus_current_max = Param(json_obj["TSI_USBC_EL_VBUS_CURRENT_MAX_DEV"])
|
||||
self.__gnd_current_max = Param(json_obj["TSI_USBC_EL_GND_CURRENT_MAX_DEV"])
|
||||
self.__power_measure_delay = Param(json_obj["TSI_USBC_EL_PWR_MEASURE_DELAY"])
|
||||
self.__min_dut_current = Param(json_obj["TSI_USBC_EL_MIN_DUT_CURRENT"])
|
||||
self.__resistor_on_delay = Param(json_obj["TSI_USBC_EL_RES_ON_DELAY"])
|
||||
self.__cc_measure_delay = Param(json_obj["TSI_USBC_EL_CC_MEASURE_DELAY"])
|
||||
|
||||
@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(self) -> UsbcElTestDutCaps:
|
||||
"""
|
||||
Set and get USB-C DUT caps.
|
||||
|
||||
Returns:
|
||||
object of `UsbcElTestDutCaps` type
|
||||
"""
|
||||
return self.__dut_caps
|
||||
|
||||
@dut_caps.setter
|
||||
def dut_caps(self, dut_caps: UsbcElTestDutCaps):
|
||||
self.__dut_caps = dut_caps
|
||||
|
||||
@property
|
||||
def pwr_contract_timeout(self) -> int:
|
||||
"""
|
||||
Set and get power contract timeout.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__pwr_contract_timeout.default_value
|
||||
|
||||
@pwr_contract_timeout.setter
|
||||
def pwr_contract_timeout(self, pwr_contract_timeout: int):
|
||||
if not(self.__pwr_contract_timeout.min_value < pwr_contract_timeout < self.__pwr_contract_timeout.max_value):
|
||||
raise ValueError(f"Power contract timeout cannot be less than {self.__pwr_contract_timeout.min_value} "
|
||||
f"and more than {self.__pwr_contract_timeout.max_value}")
|
||||
self.__pwr_contract_timeout.default_value = pwr_contract_timeout
|
||||
|
||||
@property
|
||||
def cc_low_voltage_1(self) -> int:
|
||||
"""
|
||||
Set and get low limit for the voltage window when power sink current is 0.5A or 0.9A.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__cc_low_voltage_1.default_value
|
||||
|
||||
@cc_low_voltage_1.setter
|
||||
def cc_low_voltage_1(self, cc_low_voltage_1: int):
|
||||
if not(self.__cc_low_voltage_1.min_value < cc_low_voltage_1 < self.__cc_low_voltage_1.max_value):
|
||||
raise ValueError(f"First CC low voltage cannot be less than {self.__cc_low_voltage_1.min_value} "
|
||||
f"and more than {self.__cc_low_voltage_1.max_value}")
|
||||
self.__cc_low_voltage_1.default_value = cc_low_voltage_1
|
||||
|
||||
@property
|
||||
def cc_high_voltage_1(self) -> int:
|
||||
"""
|
||||
Set and get high limit for the voltage window when power sink current is 0.5A or 0.9A.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__cc_high_voltage_1.default_value
|
||||
|
||||
@cc_high_voltage_1.setter
|
||||
def cc_high_voltage_1(self, cc_high_voltage_1: int):
|
||||
if not(self.__cc_high_voltage_1.min_value < cc_high_voltage_1 < self.__cc_high_voltage_1.max_value):
|
||||
raise ValueError(f"First CC high voltage cannot be less than {self.__cc_high_voltage_1.min_value} "
|
||||
f"and more than {self.__cc_high_voltage_1.max_value}")
|
||||
self.__cc_high_voltage_1.default_value = cc_high_voltage_1
|
||||
|
||||
@property
|
||||
def cc_low_voltage_2(self) -> int:
|
||||
"""
|
||||
Set and get low limit for the voltage window when power sink current is 1.5A.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__cc_low_voltage_2.default_value
|
||||
|
||||
@cc_low_voltage_2.setter
|
||||
def cc_low_voltage_2(self, cc_low_voltage_2: int):
|
||||
if not(self.__cc_low_voltage_2.min_value < cc_low_voltage_2 < self.__cc_low_voltage_2.max_value):
|
||||
raise ValueError(f"Second CC low voltage cannot be less than {self.__cc_low_voltage_2.min_value} "
|
||||
f"and more than {self.__cc_low_voltage_2.max_value}")
|
||||
self.__cc_low_voltage_2.default_value = cc_low_voltage_2
|
||||
|
||||
@property
|
||||
def cc_high_voltage_2(self) -> int:
|
||||
"""
|
||||
Set and get high limit for the voltage window when power sink current is 1.5A.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__cc_high_voltage_2.default_value
|
||||
|
||||
@cc_high_voltage_2.setter
|
||||
def cc_high_voltage_2(self, cc_high_voltage_2: int):
|
||||
if not(self.__cc_high_voltage_2.min_value < cc_high_voltage_2 < self.__cc_high_voltage_2.max_value):
|
||||
raise ValueError(f"Second CC high voltage cannot be less than {self.__cc_high_voltage_2.min_value} "
|
||||
f"and more than {self.__cc_high_voltage_2.max_value}")
|
||||
self.__cc_high_voltage_2.default_value = cc_high_voltage_2
|
||||
|
||||
@property
|
||||
def cc_low_voltage_3(self) -> int:
|
||||
"""
|
||||
Set and get low limit for the voltage window when power sink current is 3.0A.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__cc_low_voltage_3.default_value
|
||||
|
||||
@cc_low_voltage_3.setter
|
||||
def cc_low_voltage_3(self, cc_low_voltage_3: int):
|
||||
if not(self.__cc_low_voltage_3.min_value < cc_low_voltage_3 < self.__cc_low_voltage_3.max_value):
|
||||
raise ValueError(f"Third CC low voltage cannot be less than {self.__cc_low_voltage_3.min_value} "
|
||||
f"and more than {self.__cc_low_voltage_3.max_value}")
|
||||
self.__cc_low_voltage_3.default_value = cc_low_voltage_3
|
||||
|
||||
@property
|
||||
def cc_high_voltage_3(self):
|
||||
"""
|
||||
Set and get high limit for the voltage window when power sink current is 3.0A.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__cc_high_voltage_3.default_value
|
||||
|
||||
@cc_high_voltage_3.setter
|
||||
def cc_high_voltage_3(self, cc_high_voltage_3: int):
|
||||
if not(self.__cc_high_voltage_3.min_value < cc_high_voltage_3 < self.__cc_high_voltage_3.max_value):
|
||||
raise ValueError(f"Third CC high voltage cannot be less than {self.__cc_high_voltage_3.min_value} "
|
||||
f"and more than {self.__cc_high_voltage_3.max_value}")
|
||||
self.__cc_high_voltage_3.default_value = cc_high_voltage_3
|
||||
|
||||
@property
|
||||
def vconn_low_voltage(self) -> int:
|
||||
"""
|
||||
Set and get low limit for the Vcon voltage window.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__vconn_low_voltage.default_value
|
||||
|
||||
@vconn_low_voltage.setter
|
||||
def vconn_low_voltage(self, vconn_low_voltage: int):
|
||||
if not(self.__vconn_low_voltage.min_value < vconn_low_voltage < self.__vconn_low_voltage.max_value):
|
||||
raise ValueError(f"VCONN low voltage cannot be less than {self.__vconn_low_voltage.min_value} "
|
||||
f"and more than {self.__vconn_low_voltage.max_value}")
|
||||
self.__vconn_low_voltage.default_value = vconn_low_voltage
|
||||
|
||||
@property
|
||||
def vconn_high_voltage(self) -> int:
|
||||
"""
|
||||
Set and get high limit for the Vcon voltage window.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__vconn_high_voltage.default_value
|
||||
|
||||
@vconn_high_voltage.setter
|
||||
def vconn_high_voltage(self, vconn_high_voltage: int):
|
||||
if not(self.__vconn_high_voltage.min_value < vconn_high_voltage < self.__vconn_high_voltage.max_value):
|
||||
raise ValueError(f"VCONN high voltage cannot be less than {self.__vconn_high_voltage.min_value} "
|
||||
f"and more than {self.__vconn_high_voltage.max_value}")
|
||||
self.__vconn_high_voltage.default_value = vconn_high_voltage
|
||||
|
||||
@property
|
||||
def dp_alt_mode_timeout(self) -> int:
|
||||
"""
|
||||
Set and get DP alt mode timeout.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__dp_alt_mode_timeout.default_value
|
||||
|
||||
@dp_alt_mode_timeout.setter
|
||||
def dp_alt_mode_timeout(self, dp_alt_mode_timeout: int):
|
||||
if not(self.__dp_alt_mode_timeout.min_value < dp_alt_mode_timeout < self.__dp_alt_mode_timeout.max_value):
|
||||
raise ValueError(f"DP Alt mode timeout cannot be less than {self.__dp_alt_mode_timeout.min_value} "
|
||||
f"and more than {self.__dp_alt_mode_timeout.max_value}")
|
||||
self.__dp_alt_mode_timeout.default_value = dp_alt_mode_timeout
|
||||
|
||||
@property
|
||||
def aux_positive_idle_low_voltage(self) -> int:
|
||||
"""
|
||||
Set and get low voltage limit for the positive DP AUX.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__aux_positive_idle_low_voltage.default_value
|
||||
|
||||
@aux_positive_idle_low_voltage.setter
|
||||
def aux_positive_idle_low_voltage(self, aux_positive_idle_low_voltage: int):
|
||||
if not(self.__aux_positive_idle_low_voltage.min_value < aux_positive_idle_low_voltage <
|
||||
self.__aux_positive_idle_low_voltage.max_value):
|
||||
raise ValueError(f"AUX positive IDLE low voltage cannot be less than "
|
||||
f"{self.__aux_positive_idle_low_voltage.min_value} and more than "
|
||||
f"{self.__aux_positive_idle_low_voltage.max_value}")
|
||||
self.__aux_positive_idle_low_voltage.default_value = aux_positive_idle_low_voltage
|
||||
|
||||
@property
|
||||
def aux_positive_idle_high_voltage(self) -> int:
|
||||
"""
|
||||
Set and get high voltage limit for the positive DP AUX.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__aux_positive_idle_high_voltage.default_value
|
||||
|
||||
@aux_positive_idle_high_voltage.setter
|
||||
def aux_positive_idle_high_voltage(self, aux_positive_idle_high_voltage: int):
|
||||
if not(self.__aux_positive_idle_high_voltage.min_value < aux_positive_idle_high_voltage <
|
||||
self.__aux_positive_idle_high_voltage.max_value):
|
||||
raise ValueError(f"AUX positive IDLE high voltage cannot be less than "
|
||||
f"{self.__aux_positive_idle_high_voltage.min_value} and more than "
|
||||
f"{self.__aux_positive_idle_high_voltage.max_value}")
|
||||
self.__aux_positive_idle_high_voltage.default_value = aux_positive_idle_high_voltage
|
||||
|
||||
@property
|
||||
def aux_negative_idle_low_voltage(self) -> int:
|
||||
"""
|
||||
Set and get low voltage limit for the negative DP AUX.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__aux_negative_idle_low_voltage.default_value
|
||||
|
||||
@aux_negative_idle_low_voltage.setter
|
||||
def aux_negative_idle_low_voltage(self, aux_negative_idle_low_voltage: int):
|
||||
if not(self.__aux_negative_idle_low_voltage.min_value < aux_negative_idle_low_voltage <
|
||||
self.__aux_negative_idle_low_voltage.max_value):
|
||||
raise ValueError(f"AUX negative IDLE low voltage cannot be less than "
|
||||
f"{self.__aux_negative_idle_low_voltage.min_value} and more than "
|
||||
f"{self.__aux_negative_idle_low_voltage.max_value}")
|
||||
self.__aux_negative_idle_low_voltage.default_value = aux_negative_idle_low_voltage
|
||||
|
||||
@property
|
||||
def aux_negative_idle_high_voltage(self) -> int:
|
||||
"""
|
||||
Set and get high voltage limit for the negative DP AUX.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__aux_negative_idle_high_voltage.default_value
|
||||
|
||||
@aux_negative_idle_high_voltage.setter
|
||||
def aux_negative_idle_high_voltage(self, aux_negative_idle_high_voltage: int):
|
||||
if not(self.__aux_negative_idle_high_voltage.min_value < aux_negative_idle_high_voltage <
|
||||
self.__aux_negative_idle_high_voltage.max_value):
|
||||
raise ValueError(f"AUX negative IDLE high voltage cannot be less than "
|
||||
f"{self.__aux_negative_idle_high_voltage.min_value} and more than "
|
||||
f"{self.__aux_negative_idle_high_voltage.max_value}")
|
||||
self.__aux_negative_idle_high_voltage.default_value = aux_negative_idle_high_voltage
|
||||
|
||||
@property
|
||||
def vbus_low_voltage(self) -> int:
|
||||
"""
|
||||
Set and get low limit for Vbus voltage window.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__vbus_low_voltage.default_value
|
||||
|
||||
@vbus_low_voltage.setter
|
||||
def vbus_low_voltage(self, vbus_low_voltage: int):
|
||||
if not(self.__vbus_low_voltage.min_value < vbus_low_voltage < self.__vbus_low_voltage.max_value):
|
||||
raise ValueError(f"VBUS low voltage cannot be less than {self.__vbus_low_voltage.min_value} "
|
||||
f"and more than {self.__vbus_low_voltage.max_value}")
|
||||
self.__vbus_low_voltage.default_value = vbus_low_voltage
|
||||
|
||||
@property
|
||||
def vbus_high_voltage(self) -> int:
|
||||
"""
|
||||
Set and get high limit for Vbus voltage window.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__vbus_high_voltage.default_value
|
||||
|
||||
@vbus_high_voltage.setter
|
||||
def vbus_high_voltage(self, vbus_high_voltage: int):
|
||||
if not(self.__vbus_high_voltage.min_value < vbus_high_voltage < self.__vbus_high_voltage.max_value):
|
||||
raise ValueError(f"VBUS high voltage cannot be less than {self.__vbus_high_voltage.min_value} "
|
||||
f"and more than {self.__vbus_high_voltage.max_value}")
|
||||
self.__vbus_high_voltage.default_value = vbus_high_voltage
|
||||
|
||||
@property
|
||||
def vbus_current_max(self) -> int:
|
||||
"""
|
||||
Set and get the highest allowed deviation of current VBUS.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__vbus_current_max.default_value
|
||||
|
||||
@vbus_current_max.setter
|
||||
def vbus_current_max(self, vbus_current_max: int):
|
||||
if not(self.__vbus_current_max.min_value < vbus_current_max < self.__vbus_current_max.max_value):
|
||||
raise ValueError(f"VBUS current max cannot be less than {self.__vbus_current_max.min_value} "
|
||||
f"and more than {self.__vbus_current_max.max_value}")
|
||||
self.__vbus_current_max.default_value = vbus_current_max
|
||||
|
||||
@property
|
||||
def gnd_current_max(self) -> int:
|
||||
"""
|
||||
Set and get the highest allowed deviation of current GND.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__gnd_current_max.default_value
|
||||
|
||||
@gnd_current_max.setter
|
||||
def gnd_current_max(self, gnd_current_max: int):
|
||||
if not(self.__gnd_current_max.min_value < gnd_current_max < self.__gnd_current_max.max_value):
|
||||
raise ValueError(f"GND current max cannot be less than {self.__gnd_current_max.min_value} "
|
||||
f"and more than {self.__gnd_current_max.max_value}")
|
||||
self.__gnd_current_max.default_value = gnd_current_max
|
||||
|
||||
@property
|
||||
def power_measure_delay(self) -> int:
|
||||
"""
|
||||
Set and get delay from end of power contract negotiation to voltage / current measurements.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__power_measure_delay.default_value
|
||||
|
||||
@power_measure_delay.setter
|
||||
def power_measure_delay(self, power_measure_delay: int):
|
||||
if not(self.__power_measure_delay.min_value < power_measure_delay < self.__power_measure_delay.max_value):
|
||||
raise ValueError(f"Power measure delay cannot be less than {self.__power_measure_delay.min_value} "
|
||||
f"and more than {self.__power_measure_delay.max_value}")
|
||||
self.__power_measure_delay.default_value = power_measure_delay
|
||||
|
||||
@property
|
||||
def min_dut_current(self) -> int:
|
||||
"""
|
||||
Set and get the minimum current.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__min_dut_current.default_value
|
||||
|
||||
@min_dut_current.setter
|
||||
def min_dut_current(self, min_dut_current: int):
|
||||
if not(self.__min_dut_current.min_value < min_dut_current < self.__min_dut_current.max_value):
|
||||
raise ValueError(f"Minimum current on DUT cannot be less than {self.__min_dut_current.min_value} "
|
||||
f"and more than {self.__min_dut_current.max_value}")
|
||||
self.__min_dut_current.default_value = min_dut_current
|
||||
|
||||
@property
|
||||
def resistor_on_delay(self) -> int:
|
||||
"""
|
||||
Set and get delay after load resistor.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__resistor_on_delay.default_value
|
||||
|
||||
@resistor_on_delay.setter
|
||||
def resistor_on_delay(self, resistor_on_delay: int):
|
||||
if not(self.__resistor_on_delay.min_value < resistor_on_delay < self.__resistor_on_delay.max_value):
|
||||
raise ValueError(f"Resistor delay cannot be less than {self.__resistor_on_delay.min_value} "
|
||||
f"and more than {self.__resistor_on_delay.max_value}")
|
||||
self.__resistor_on_delay.default_value = resistor_on_delay
|
||||
|
||||
@property
|
||||
def cc_measure_delay(self) -> int:
|
||||
"""
|
||||
Set and get delay for measure CC lines voltage after DUT plug detection.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__cc_measure_delay.default_value
|
||||
|
||||
@cc_measure_delay.setter
|
||||
def cc_measure_delay(self, cc_measure_delay: int):
|
||||
if not(self.__cc_measure_delay.min_value < cc_measure_delay < self.__cc_measure_delay.max_value):
|
||||
raise ValueError(f"CC measure delay cannot be less than {self.__cc_measure_delay.min_value} "
|
||||
f"and more than {self.__cc_measure_delay.max_value}")
|
||||
self.__cc_measure_delay.default_value = cc_measure_delay
|
||||
303
UniTAP/dev/modules/dut_tests/dut_default_params/vrr_tests.py
Normal file
303
UniTAP/dev/modules/dut_tests/dut_default_params/vrr_tests.py
Normal file
@@ -0,0 +1,303 @@
|
||||
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
|
||||
from UniTAP.dev.modules.dut_tests.test_utils import update_default_value
|
||||
|
||||
|
||||
class VrrCaps(Param):
|
||||
"""
|
||||
Class `VrrCaps` describes DUT VRR capabilities flags and allows settings values.
|
||||
- VRR enable/disable `vrr_enable`.
|
||||
- Defines M_CONST `m_const`.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
super().__init__(json_obj)
|
||||
|
||||
@property
|
||||
def vrr_enable(self):
|
||||
"""
|
||||
Set and get VRR enable/disable flag.
|
||||
|
||||
Returns:
|
||||
object bool
|
||||
"""
|
||||
return self._get_by_bitmask(0, bool)
|
||||
|
||||
@vrr_enable.setter
|
||||
def vrr_enable(self, vrr_enable: bool):
|
||||
self._set_by_bitmask(vrr_enable, 0)
|
||||
|
||||
@property
|
||||
def m_const(self):
|
||||
"""
|
||||
Set and get m const enable/disable flag.
|
||||
|
||||
Returns:
|
||||
object bool
|
||||
"""
|
||||
return self._get_by_bitmask(1, bool)
|
||||
|
||||
@m_const.setter
|
||||
def m_const(self, m_const: bool):
|
||||
self._set_by_bitmask(m_const, 1)
|
||||
|
||||
|
||||
class BaseFront(Param):
|
||||
"""
|
||||
Class `BaseFront` describes DUT BaseFront capabilities flags and allows settings values.
|
||||
- Base front value `vrr_enable`.
|
||||
- Reduced blanking enable/disable `m_const`.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
super().__init__(json_obj)
|
||||
|
||||
@property
|
||||
def base_front(self):
|
||||
"""
|
||||
Set and get va;ue of base front.
|
||||
|
||||
Returns:
|
||||
object int
|
||||
"""
|
||||
return self._get_by_bitmask(0, int)
|
||||
|
||||
@base_front.setter
|
||||
def base_front(self, base_front: int):
|
||||
if not (0 <= base_front <= 3):
|
||||
raise ValueError(f"Base front value cannot be less than 0 and more than 3")
|
||||
self._set_by_bitmask(base_front, 0)
|
||||
|
||||
@property
|
||||
def reduced_blanking(self):
|
||||
"""
|
||||
Set and get reduced blanking flag support.
|
||||
|
||||
Returns:
|
||||
object bool
|
||||
"""
|
||||
return self._get_by_bitmask(1, bool)
|
||||
|
||||
@reduced_blanking.setter
|
||||
def reduced_blanking(self, reduced_blanking: bool):
|
||||
self._set_by_bitmask(reduced_blanking, 1)
|
||||
|
||||
|
||||
class VrrTestParamBase:
|
||||
"""
|
||||
Class `VrrTestParam` describes parameters for VRR Sink and Source tests.
|
||||
- Test timeout, in milliseconds `timeout`.
|
||||
- Defines VRR Max value `vrr_max`.
|
||||
- Defines VRR Min value `vrr_min`.
|
||||
- Defines VRR Static value `vrr_static`.
|
||||
- Defines step of changing frame rate `vrr_step`.
|
||||
- Defines timer to change frame rate `vrr_time_step`.
|
||||
- Defines VRR capabilities `vrr_enable_cups` type `VrrCaps`.
|
||||
- Defines VRR Base front `base_vfront` type `BaseFront`.
|
||||
- Defines Base Refresh Rate `base_rate`.
|
||||
"""
|
||||
def __init__(self, timeout, vrr_max, vrr_min, vrr_static, vrr_step, vrr_time_step,
|
||||
vrr_enable_cups, base_vfront, base_rate):
|
||||
self.__timeout = timeout
|
||||
self.__vrr_max = vrr_max
|
||||
self.__vrr_min = vrr_min
|
||||
self.__vrr_static = vrr_static
|
||||
self.__vrr_step = vrr_step
|
||||
self.__vrr_time_step = vrr_time_step
|
||||
self.__vrr_enable_cups = vrr_enable_cups
|
||||
self.__base_vfront = base_vfront
|
||||
self.__base_rate = base_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 vrr_max(self) -> int:
|
||||
"""
|
||||
Set and get VRR max.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__vrr_max.default_value
|
||||
|
||||
@vrr_max.setter
|
||||
def vrr_max(self, vrr_max: int):
|
||||
if not(self.__vrr_max.min_value < vrr_max < self.__vrr_max.max_value):
|
||||
raise ValueError(f"VRR max cannot be less than {self.__vrr_max.min_value} and more than "
|
||||
f"{self.__vrr_max.max_value}.")
|
||||
self.__vrr_max.default_value = vrr_max
|
||||
|
||||
@property
|
||||
def vrr_min(self) -> int:
|
||||
"""
|
||||
Set and get VRR min.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__vrr_min.default_value
|
||||
|
||||
@vrr_min.setter
|
||||
def vrr_min(self, vrr_min: int):
|
||||
if not(self.__vrr_min.min_value < vrr_min < self.__vrr_min.max_value):
|
||||
raise ValueError(f"VRR min cannot be less than {self.__vrr_min.min_value} and more than "
|
||||
f"{self.__vrr_min.max_value}.")
|
||||
self.__vrr_min.default_value = vrr_min
|
||||
|
||||
@property
|
||||
def vrr_static(self) -> int:
|
||||
"""
|
||||
Set and get VRR static.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__vrr_static.default_value
|
||||
|
||||
@vrr_static.setter
|
||||
def vrr_static(self, vrr_static: int):
|
||||
if not(self.__vrr_static.min_value < vrr_static < self.__vrr_static.max_value):
|
||||
raise ValueError(f"VRR stasic cannot be less than {self.__vrr_static.min_value} and more than "
|
||||
f"{self.__vrr_static.max_value}.")
|
||||
self.__vrr_static.default_value = vrr_static
|
||||
|
||||
@property
|
||||
def vrr_step(self) -> int:
|
||||
"""
|
||||
Set and get VRR step.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__vrr_step.default_value
|
||||
|
||||
@vrr_step.setter
|
||||
def vrr_step(self, vrr_step: int):
|
||||
if not(self.__vrr_step.min_value < vrr_step < self.__vrr_step.max_value):
|
||||
raise ValueError(f"VRR step cannot be less than {self.__vrr_step.min_value} and more than "
|
||||
f"{self.__vrr_step.max_value}.")
|
||||
self.__vrr_step.default_value = vrr_step
|
||||
|
||||
@property
|
||||
def vrr_time_step(self) -> int:
|
||||
"""
|
||||
Set and get VRR time step.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__vrr_time_step.default_value
|
||||
|
||||
@vrr_time_step.setter
|
||||
def vrr_time_step(self, vrr_time_step: int):
|
||||
if not(self.__vrr_time_step.min_value < vrr_time_step < self.__vrr_time_step.max_value):
|
||||
raise ValueError(f"VRR time step cannot be less than {self.__vrr_time_step.min_value} and more than "
|
||||
f"{self.__vrr_time_step.max_value}.")
|
||||
self.__vrr_time_step.default_value = vrr_time_step
|
||||
|
||||
@property
|
||||
def vrr_enable_cups(self):
|
||||
"""
|
||||
Set and get VRR caps.
|
||||
|
||||
Returns:
|
||||
object of `VrrCaps` type
|
||||
"""
|
||||
return self.__vrr_enable_cups
|
||||
|
||||
@vrr_enable_cups.setter
|
||||
def vrr_enable_cups(self, vrr_enable_cups: VrrCaps):
|
||||
self.__vrr_enable_cups = vrr_enable_cups
|
||||
|
||||
@property
|
||||
def base_vfront(self):
|
||||
"""
|
||||
Set and get base vfront value.
|
||||
|
||||
Returns:
|
||||
object of BaseFront type
|
||||
"""
|
||||
return self.__base_vfront
|
||||
|
||||
@base_vfront.setter
|
||||
def base_vfront(self, base_vfront: BaseFront):
|
||||
self.__base_vfront = base_vfront
|
||||
|
||||
@property
|
||||
def base_rate(self) -> int:
|
||||
"""
|
||||
Set and get base rate.
|
||||
|
||||
Returns:
|
||||
object of int type
|
||||
"""
|
||||
return self.__base_rate.default_value
|
||||
|
||||
@base_rate.setter
|
||||
def base_rate(self, base_rate: int):
|
||||
if not(self.__base_rate.min_value < base_rate < self.__base_rate.max_value):
|
||||
raise ValueError(f"VRR time step cannot be less than {self.__vrr_time_step.min_value} and more than "
|
||||
f"{self.__base_rate.max_value}.")
|
||||
self.__base_rate.default_value = base_rate
|
||||
|
||||
|
||||
class VrrSinkDUTTestParam(VrrTestParamBase):
|
||||
"""
|
||||
Class `VrrSinkDUTTestParam` describes parameters for VRR Sink and Source tests.
|
||||
- Test timeout, in milliseconds `timeout`.
|
||||
- Defines VRR Max value `vrr_max`.
|
||||
- Defines VRR Min value `vrr_min`.
|
||||
- Defines VRR Static value `vrr_static`.
|
||||
- Defines step of changing frame rate `vrr_step`.
|
||||
- Defines timer to change frame rate `vrr_time_step`.
|
||||
- Defines VRR capabilities `vrr_enable_cups` type `VrrCaps`.
|
||||
- Defines VRR Base front `base_vfront` type `BaseFront`.
|
||||
- Defines Base Refresh Rate `base_rate`.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
super().__init__(Param(json_obj["TSI_VRR_SINK_DUT_TIMEOUT"]),
|
||||
Param(json_obj["TSI_VRR_SINK_DUT_VRR_MAX"]),
|
||||
Param(json_obj["TSI_VRR_SINK_DUT_VRR_MIN"]),
|
||||
Param(json_obj["TSI_VRR_SINK_DUT_VRR_STATIC"]),
|
||||
Param(json_obj["TSI_VRR_SINK_DUT_VRR_STEP"]),
|
||||
Param(json_obj["TSI_VRR_SINK_DUT_VRR_TIME_STEP"]),
|
||||
VrrCaps(json_obj["TSI_VRR_SINK_DUT_VRR_ENABLE"]),
|
||||
BaseFront(json_obj["TSI_VRR_SINK_DUT_BASE_VFRONT"]),
|
||||
Param(json_obj["TSI_VRR_SINK_DUT_BASE_RATE"]))
|
||||
|
||||
|
||||
class VrrSourceDUTTestParam(VrrTestParamBase):
|
||||
"""
|
||||
Class `VrrSourceDUTTestParam` describes parameters for VRR Sink and Source tests.
|
||||
- Test timeout, in milliseconds `timeout`.
|
||||
- Defines VRR Max value `vrr_max`.
|
||||
- Defines VRR Min value `vrr_min`.
|
||||
- Defines VRR Static value `vrr_static`.
|
||||
- Defines step of changing frame rate `vrr_step`.
|
||||
- Defines timer to change frame rate `vrr_time_step`.
|
||||
- Defines VRR capabilities `vrr_enable_cups` type `VrrCaps`.
|
||||
- Defines VRR Base front `base_vfront` type `BaseFront`.
|
||||
- Defines Base Refresh Rate `base_rate`.
|
||||
"""
|
||||
def __init__(self, json_obj):
|
||||
super().__init__(Param(json_obj["TSI_VRR_SRC_DUT_TIMEOUT"]),
|
||||
Param(json_obj["TSI_VRR_SRC_DUT_VRR_MAX"]),
|
||||
Param(json_obj["TSI_VRR_SRC_DUT_VRR_MIN"]),
|
||||
Param(json_obj["TSI_VRR_SRC_DUT_VRR_STATIC"]),
|
||||
Param(json_obj["TSI_VRR_SRC_DUT_VRR_STEP"]),
|
||||
Param(json_obj["TSI_VRR_SRC_DUT_VRR_TIME_STEP"]),
|
||||
VrrCaps(json_obj["TSI_VRR_SRC_DUT_VRR_ENABLE"]),
|
||||
BaseFront(json_obj["TSI_VRR_SRC_DUT_BASE_VFRONT"]),
|
||||
Param(json_obj["TSI_VRR_SRC_DUT_BASE_RATE"]))
|
||||
Reference in New Issue
Block a user