1.1.0版本
This commit is contained in:
33
.gitignore
vendored
Normal file
33
.gitignore
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
# Python cache
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
*.pyo
|
||||||
|
*.pyd
|
||||||
|
|
||||||
|
# Virtual environments
|
||||||
|
.venv/
|
||||||
|
venv/
|
||||||
|
env/
|
||||||
|
|
||||||
|
# Build outputs
|
||||||
|
build/
|
||||||
|
dist/
|
||||||
|
*.spec.bak
|
||||||
|
|
||||||
|
# Test and runtime outputs
|
||||||
|
*.log
|
||||||
|
*.tmp
|
||||||
|
*.bak
|
||||||
|
*.csv
|
||||||
|
*.xlsx
|
||||||
|
|
||||||
|
# IDE files
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
# OS files
|
||||||
|
Thumbs.db
|
||||||
|
Desktop.ini
|
||||||
|
|
||||||
|
# Local configuration overrides
|
||||||
|
settings/*.local.json
|
||||||
94
RELEASE.md
Normal file
94
RELEASE.md
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
# 发布说明
|
||||||
|
|
||||||
|
## 版本入口
|
||||||
|
|
||||||
|
软件版本统一维护在 `app_version.py`:
|
||||||
|
|
||||||
|
- `APP_NAME`:软件名称
|
||||||
|
- `APP_VERSION`:软件发布版本
|
||||||
|
|
||||||
|
发布新版本时,优先修改这里,不要直接改界面标题字符串。
|
||||||
|
|
||||||
|
## 版本规则
|
||||||
|
|
||||||
|
建议使用语义化版本:`主版本.次版本.修订号`
|
||||||
|
|
||||||
|
- `1.0.0`:首个正式版
|
||||||
|
- `1.1.0`:兼容性新功能
|
||||||
|
- `1.1.1`:问题修复
|
||||||
|
- `2.0.0`:不兼容变更
|
||||||
|
|
||||||
|
## Git 管理建议
|
||||||
|
|
||||||
|
- `main`:始终保持可发布状态
|
||||||
|
- 功能开发使用独立分支
|
||||||
|
- 每次发布打 Git Tag,例如 `v1.1.0`
|
||||||
|
|
||||||
|
建议命令:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
git checkout main
|
||||||
|
git pull
|
||||||
|
git checkout -b feature/xxx
|
||||||
|
```
|
||||||
|
|
||||||
|
完成功能后:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
git add .
|
||||||
|
git commit -m "feat: xxx"
|
||||||
|
git checkout main
|
||||||
|
git merge --no-ff feature/xxx
|
||||||
|
```
|
||||||
|
|
||||||
|
发布时:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
git add app_version.py RELEASE.md
|
||||||
|
git commit -m "release: v1.1.0"
|
||||||
|
git tag v1.1.0
|
||||||
|
git push
|
||||||
|
git push origin v1.1.0
|
||||||
|
```
|
||||||
|
|
||||||
|
## 打包流程
|
||||||
|
|
||||||
|
当前打包入口:`pqAutomationApp.spec`
|
||||||
|
|
||||||
|
推荐发布步骤:
|
||||||
|
|
||||||
|
1. 修改 `app_version.py` 中的 `APP_VERSION`
|
||||||
|
2. 更新本文件中的变更说明
|
||||||
|
3. 提交代码并打 Tag
|
||||||
|
4. 执行打包命令
|
||||||
|
5. 将 `dist/pqAutomationApp` 复制为带版本号的发布目录
|
||||||
|
|
||||||
|
打包命令:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
pyinstaller pqAutomationApp.spec
|
||||||
|
```
|
||||||
|
|
||||||
|
建议发布目录命名:
|
||||||
|
|
||||||
|
- `PQAutomationApp_v1.1.0`
|
||||||
|
- `PQAutomationApp_v1.1.0_20260416`
|
||||||
|
|
||||||
|
## 每次发布前检查
|
||||||
|
|
||||||
|
1. 版本号是否已更新
|
||||||
|
2. 关键功能是否回归测试
|
||||||
|
3. `dist/` 和 `build/` 是否未提交到 Git
|
||||||
|
4. 发布说明是否已更新
|
||||||
|
5. Tag 是否与版本号一致
|
||||||
|
|
||||||
|
## 变更记录模板
|
||||||
|
|
||||||
|
每次发布可按下面格式补充:
|
||||||
|
|
||||||
|
### v0.1.0
|
||||||
|
|
||||||
|
- 首次建立版本发布机制
|
||||||
|
- 软件标题显示版本号
|
||||||
|
- 增加 `.gitignore`
|
||||||
|
- 增加发布流程文档
|
||||||
644
UniTAP/.pylintrc
Normal file
644
UniTAP/.pylintrc
Normal file
@@ -0,0 +1,644 @@
|
|||||||
|
[MAIN]
|
||||||
|
|
||||||
|
# Analyse import fallback blocks. This can be used to support both Python 2 and
|
||||||
|
# 3 compatible code, which means that the block might have code that exists
|
||||||
|
# only in one or another interpreter, leading to false positives when analysed.
|
||||||
|
analyse-fallback-blocks=no
|
||||||
|
|
||||||
|
# Clear in-memory caches upon conclusion of linting. Useful if running pylint
|
||||||
|
# in a server-like mode.
|
||||||
|
clear-cache-post-run=no
|
||||||
|
|
||||||
|
# Load and enable all available extensions. Use --list-extensions to see a list
|
||||||
|
# all available extensions.
|
||||||
|
#enable-all-extensions=
|
||||||
|
|
||||||
|
# In error mode, messages with a category besides ERROR or FATAL are
|
||||||
|
# suppressed, and no reports are done by default. Error mode is compatible with
|
||||||
|
# disabling specific errors.
|
||||||
|
#errors-only=
|
||||||
|
|
||||||
|
# Always return a 0 (non-error) status code, even if lint errors are found.
|
||||||
|
# This is primarily useful in continuous integration scripts.
|
||||||
|
#exit-zero=
|
||||||
|
|
||||||
|
# A comma-separated list of package or module names from where C extensions may
|
||||||
|
# be loaded. Extensions are loading into the active Python interpreter and may
|
||||||
|
# run arbitrary code.
|
||||||
|
extension-pkg-allow-list=
|
||||||
|
|
||||||
|
# A comma-separated list of package or module names from where C extensions may
|
||||||
|
# be loaded. Extensions are loading into the active Python interpreter and may
|
||||||
|
# run arbitrary code. (This is an alternative name to extension-pkg-allow-list
|
||||||
|
# for backward compatibility.)
|
||||||
|
extension-pkg-whitelist=
|
||||||
|
|
||||||
|
# Return non-zero exit code if any of these messages/categories are detected,
|
||||||
|
# even if score is above --fail-under value. Syntax same as enable. Messages
|
||||||
|
# specified are enabled, while categories only check already-enabled messages.
|
||||||
|
fail-on=
|
||||||
|
|
||||||
|
# Specify a score threshold under which the program will exit with error.
|
||||||
|
fail-under=10
|
||||||
|
|
||||||
|
# Interpret the stdin as a python script, whose filename needs to be passed as
|
||||||
|
# the module_or_package argument.
|
||||||
|
#from-stdin=
|
||||||
|
|
||||||
|
# Files or directories to be skipped. They should be base names, not paths.
|
||||||
|
ignore=CVS
|
||||||
|
|
||||||
|
# Add files or directories matching the regular expressions patterns to the
|
||||||
|
# ignore-list. The regex matches against paths and can be in Posix or Windows
|
||||||
|
# format. Because '\\' represents the directory delimiter on Windows systems,
|
||||||
|
# it can't be used as an escape character.
|
||||||
|
ignore-paths=
|
||||||
|
|
||||||
|
# Files or directories matching the regular expression patterns are skipped.
|
||||||
|
# The regex matches against base names, not paths. The default value ignores
|
||||||
|
# Emacs file locks
|
||||||
|
ignore-patterns=^\.#
|
||||||
|
|
||||||
|
# List of module names for which member attributes should not be checked and
|
||||||
|
# will not be imported (useful for modules/projects where namespaces are
|
||||||
|
# manipulated during runtime and thus existing member attributes cannot be
|
||||||
|
# deduced by static analysis). It supports qualified module names, as well as
|
||||||
|
# Unix pattern matching.
|
||||||
|
ignored-modules=
|
||||||
|
|
||||||
|
# Python code to execute, usually for sys.path manipulation such as
|
||||||
|
# pygtk.require().
|
||||||
|
#init-hook=
|
||||||
|
|
||||||
|
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
|
||||||
|
# number of processors available to use, and will cap the count on Windows to
|
||||||
|
# avoid hangs.
|
||||||
|
jobs=1
|
||||||
|
|
||||||
|
# Control the amount of potential inferred values when inferring a single
|
||||||
|
# object. This can help the performance when dealing with large functions or
|
||||||
|
# complex, nested conditions.
|
||||||
|
limit-inference-results=100
|
||||||
|
|
||||||
|
# List of plugins (as comma separated values of python module names) to load,
|
||||||
|
# usually to register additional checkers.
|
||||||
|
load-plugins=
|
||||||
|
|
||||||
|
# Pickle collected data for later comparisons.
|
||||||
|
persistent=yes
|
||||||
|
|
||||||
|
# Resolve imports to .pyi stubs if available. May reduce no-member messages and
|
||||||
|
# increase not-an-iterable messages.
|
||||||
|
prefer-stubs=no
|
||||||
|
|
||||||
|
# Minimum Python version to use for version dependent checks. Will default to
|
||||||
|
# the version used to run pylint.
|
||||||
|
py-version=3.10
|
||||||
|
|
||||||
|
# Discover python modules and packages in the file system subtree.
|
||||||
|
recursive=no
|
||||||
|
|
||||||
|
# Add paths to the list of the source roots. Supports globbing patterns. The
|
||||||
|
# source root is an absolute path or a path relative to the current working
|
||||||
|
# directory used to determine a package namespace for modules located under the
|
||||||
|
# source root.
|
||||||
|
source-roots=
|
||||||
|
|
||||||
|
# When enabled, pylint would attempt to guess common misconfiguration and emit
|
||||||
|
# user-friendly hints instead of false-positive error messages.
|
||||||
|
suggestion-mode=yes
|
||||||
|
|
||||||
|
# Allow loading of arbitrary C extensions. Extensions are imported into the
|
||||||
|
# active Python interpreter and may run arbitrary code.
|
||||||
|
unsafe-load-any-extension=no
|
||||||
|
|
||||||
|
# In verbose mode, extra non-checker-related info will be displayed.
|
||||||
|
#verbose=
|
||||||
|
|
||||||
|
|
||||||
|
[BASIC]
|
||||||
|
|
||||||
|
# Naming style matching correct argument names.
|
||||||
|
argument-naming-style=snake_case
|
||||||
|
|
||||||
|
# Regular expression matching correct argument names. Overrides argument-
|
||||||
|
# naming-style. If left empty, argument names will be checked with the set
|
||||||
|
# naming style.
|
||||||
|
#argument-rgx=
|
||||||
|
|
||||||
|
# Naming style matching correct attribute names.
|
||||||
|
attr-naming-style=snake_case
|
||||||
|
|
||||||
|
# Regular expression matching correct attribute names. Overrides attr-naming-
|
||||||
|
# style. If left empty, attribute names will be checked with the set naming
|
||||||
|
# style.
|
||||||
|
#attr-rgx=
|
||||||
|
|
||||||
|
# Bad variable names which should always be refused, separated by a comma.
|
||||||
|
bad-names=foo,
|
||||||
|
bar,
|
||||||
|
baz,
|
||||||
|
toto,
|
||||||
|
tutu,
|
||||||
|
tata
|
||||||
|
|
||||||
|
# Bad variable names regexes, separated by a comma. If names match any regex,
|
||||||
|
# they will always be refused
|
||||||
|
bad-names-rgxs=
|
||||||
|
|
||||||
|
# Naming style matching correct class attribute names.
|
||||||
|
class-attribute-naming-style=any
|
||||||
|
|
||||||
|
# Regular expression matching correct class attribute names. Overrides class-
|
||||||
|
# attribute-naming-style. If left empty, class attribute names will be checked
|
||||||
|
# with the set naming style.
|
||||||
|
#class-attribute-rgx=
|
||||||
|
|
||||||
|
# Naming style matching correct class constant names.
|
||||||
|
class-const-naming-style=UPPER_CASE
|
||||||
|
|
||||||
|
# Regular expression matching correct class constant names. Overrides class-
|
||||||
|
# const-naming-style. If left empty, class constant names will be checked with
|
||||||
|
# the set naming style.
|
||||||
|
#class-const-rgx=
|
||||||
|
|
||||||
|
# Naming style matching correct class names.
|
||||||
|
class-naming-style=PascalCase
|
||||||
|
|
||||||
|
# Regular expression matching correct class names. Overrides class-naming-
|
||||||
|
# style. If left empty, class names will be checked with the set naming style.
|
||||||
|
#class-rgx=
|
||||||
|
|
||||||
|
# Naming style matching correct constant names.
|
||||||
|
const-naming-style=UPPER_CASE
|
||||||
|
|
||||||
|
# Regular expression matching correct constant names. Overrides const-naming-
|
||||||
|
# style. If left empty, constant names will be checked with the set naming
|
||||||
|
# style.
|
||||||
|
#const-rgx=
|
||||||
|
|
||||||
|
# Minimum line length for functions/classes that require docstrings, shorter
|
||||||
|
# ones are exempt.
|
||||||
|
docstring-min-length=-1
|
||||||
|
|
||||||
|
# Naming style matching correct function names.
|
||||||
|
function-naming-style=snake_case
|
||||||
|
|
||||||
|
# Regular expression matching correct function names. Overrides function-
|
||||||
|
# naming-style. If left empty, function names will be checked with the set
|
||||||
|
# naming style.
|
||||||
|
#function-rgx=
|
||||||
|
|
||||||
|
# Good variable names which should always be accepted, separated by a comma.
|
||||||
|
good-names=i,
|
||||||
|
j,
|
||||||
|
k,
|
||||||
|
ex,
|
||||||
|
Run,
|
||||||
|
_
|
||||||
|
|
||||||
|
# Good variable names regexes, separated by a comma. If names match any regex,
|
||||||
|
# they will always be accepted
|
||||||
|
good-names-rgxs=
|
||||||
|
|
||||||
|
# Include a hint for the correct naming format with invalid-name.
|
||||||
|
include-naming-hint=no
|
||||||
|
|
||||||
|
# Naming style matching correct inline iteration names.
|
||||||
|
inlinevar-naming-style=any
|
||||||
|
|
||||||
|
# Regular expression matching correct inline iteration names. Overrides
|
||||||
|
# inlinevar-naming-style. If left empty, inline iteration names will be checked
|
||||||
|
# with the set naming style.
|
||||||
|
#inlinevar-rgx=
|
||||||
|
|
||||||
|
# Naming style matching correct method names.
|
||||||
|
method-naming-style=snake_case
|
||||||
|
|
||||||
|
# Regular expression matching correct method names. Overrides method-naming-
|
||||||
|
# style. If left empty, method names will be checked with the set naming style.
|
||||||
|
#method-rgx=
|
||||||
|
|
||||||
|
# Naming style matching correct module names.
|
||||||
|
module-naming-style=snake_case
|
||||||
|
|
||||||
|
# Regular expression matching correct module names. Overrides module-naming-
|
||||||
|
# style. If left empty, module names will be checked with the set naming style.
|
||||||
|
#module-rgx=
|
||||||
|
|
||||||
|
# Colon-delimited sets of names that determine each other's naming style when
|
||||||
|
# the name regexes allow several styles.
|
||||||
|
name-group=
|
||||||
|
|
||||||
|
# Regular expression which should only match function or class names that do
|
||||||
|
# not require a docstring.
|
||||||
|
no-docstring-rgx=^_
|
||||||
|
|
||||||
|
# List of decorators that produce properties, such as abc.abstractproperty. Add
|
||||||
|
# to this list to register other decorators that produce valid properties.
|
||||||
|
# These decorators are taken in consideration only for invalid-name.
|
||||||
|
property-classes=abc.abstractproperty
|
||||||
|
|
||||||
|
# Regular expression matching correct type alias names. If left empty, type
|
||||||
|
# alias names will be checked with the set naming style.
|
||||||
|
#typealias-rgx=
|
||||||
|
|
||||||
|
# Regular expression matching correct type variable names. If left empty, type
|
||||||
|
# variable names will be checked with the set naming style.
|
||||||
|
#typevar-rgx=
|
||||||
|
|
||||||
|
# Naming style matching correct variable names.
|
||||||
|
variable-naming-style=snake_case
|
||||||
|
|
||||||
|
# Regular expression matching correct variable names. Overrides variable-
|
||||||
|
# naming-style. If left empty, variable names will be checked with the set
|
||||||
|
# naming style.
|
||||||
|
#variable-rgx=
|
||||||
|
|
||||||
|
|
||||||
|
[CLASSES]
|
||||||
|
|
||||||
|
# Warn about protected attribute access inside special methods
|
||||||
|
check-protected-access-in-special-methods=no
|
||||||
|
|
||||||
|
# List of method names used to declare (i.e. assign) instance attributes.
|
||||||
|
defining-attr-methods=__init__,
|
||||||
|
__new__,
|
||||||
|
setUp,
|
||||||
|
asyncSetUp,
|
||||||
|
__post_init__
|
||||||
|
|
||||||
|
# List of member names, which should be excluded from the protected access
|
||||||
|
# warning.
|
||||||
|
exclude-protected=_asdict,_fields,_replace,_source,_make,os._exit
|
||||||
|
|
||||||
|
# List of valid names for the first argument in a class method.
|
||||||
|
valid-classmethod-first-arg=cls
|
||||||
|
|
||||||
|
# List of valid names for the first argument in a metaclass class method.
|
||||||
|
valid-metaclass-classmethod-first-arg=mcs
|
||||||
|
|
||||||
|
|
||||||
|
[DESIGN]
|
||||||
|
|
||||||
|
# List of regular expressions of class ancestor names to ignore when counting
|
||||||
|
# public methods (see R0903)
|
||||||
|
exclude-too-few-public-methods=
|
||||||
|
|
||||||
|
# List of qualified class names to ignore when counting class parents (see
|
||||||
|
# R0901)
|
||||||
|
ignored-parents=
|
||||||
|
|
||||||
|
# Maximum number of arguments for function / method.
|
||||||
|
max-args=5
|
||||||
|
|
||||||
|
# Maximum number of attributes for a class (see R0902).
|
||||||
|
max-attributes=7
|
||||||
|
|
||||||
|
# Maximum number of boolean expressions in an if statement (see R0916).
|
||||||
|
max-bool-expr=5
|
||||||
|
|
||||||
|
# Maximum number of branch for function / method body.
|
||||||
|
max-branches=12
|
||||||
|
|
||||||
|
# Maximum number of locals for function / method body.
|
||||||
|
max-locals=15
|
||||||
|
|
||||||
|
# Maximum number of parents for a class (see R0901).
|
||||||
|
max-parents=7
|
||||||
|
|
||||||
|
# Maximum number of positional arguments for function / method.
|
||||||
|
max-positional-arguments=5
|
||||||
|
|
||||||
|
# Maximum number of public methods for a class (see R0904).
|
||||||
|
max-public-methods=20
|
||||||
|
|
||||||
|
# Maximum number of return / yield for function / method body.
|
||||||
|
max-returns=6
|
||||||
|
|
||||||
|
# Maximum number of statements in function / method body.
|
||||||
|
max-statements=50
|
||||||
|
|
||||||
|
# Minimum number of public methods for a class (see R0903).
|
||||||
|
min-public-methods=2
|
||||||
|
|
||||||
|
|
||||||
|
[EXCEPTIONS]
|
||||||
|
|
||||||
|
# Exceptions that will emit a warning when caught.
|
||||||
|
overgeneral-exceptions=builtins.BaseException,builtins.Exception
|
||||||
|
|
||||||
|
|
||||||
|
[FORMAT]
|
||||||
|
|
||||||
|
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
|
||||||
|
expected-line-ending-format=
|
||||||
|
|
||||||
|
# Regexp for a line that is allowed to be longer than the limit.
|
||||||
|
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
|
||||||
|
|
||||||
|
# Number of spaces of indent required inside a hanging or continued line.
|
||||||
|
indent-after-paren=4
|
||||||
|
|
||||||
|
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
|
||||||
|
# tab).
|
||||||
|
indent-string=' '
|
||||||
|
|
||||||
|
# Maximum number of characters on a single line.
|
||||||
|
max-line-length=100
|
||||||
|
|
||||||
|
# Maximum number of lines in a module.
|
||||||
|
max-module-lines=1000
|
||||||
|
|
||||||
|
# Allow the body of a class to be on the same line as the declaration if body
|
||||||
|
# contains single statement.
|
||||||
|
single-line-class-stmt=no
|
||||||
|
|
||||||
|
# Allow the body of an if to be on the same line as the test if there is no
|
||||||
|
# else.
|
||||||
|
single-line-if-stmt=no
|
||||||
|
|
||||||
|
|
||||||
|
[IMPORTS]
|
||||||
|
|
||||||
|
# List of modules that can be imported at any level, not just the top level
|
||||||
|
# one.
|
||||||
|
allow-any-import-level=
|
||||||
|
|
||||||
|
# Allow explicit reexports by alias from a package __init__.
|
||||||
|
allow-reexport-from-package=no
|
||||||
|
|
||||||
|
# Allow wildcard imports from modules that define __all__.
|
||||||
|
allow-wildcard-with-all=no
|
||||||
|
|
||||||
|
# Deprecated modules which should not be used, separated by a comma.
|
||||||
|
deprecated-modules=
|
||||||
|
|
||||||
|
# Output a graph (.gv or any supported image format) of external dependencies
|
||||||
|
# to the given file (report RP0402 must not be disabled).
|
||||||
|
ext-import-graph=
|
||||||
|
|
||||||
|
# Output a graph (.gv or any supported image format) of all (i.e. internal and
|
||||||
|
# external) dependencies to the given file (report RP0402 must not be
|
||||||
|
# disabled).
|
||||||
|
import-graph=
|
||||||
|
|
||||||
|
# Output a graph (.gv or any supported image format) of internal dependencies
|
||||||
|
# to the given file (report RP0402 must not be disabled).
|
||||||
|
int-import-graph=
|
||||||
|
|
||||||
|
# Force import order to recognize a module as part of the standard
|
||||||
|
# compatibility libraries.
|
||||||
|
known-standard-library=
|
||||||
|
|
||||||
|
# Force import order to recognize a module as part of a third party library.
|
||||||
|
known-third-party=enchant
|
||||||
|
|
||||||
|
# Couples of modules and preferred modules, separated by a comma.
|
||||||
|
preferred-modules=
|
||||||
|
|
||||||
|
|
||||||
|
[LOGGING]
|
||||||
|
|
||||||
|
# The type of string formatting that logging methods do. `old` means using %
|
||||||
|
# formatting, `new` is for `{}` formatting.
|
||||||
|
logging-format-style=old
|
||||||
|
|
||||||
|
# Logging modules to check that the string format arguments are in logging
|
||||||
|
# function parameter format.
|
||||||
|
logging-modules=logging
|
||||||
|
|
||||||
|
|
||||||
|
[MESSAGES CONTROL]
|
||||||
|
|
||||||
|
# Only show warnings with the listed confidence levels. Leave empty to show
|
||||||
|
# all. Valid levels: HIGH, CONTROL_FLOW, INFERENCE, INFERENCE_FAILURE,
|
||||||
|
# UNDEFINED.
|
||||||
|
confidence=HIGH,
|
||||||
|
CONTROL_FLOW,
|
||||||
|
INFERENCE,
|
||||||
|
INFERENCE_FAILURE,
|
||||||
|
UNDEFINED
|
||||||
|
|
||||||
|
# Disable the message, report, category or checker with the given id(s). You
|
||||||
|
# can either give multiple identifiers separated by comma (,) or put this
|
||||||
|
# option multiple times (only on the command line, not in the configuration
|
||||||
|
# file where it should appear only once). You can also use "--disable=all" to
|
||||||
|
# disable everything first and then re-enable specific checks. For example, if
|
||||||
|
# you want to run only the similarities checker, you can use "--disable=all
|
||||||
|
# --enable=similarities". If you want to run only the classes checker, but have
|
||||||
|
# no Warning level messages displayed, use "--disable=all --enable=classes
|
||||||
|
# --disable=W".
|
||||||
|
disable=all
|
||||||
|
|
||||||
|
# Enable the message, report, category or checker with the given id(s). You can
|
||||||
|
# either give multiple identifier separated by comma (,) or put this option
|
||||||
|
# multiple time (only on the command line, not in the configuration file where
|
||||||
|
# it should appear only once). See also the "--disable" option for examples.
|
||||||
|
enable=syntax-error,
|
||||||
|
no-member,
|
||||||
|
method-hidden,
|
||||||
|
unreachable,
|
||||||
|
attribute-defined-outside-init,
|
||||||
|
no-name-in-module,
|
||||||
|
undefined-variable
|
||||||
|
|
||||||
|
|
||||||
|
[METHOD_ARGS]
|
||||||
|
|
||||||
|
# List of qualified names (i.e., library.method) which require a timeout
|
||||||
|
# parameter e.g. 'requests.api.get,requests.api.post'
|
||||||
|
timeout-methods=requests.api.delete,requests.api.get,requests.api.head,requests.api.options,requests.api.patch,requests.api.post,requests.api.put,requests.api.request
|
||||||
|
|
||||||
|
|
||||||
|
[MISCELLANEOUS]
|
||||||
|
|
||||||
|
# List of note tags to take in consideration, separated by a comma.
|
||||||
|
notes=FIXME,
|
||||||
|
XXX,
|
||||||
|
TODO
|
||||||
|
|
||||||
|
# Regular expression of note tags to take in consideration.
|
||||||
|
notes-rgx=
|
||||||
|
|
||||||
|
|
||||||
|
[REFACTORING]
|
||||||
|
|
||||||
|
# Maximum number of nested blocks for function / method body
|
||||||
|
max-nested-blocks=5
|
||||||
|
|
||||||
|
# Complete name of functions that never returns. When checking for
|
||||||
|
# inconsistent-return-statements if a never returning function is called then
|
||||||
|
# it will be considered as an explicit return statement and no message will be
|
||||||
|
# printed.
|
||||||
|
never-returning-functions=sys.exit,argparse.parse_error
|
||||||
|
|
||||||
|
# Let 'consider-using-join' be raised when the separator to join on would be
|
||||||
|
# non-empty (resulting in expected fixes of the type: ``"- " + " -
|
||||||
|
# ".join(items)``)
|
||||||
|
suggest-join-with-non-empty-separator=yes
|
||||||
|
|
||||||
|
|
||||||
|
[REPORTS]
|
||||||
|
|
||||||
|
# Python expression which should return a score less than or equal to 10. You
|
||||||
|
# have access to the variables 'fatal', 'error', 'warning', 'refactor',
|
||||||
|
# 'convention', and 'info' which contain the number of messages in each
|
||||||
|
# category, as well as 'statement' which is the total number of statements
|
||||||
|
# analyzed. This score is used by the global evaluation report (RP0004).
|
||||||
|
evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10))
|
||||||
|
|
||||||
|
# Template used to display messages. This is a python new-style format string
|
||||||
|
# used to format the message information. See doc for all details.
|
||||||
|
msg-template=
|
||||||
|
|
||||||
|
# Set the output format. Available formats are: text, parseable, colorized,
|
||||||
|
# json2 (improved json format), json (old json format) and msvs (visual
|
||||||
|
# studio). You can also give a reporter class, e.g.
|
||||||
|
# mypackage.mymodule.MyReporterClass.
|
||||||
|
#output-format=
|
||||||
|
|
||||||
|
# Tells whether to display a full report or only the messages.
|
||||||
|
reports=no
|
||||||
|
|
||||||
|
# Activate the evaluation score.
|
||||||
|
score=yes
|
||||||
|
|
||||||
|
|
||||||
|
[SIMILARITIES]
|
||||||
|
|
||||||
|
# Comments are removed from the similarity computation
|
||||||
|
ignore-comments=yes
|
||||||
|
|
||||||
|
# Docstrings are removed from the similarity computation
|
||||||
|
ignore-docstrings=yes
|
||||||
|
|
||||||
|
# Imports are removed from the similarity computation
|
||||||
|
ignore-imports=yes
|
||||||
|
|
||||||
|
# Signatures are removed from the similarity computation
|
||||||
|
ignore-signatures=yes
|
||||||
|
|
||||||
|
# Minimum lines number of a similarity.
|
||||||
|
min-similarity-lines=4
|
||||||
|
|
||||||
|
|
||||||
|
[SPELLING]
|
||||||
|
|
||||||
|
# Limits count of emitted suggestions for spelling mistakes.
|
||||||
|
max-spelling-suggestions=4
|
||||||
|
|
||||||
|
# Spelling dictionary name. No available dictionaries : You need to install
|
||||||
|
# both the python package and the system dependency for enchant to work.
|
||||||
|
spelling-dict=
|
||||||
|
|
||||||
|
# List of comma separated words that should be considered directives if they
|
||||||
|
# appear at the beginning of a comment and should not be checked.
|
||||||
|
spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:
|
||||||
|
|
||||||
|
# List of comma separated words that should not be checked.
|
||||||
|
spelling-ignore-words=
|
||||||
|
|
||||||
|
# A path to a file that contains the private dictionary; one word per line.
|
||||||
|
spelling-private-dict-file=
|
||||||
|
|
||||||
|
# Tells whether to store unknown words to the private dictionary (see the
|
||||||
|
# --spelling-private-dict-file option) instead of raising a message.
|
||||||
|
spelling-store-unknown-words=no
|
||||||
|
|
||||||
|
|
||||||
|
[STRING]
|
||||||
|
|
||||||
|
# This flag controls whether inconsistent-quotes generates a warning when the
|
||||||
|
# character used as a quote delimiter is used inconsistently within a module.
|
||||||
|
check-quote-consistency=no
|
||||||
|
|
||||||
|
# This flag controls whether the implicit-str-concat should generate a warning
|
||||||
|
# on implicit string concatenation in sequences defined over several lines.
|
||||||
|
check-str-concat-over-line-jumps=no
|
||||||
|
|
||||||
|
|
||||||
|
[TYPECHECK]
|
||||||
|
|
||||||
|
# List of decorators that produce context managers, such as
|
||||||
|
# contextlib.contextmanager. Add to this list to register other decorators that
|
||||||
|
# produce valid context managers.
|
||||||
|
contextmanager-decorators=contextlib.contextmanager
|
||||||
|
|
||||||
|
# List of members which are set dynamically and missed by pylint inference
|
||||||
|
# system, and so shouldn't trigger E1101 when accessed. Python regular
|
||||||
|
# expressions are accepted.
|
||||||
|
generated-members=
|
||||||
|
|
||||||
|
# Tells whether to warn about missing members when the owner of the attribute
|
||||||
|
# is inferred to be None.
|
||||||
|
ignore-none=yes
|
||||||
|
|
||||||
|
# This flag controls whether pylint should warn about no-member and similar
|
||||||
|
# checks whenever an opaque object is returned when inferring. The inference
|
||||||
|
# can return multiple potential results while evaluating a Python object, but
|
||||||
|
# some branches might not be evaluated, which results in partial inference. In
|
||||||
|
# that case, it might be useful to still emit no-member and other checks for
|
||||||
|
# the rest of the inferred objects.
|
||||||
|
ignore-on-opaque-inference=yes
|
||||||
|
|
||||||
|
# List of symbolic message names to ignore for Mixin members.
|
||||||
|
ignored-checks-for-mixins=no-member,
|
||||||
|
not-async-context-manager,
|
||||||
|
not-context-manager,
|
||||||
|
attribute-defined-outside-init
|
||||||
|
|
||||||
|
# List of class names for which member attributes should not be checked (useful
|
||||||
|
# for classes with dynamically set attributes). This supports the use of
|
||||||
|
# qualified names.
|
||||||
|
ignored-classes=optparse.Values,thread._local,_thread._local,argparse.Namespace
|
||||||
|
|
||||||
|
# Show a hint with possible names when a member name was not found. The aspect
|
||||||
|
# of finding the hint is based on edit distance.
|
||||||
|
missing-member-hint=yes
|
||||||
|
|
||||||
|
# The minimum edit distance a name should have in order to be considered a
|
||||||
|
# similar match for a missing member name.
|
||||||
|
missing-member-hint-distance=1
|
||||||
|
|
||||||
|
# The total number of similar names that should be taken in consideration when
|
||||||
|
# showing a hint for a missing member.
|
||||||
|
missing-member-max-choices=1
|
||||||
|
|
||||||
|
# Regex pattern to define which classes are considered mixins.
|
||||||
|
mixin-class-rgx=.*[Mm]ixin
|
||||||
|
|
||||||
|
# List of decorators that change the signature of a decorated function.
|
||||||
|
signature-mutators=
|
||||||
|
|
||||||
|
|
||||||
|
[VARIABLES]
|
||||||
|
|
||||||
|
# List of additional names supposed to be defined in builtins. Remember that
|
||||||
|
# you should avoid defining new builtins when possible.
|
||||||
|
additional-builtins=
|
||||||
|
|
||||||
|
# Tells whether unused global variables should be treated as a violation.
|
||||||
|
allow-global-unused-variables=yes
|
||||||
|
|
||||||
|
# List of names allowed to shadow builtins
|
||||||
|
allowed-redefined-builtins=
|
||||||
|
|
||||||
|
# List of strings which can identify a callback function by name. A callback
|
||||||
|
# name must start or end with one of those strings.
|
||||||
|
callbacks=cb_,
|
||||||
|
_cb
|
||||||
|
|
||||||
|
# A regular expression matching the name of dummy variables (i.e. expected to
|
||||||
|
# not be used).
|
||||||
|
dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
|
||||||
|
|
||||||
|
# Argument names that match this expression will be ignored.
|
||||||
|
ignored-argument-names=_.*|^ignored_|^unused_
|
||||||
|
|
||||||
|
# Tells whether we should check for unused import in __init__ files.
|
||||||
|
init-import=no
|
||||||
|
|
||||||
|
# List of qualified module names which can have objects that can redefine
|
||||||
|
# builtins.
|
||||||
|
redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
|
||||||
11
UniTAP/__init__.py
Normal file
11
UniTAP/__init__.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
from UniTAP.tsi_lib import *
|
||||||
|
from UniTAP.common import *
|
||||||
|
from UniTAP.version import __version__
|
||||||
|
from UniTAP import dev
|
||||||
|
from UniTAP import utils
|
||||||
|
|
||||||
|
#
|
||||||
|
# Logging configuration.
|
||||||
|
#
|
||||||
|
from UniTAP.utils import tsi_logging as logging
|
||||||
|
logging.set_enabled(False)
|
||||||
6
UniTAP/__main__.py
Normal file
6
UniTAP/__main__.py
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
from UniTAP import TsiLib
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
tsi = TsiLib()
|
||||||
|
|
||||||
|
# UniTAP.print_device_list()
|
||||||
9
UniTAP/common/__init__.py
Normal file
9
UniTAP/common/__init__.py
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
from .color_info import ColorInfo
|
||||||
|
from .data_info import DataInfo
|
||||||
|
from .timing import Timing
|
||||||
|
from .video_mode import VideoMode
|
||||||
|
from .video_frame import VideoFrame, ImageFileFormat, get_vf_from_image
|
||||||
|
from .audio_mode import AudioMode, AudioFileFormat, AudioFrameData, AudioFormat
|
||||||
|
from .timestamp import Timestamp
|
||||||
|
from .dsc_video_frame import VideoFrameDSC, CompressionInfo
|
||||||
|
from .dsc_compression_info import create_from_pps
|
||||||
271
UniTAP/common/audio_mode.py
Normal file
271
UniTAP/common/audio_mode.py
Normal file
@@ -0,0 +1,271 @@
|
|||||||
|
from enum import IntEnum
|
||||||
|
from UniTAP.common.timestamp import Timestamp
|
||||||
|
|
||||||
|
|
||||||
|
class AudioFileFormat(IntEnum):
|
||||||
|
"""
|
||||||
|
Describe all supported audio file formats for saving audio:
|
||||||
|
- BIN.
|
||||||
|
- WAV.
|
||||||
|
"""
|
||||||
|
UNKNOWN = -1
|
||||||
|
BIN = 0
|
||||||
|
WAV = 1
|
||||||
|
|
||||||
|
|
||||||
|
class AudioFormat(IntEnum):
|
||||||
|
"""
|
||||||
|
Describe all supported audio formats:
|
||||||
|
- PCMAudio.
|
||||||
|
"""
|
||||||
|
Unknown = -1
|
||||||
|
L_PCM = 0xFFFF
|
||||||
|
|
||||||
|
|
||||||
|
class AudioMode:
|
||||||
|
"""
|
||||||
|
Class `AudioMode` contains part information of audio: sample rate, count of bits and channel count.
|
||||||
|
"""
|
||||||
|
def __init__(self, sample_rate: int = 44100, bits: int = 16, channel_count: int = 2):
|
||||||
|
self.sample_rate = sample_rate
|
||||||
|
self.bits = bits
|
||||||
|
self.channel_count = channel_count
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return f"Sample rate: {self.sample_rate}\n" \
|
||||||
|
f"Bits: {self.bits}\n" \
|
||||||
|
f"Channel count: {self.channel_count}\n"
|
||||||
|
|
||||||
|
def __eq__(self, other):
|
||||||
|
return self.sample_rate == other.sample_rate and \
|
||||||
|
self.bits == other.bits and \
|
||||||
|
self.channel_count == other.channel_count
|
||||||
|
|
||||||
|
def is_valid(self) -> bool:
|
||||||
|
"""
|
||||||
|
|
||||||
|
Check that information is valid (all values more than 0).
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of bool type.
|
||||||
|
"""
|
||||||
|
return self.sample_rate > 0 and \
|
||||||
|
self.bits > 0 and \
|
||||||
|
self.channel_count > 0
|
||||||
|
|
||||||
|
|
||||||
|
class AudioFrameData:
|
||||||
|
"""
|
||||||
|
Class `AudioFrameData` describes captured frame from Sink (RX - receiver) side. Contains information of audio:
|
||||||
|
`AudioMode`, samples, `AudioFormat`, frame counter, `Timestamp`, audio data.
|
||||||
|
"""
|
||||||
|
def __init__(self, audio_mode: AudioMode = AudioMode(), samples: int = 0,
|
||||||
|
sample_format: AudioFormat = AudioFormat.Unknown, frame_counter: int = 0,
|
||||||
|
timestamp: Timestamp = Timestamp(0), data: bytearray = bytearray()):
|
||||||
|
self.__audio_mode = audio_mode
|
||||||
|
self.__samples = samples
|
||||||
|
self.__sample_format = sample_format
|
||||||
|
self.__frame_counter = frame_counter
|
||||||
|
self.__timestamp = timestamp
|
||||||
|
self.__data = data
|
||||||
|
|
||||||
|
@property
|
||||||
|
def channel_count(self) -> int:
|
||||||
|
"""
|
||||||
|
|
||||||
|
Returns channel count.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of int type.
|
||||||
|
"""
|
||||||
|
return self.__audio_mode.channel_count
|
||||||
|
|
||||||
|
@property
|
||||||
|
def samples(self) -> int:
|
||||||
|
"""
|
||||||
|
|
||||||
|
Returns samples.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of int type.
|
||||||
|
"""
|
||||||
|
return self.__samples
|
||||||
|
|
||||||
|
@property
|
||||||
|
def sample_size(self) -> int:
|
||||||
|
"""
|
||||||
|
|
||||||
|
Returns sample size.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of int type.
|
||||||
|
"""
|
||||||
|
return self.__audio_mode.bits
|
||||||
|
|
||||||
|
@property
|
||||||
|
def sample_rate(self) -> int:
|
||||||
|
"""
|
||||||
|
|
||||||
|
Returns sample rate.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of int type.
|
||||||
|
"""
|
||||||
|
return self.__audio_mode.sample_rate
|
||||||
|
|
||||||
|
@property
|
||||||
|
def sample_format(self) -> AudioFormat:
|
||||||
|
"""
|
||||||
|
|
||||||
|
Returns sample format.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of AudioFormat type.
|
||||||
|
"""
|
||||||
|
return self.__sample_format
|
||||||
|
|
||||||
|
@property
|
||||||
|
def frame_counter(self) -> int:
|
||||||
|
"""
|
||||||
|
|
||||||
|
Returns frame counter.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of int type.
|
||||||
|
"""
|
||||||
|
return self.__frame_counter
|
||||||
|
|
||||||
|
@property
|
||||||
|
def timestamp(self) -> Timestamp:
|
||||||
|
"""
|
||||||
|
|
||||||
|
Returns timestamp.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of Timestamp type.
|
||||||
|
"""
|
||||||
|
return self.__timestamp
|
||||||
|
|
||||||
|
@property
|
||||||
|
def data(self) -> bytearray:
|
||||||
|
"""
|
||||||
|
|
||||||
|
Returns data.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of bytearray type.
|
||||||
|
"""
|
||||||
|
return self.__data
|
||||||
|
|
||||||
|
@channel_count.setter
|
||||||
|
def channel_count(self, channel_count: int):
|
||||||
|
"""
|
||||||
|
|
||||||
|
Allows setting new value to channel count.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
channel_count (int) - must be more than 0
|
||||||
|
"""
|
||||||
|
if channel_count <= 0:
|
||||||
|
raise ValueError(f"Channel count must be more than 0.")
|
||||||
|
self.__audio_mode.channel_count = channel_count
|
||||||
|
|
||||||
|
@samples.setter
|
||||||
|
def samples(self, samples: int):
|
||||||
|
"""
|
||||||
|
|
||||||
|
Allows setting new value to samples.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
samples (int) - must be more than 0
|
||||||
|
"""
|
||||||
|
if samples <= 0:
|
||||||
|
raise ValueError(f"Samples must be more than 0.")
|
||||||
|
self.__samples = samples
|
||||||
|
|
||||||
|
@sample_size.setter
|
||||||
|
def sample_size(self, sample_size: int):
|
||||||
|
"""
|
||||||
|
|
||||||
|
Allows setting new value to sample size.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
sample_size (int) - must be more than 0
|
||||||
|
"""
|
||||||
|
if sample_size <= 0:
|
||||||
|
raise ValueError(f"Sample size must be more than 0.")
|
||||||
|
self.__audio_mode.bits = sample_size
|
||||||
|
|
||||||
|
@sample_rate.setter
|
||||||
|
def sample_rate(self, sample_rate: int):
|
||||||
|
"""
|
||||||
|
|
||||||
|
Allows setting new value to sample rate.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
sample_rate (int) - must be more than 0
|
||||||
|
"""
|
||||||
|
if sample_rate <= 0:
|
||||||
|
raise ValueError(f"Sample rate must be more than 0.")
|
||||||
|
self.__audio_mode.sample_rate = sample_rate
|
||||||
|
|
||||||
|
@sample_format.setter
|
||||||
|
def sample_format(self, sample_format: int):
|
||||||
|
"""
|
||||||
|
|
||||||
|
Allows setting new value to sample format.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
sample_format (int) - must be more than 0
|
||||||
|
"""
|
||||||
|
if sample_format <= 0:
|
||||||
|
raise ValueError(f"Sample format must be more than 0.")
|
||||||
|
self.__sample_format = AudioFormat(sample_format)
|
||||||
|
|
||||||
|
@timestamp.setter
|
||||||
|
def timestamp(self, timestamp: int):
|
||||||
|
"""
|
||||||
|
|
||||||
|
Allows setting new value to timestamp.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
timestamp (int) - must be more than 0
|
||||||
|
"""
|
||||||
|
if timestamp <= 0:
|
||||||
|
raise ValueError(f"Timestamp must be more than 0.")
|
||||||
|
self.__timestamp.value = timestamp
|
||||||
|
|
||||||
|
@frame_counter.setter
|
||||||
|
def frame_counter(self, frame_counter: int):
|
||||||
|
"""
|
||||||
|
|
||||||
|
Allows setting new value to frame counter.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
frame_counter (int) - must be more than -1
|
||||||
|
"""
|
||||||
|
if frame_counter < 0:
|
||||||
|
raise ValueError(f"Frame counter must be more than 0.")
|
||||||
|
self.__frame_counter = frame_counter
|
||||||
|
|
||||||
|
@data.setter
|
||||||
|
def data(self, value: bytearray):
|
||||||
|
"""
|
||||||
|
|
||||||
|
Allows setting new value to data.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
value (bytearray) - length of value must be more than 0
|
||||||
|
"""
|
||||||
|
if len(value) <= 0:
|
||||||
|
raise ValueError(f"Audio data length must be more than 0.")
|
||||||
|
self.__data = value
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return f"Sample rate: {self.sample_rate}\n" \
|
||||||
|
f"Bits (Sample size): {self.sample_size}\n" \
|
||||||
|
f"Channel count: {self.channel_count}\n" \
|
||||||
|
f"Sample format: {self.sample_format.name}\n" \
|
||||||
|
f"Timestamp: {self.timestamp.to_n_sec} n sec\n" \
|
||||||
|
f"Frame counter: {self.frame_counter}\n" \
|
||||||
|
f"Length of data: {self.data} bytes\n"
|
||||||
111
UniTAP/common/color_info.py
Normal file
111
UniTAP/common/color_info.py
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
from enum import IntEnum
|
||||||
|
|
||||||
|
|
||||||
|
class ColorInfo:
|
||||||
|
"""
|
||||||
|
|
||||||
|
Class contains information of frame `ColorFormat`, `DynamicRange`, `Colorimetry`.
|
||||||
|
|
||||||
|
"""
|
||||||
|
class ColorFormat(IntEnum):
|
||||||
|
"""
|
||||||
|
Contains values of possible color format.
|
||||||
|
"""
|
||||||
|
CF_NONE = 0
|
||||||
|
CF_UNKNOWN = 1
|
||||||
|
CF_RGB = 2
|
||||||
|
CF_YCbCr_422 = 3
|
||||||
|
CF_YCbCr_444 = 4
|
||||||
|
CF_YCbCr_420 = 5
|
||||||
|
CF_IDO_DEFINED = 6
|
||||||
|
CF_Y_ONLY = 7
|
||||||
|
CF_RAW = 8
|
||||||
|
CF_DSC = 9
|
||||||
|
|
||||||
|
class DynamicRange(IntEnum):
|
||||||
|
"""
|
||||||
|
Contains values of possible dynamic range.
|
||||||
|
"""
|
||||||
|
DR_UNKNOWN = -1
|
||||||
|
DR_VESA = 0
|
||||||
|
DR_CTA = 1
|
||||||
|
|
||||||
|
class Colorimetry(IntEnum):
|
||||||
|
"""
|
||||||
|
Contains values of possible colorimetry.
|
||||||
|
"""
|
||||||
|
CM_NONE = 0
|
||||||
|
CM_RESERVED = 1
|
||||||
|
CM_sRGB = 2
|
||||||
|
CM_SMPTE_170M = 3
|
||||||
|
CM_ITUR_BT601 = 4
|
||||||
|
CM_ITUR_BT709 = 5
|
||||||
|
CM_xvYCC601 = 6
|
||||||
|
CM_xvYCC709 = 7
|
||||||
|
CM_sYCC601 = 8
|
||||||
|
CM_AdobeYCC601 = 9
|
||||||
|
CM_AdobeRGB = 10
|
||||||
|
CM_ITUR_BT2020_YcCbcCrc = 11
|
||||||
|
CM_ITUR_BT2020_YCbCr = 12
|
||||||
|
CM_ITUR_BT2020_RGB = 13
|
||||||
|
CM_RGB_WIDE_GAMUT_FIX = 14
|
||||||
|
CM_RGB_WIDE_GAMUT_FLT = 15
|
||||||
|
CM_DCI_P3 = 16
|
||||||
|
CM_DICOM_1_4_GRAY_SCALE = 17
|
||||||
|
CM_CUSTOM_COLOR_PROFILE = 18
|
||||||
|
|
||||||
|
CM_opYCC601 = CM_AdobeYCC601
|
||||||
|
CM_opRGB = CM_AdobeRGB
|
||||||
|
|
||||||
|
__COMPONENT_MULTIPLIER = {
|
||||||
|
ColorFormat.CF_RGB: 3,
|
||||||
|
ColorFormat.CF_YCbCr_422: 2,
|
||||||
|
ColorFormat.CF_YCbCr_444: 3,
|
||||||
|
ColorFormat.CF_YCbCr_420: 3 / 2,
|
||||||
|
ColorFormat.CF_Y_ONLY: 1,
|
||||||
|
ColorFormat.CF_RAW: 3
|
||||||
|
}
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
self.colorimetry = self.Colorimetry.CM_NONE
|
||||||
|
self.color_format = self.ColorFormat.CF_NONE
|
||||||
|
self.dynamic_range = self.DynamicRange.DR_VESA
|
||||||
|
self.bpc = 0
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return f"Color format: {self.color_format.name}\n" \
|
||||||
|
f"Colorimetry: {self.colorimetry.name}\n" \
|
||||||
|
f"Dynamic Range: {self.dynamic_range.name}\n" \
|
||||||
|
f"BPC: {self.bpc}"
|
||||||
|
|
||||||
|
def __eq__(self, other):
|
||||||
|
return self.bpc == other.bpc and\
|
||||||
|
self.color_format == other.color_format and\
|
||||||
|
self.colorimetry == other.colorimetry and\
|
||||||
|
self.dynamic_range == other.dynamic_range
|
||||||
|
|
||||||
|
def is_valid(self) -> bool:
|
||||||
|
"""
|
||||||
|
|
||||||
|
Check that information is valid (not equal NONE state and bpc more than 0).
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of bool type.
|
||||||
|
"""
|
||||||
|
return self.bpc > 0 and\
|
||||||
|
self.color_format != self.ColorFormat.CF_NONE and\
|
||||||
|
self.colorimetry != self.Colorimetry.CM_NONE
|
||||||
|
|
||||||
|
@property
|
||||||
|
def bpp(self) -> int:
|
||||||
|
"""
|
||||||
|
|
||||||
|
Returns calculated bits per pixel for this color info (except DSC). 0 if color info is not valid.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of int type.
|
||||||
|
"""
|
||||||
|
if self.is_valid() and self.color_format != self.ColorFormat.CF_DSC:
|
||||||
|
return round(self.bpc * self.__COMPONENT_MULTIPLIER.get(self.color_format, 1))
|
||||||
|
else:
|
||||||
|
return 0
|
||||||
64
UniTAP/common/data_info.py
Normal file
64
UniTAP/common/data_info.py
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
from enum import IntEnum
|
||||||
|
|
||||||
|
|
||||||
|
class DataInfo:
|
||||||
|
"""
|
||||||
|
|
||||||
|
Class contains information of frame `Packing`, `ComponentOrder`, `Alignment`.
|
||||||
|
|
||||||
|
"""
|
||||||
|
class Packing(IntEnum):
|
||||||
|
"""
|
||||||
|
Contains values of possible packing.
|
||||||
|
"""
|
||||||
|
P_UNKNOWN = 0
|
||||||
|
P_PLANAR = 1
|
||||||
|
P_PACKED = 2
|
||||||
|
|
||||||
|
class ComponentOrder(IntEnum):
|
||||||
|
"""
|
||||||
|
Contains values of possible component order.
|
||||||
|
"""
|
||||||
|
CO_UNKNOWN = 0
|
||||||
|
CO_UCDRX = 1
|
||||||
|
CO_RGB = 2
|
||||||
|
CO_RGBA = 3
|
||||||
|
CO_BGR = 4
|
||||||
|
CO_BGRA = 5
|
||||||
|
CO_YCbCr = 6
|
||||||
|
CO_CbY0CrY1 = 7
|
||||||
|
|
||||||
|
class Alignment(IntEnum):
|
||||||
|
"""
|
||||||
|
Contains values of possible alignment.
|
||||||
|
"""
|
||||||
|
A_UNKNOWN = 0
|
||||||
|
A_MSB = 1
|
||||||
|
A_LSB = 2
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
self.packing = self.Packing.P_UNKNOWN
|
||||||
|
self.component_order = self.ComponentOrder.CO_UNKNOWN
|
||||||
|
self.alignment = self.Alignment.A_UNKNOWN
|
||||||
|
|
||||||
|
def is_valid(self) -> bool:
|
||||||
|
"""
|
||||||
|
|
||||||
|
Check that information is valid (not equal UNKNOWN state).
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of bool type.
|
||||||
|
"""
|
||||||
|
return self.packing != self.Packing.P_UNKNOWN and\
|
||||||
|
self.component_order != self.ComponentOrder.CO_UNKNOWN and\
|
||||||
|
self.alignment != self.Alignment.A_UNKNOWN
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return f"Packing: {self.packing.name}\n" \
|
||||||
|
f"Component Order: {self.component_order.name}\n" \
|
||||||
|
f"Alignment: {self.alignment.name}\n"
|
||||||
|
|
||||||
|
def __eq__(self, other):
|
||||||
|
return self.packing == other.packing and \
|
||||||
|
self.component_order == other.component_order and \
|
||||||
|
self.alignment == other.alignment
|
||||||
96
UniTAP/common/dsc_compression_info.py
Normal file
96
UniTAP/common/dsc_compression_info.py
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
from enum import IntEnum
|
||||||
|
|
||||||
|
|
||||||
|
class DscCompressionInfo:
|
||||||
|
"""
|
||||||
|
|
||||||
|
Class contains information about DSC compression used on frame.
|
||||||
|
|
||||||
|
"""
|
||||||
|
class DscColorFormat(IntEnum):
|
||||||
|
"""
|
||||||
|
Contains values of possible color format.
|
||||||
|
"""
|
||||||
|
CF_NONE = -1
|
||||||
|
CF_RGB = 0
|
||||||
|
CF_YCbCr_422 = 1
|
||||||
|
CF_YCbCr_444 = 2
|
||||||
|
CF_YCbCr_420 = 3
|
||||||
|
CF_Simple_422 = 4
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
self.color_format = DscCompressionInfo.DscColorFormat.CF_NONE
|
||||||
|
self.bpp = 0
|
||||||
|
self.is_block_prediction_enabled = False
|
||||||
|
self.h_slice_size = 0
|
||||||
|
self.v_slice_size = 0
|
||||||
|
self.buffer_bit_depth = 0
|
||||||
|
self.version = (0, 0)
|
||||||
|
self.is_simple_as_444 = False
|
||||||
|
|
||||||
|
def is_valid(self) -> bool:
|
||||||
|
"""
|
||||||
|
Return state of the video frame and check color_format, bpp, h and v slice_size and DSC version.
|
||||||
|
If everything ok, return True, otherwise - False.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of `bool` type.
|
||||||
|
"""
|
||||||
|
return self.color_format is not None and\
|
||||||
|
self.bpp > 0 and\
|
||||||
|
self.h_slice_size > 0 and\
|
||||||
|
self.v_slice_size > 0 and\
|
||||||
|
self.version in [(1, 2), (1, 1)]
|
||||||
|
|
||||||
|
|
||||||
|
def create_from_pps(pps_bytearray: bytearray) -> DscCompressionInfo:
|
||||||
|
"""
|
||||||
|
Fill structure 'DscCompressionInfo' from PPS header of the DSC image.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of `DscCompressionInfo` type.
|
||||||
|
"""
|
||||||
|
if b'DSCF' not in pps_bytearray:
|
||||||
|
if len(pps_bytearray) < 128:
|
||||||
|
raise ValueError("Incorrect PPS size!")
|
||||||
|
pps = pps_bytearray
|
||||||
|
else:
|
||||||
|
if len(pps_bytearray) < 132:
|
||||||
|
raise ValueError("Incorrect PPS size!")
|
||||||
|
pps = pps_bytearray[4:]
|
||||||
|
|
||||||
|
is_yuv = ((pps[4] >> 4) & 1) == 0
|
||||||
|
is_simple422 = ((pps[4] >> 3) & 1) == 1
|
||||||
|
is_native422 = (pps[88] & 1) == 1
|
||||||
|
is_native420 = ((pps[88] >> 1) & 1) == 1
|
||||||
|
width = (pps[8] << 8) | pps[9]
|
||||||
|
height = (pps[6] << 8) | pps[7]
|
||||||
|
slice_height = (pps[10] << 8) | pps[11]
|
||||||
|
slice_width = (pps[12] << 8) | pps[13]
|
||||||
|
|
||||||
|
info = DscCompressionInfo()
|
||||||
|
|
||||||
|
info.version = (pps[0] >> 4 & 0xf, pps[0] & 0xf)
|
||||||
|
info.buffer_bit_depth = pps[3] & 0xf
|
||||||
|
info.is_block_prediction_enabled = bool(pps[4] >> 5 & 0x1)
|
||||||
|
info.h_slice_size = int(width / slice_width)
|
||||||
|
info.v_slice_size = int(height / slice_height)
|
||||||
|
|
||||||
|
if is_native422 or is_native420:
|
||||||
|
info.bpp = int(pps[4] & 0x3 << 8 | pps[5]) / 2
|
||||||
|
else:
|
||||||
|
info.bpp = int(pps[4] & 0x3 << 8 | pps[5])
|
||||||
|
|
||||||
|
if is_yuv:
|
||||||
|
if is_simple422:
|
||||||
|
info.color_format = DscCompressionInfo.DscColorFormat.CF_Simple_422
|
||||||
|
elif is_native422:
|
||||||
|
info.color_format = DscCompressionInfo.DscColorFormat.CF_YCbCr_422
|
||||||
|
elif is_native420:
|
||||||
|
info.color_format = DscCompressionInfo.DscColorFormat.CF_YCbCr_420
|
||||||
|
else:
|
||||||
|
info.color_format = DscCompressionInfo.DscColorFormat.CF_YCbCr_444
|
||||||
|
else:
|
||||||
|
info.color_format = DscCompressionInfo.DscColorFormat.CF_RGB
|
||||||
|
|
||||||
|
return info
|
||||||
29
UniTAP/common/dsc_video_frame.py
Normal file
29
UniTAP/common/dsc_video_frame.py
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
from .dsc_compression_info import DscCompressionInfo as CompressionInfo
|
||||||
|
from .video_frame import VideoFrame
|
||||||
|
|
||||||
|
|
||||||
|
class VideoFrameDSC(VideoFrame):
|
||||||
|
|
||||||
|
"""
|
||||||
|
Class `VideoFrameDSC` contains base information about DSC compressed video frame:
|
||||||
|
- Height (int).
|
||||||
|
- Width (int).
|
||||||
|
- Data (bytearray).
|
||||||
|
- Color info (object of `ColorInfo`).
|
||||||
|
- Data info (object of `DataInfo`).
|
||||||
|
- Timestamp (object of `Timestamp`).
|
||||||
|
- CompressionInfo (object of `CompressionInfo`)
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
super().__init__()
|
||||||
|
self.compression_info = CompressionInfo()
|
||||||
|
|
||||||
|
def is_compressed(self) -> bool:
|
||||||
|
"""
|
||||||
|
Return state of the video frame, compressed it or not.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of `bool` type.
|
||||||
|
"""
|
||||||
|
return not self._compressed
|
||||||
64
UniTAP/common/timestamp.py
Normal file
64
UniTAP/common/timestamp.py
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
class Timestamp:
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
Class contains information about timestamp in several representation variant:
|
||||||
|
- Seconds `to_sec`.
|
||||||
|
- Milliseconds `to_m_sec`.
|
||||||
|
- Microseconds `to_u_sec`.
|
||||||
|
- Nanoseconds `to_n_sec` or `value`.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self, nano_secs: int):
|
||||||
|
self.__value = nano_secs
|
||||||
|
|
||||||
|
@property
|
||||||
|
def to_sec(self) -> float:
|
||||||
|
"""
|
||||||
|
Returns time in seconds.
|
||||||
|
"""
|
||||||
|
return self.__value / (10 ** 9)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def to_m_sec(self) -> float:
|
||||||
|
"""
|
||||||
|
Returns time milliseconds seconds.
|
||||||
|
"""
|
||||||
|
return self.__value / (10 ** 6)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def to_u_sec(self) -> float:
|
||||||
|
"""
|
||||||
|
Returns time microseconds seconds.
|
||||||
|
"""
|
||||||
|
return self.__value / (10 ** 3)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def to_n_sec(self) -> float:
|
||||||
|
"""
|
||||||
|
Returns time nanoseconds seconds.
|
||||||
|
"""
|
||||||
|
return self.__value
|
||||||
|
|
||||||
|
@property
|
||||||
|
def value(self) -> float:
|
||||||
|
"""
|
||||||
|
Returns time nanoseconds seconds.
|
||||||
|
"""
|
||||||
|
return self.__value
|
||||||
|
|
||||||
|
@value.setter
|
||||||
|
def value(self, value: int):
|
||||||
|
"""
|
||||||
|
Set time in nanoseconds seconds.
|
||||||
|
"""
|
||||||
|
if value <= 0:
|
||||||
|
raise ValueError(f"Value of timestamp cannot be less than 0.")
|
||||||
|
self.__value = value
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return f"{self.to_u_sec} milliseconds"
|
||||||
|
|
||||||
|
def __eq__(self, other):
|
||||||
|
return self.__value == other.__value
|
||||||
90
UniTAP/common/timing.py
Normal file
90
UniTAP/common/timing.py
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
from enum import IntEnum
|
||||||
|
|
||||||
|
|
||||||
|
class Timing:
|
||||||
|
|
||||||
|
"""
|
||||||
|
Class `Timing` contains information about Timing: all resolutions, timing id, frame rate, `AspectRatio`,
|
||||||
|
`Standard`, `ReduceBlanking`.
|
||||||
|
"""
|
||||||
|
|
||||||
|
class Standard(IntEnum):
|
||||||
|
"""
|
||||||
|
Class `Standard` contains all possible variants of timing standards.
|
||||||
|
"""
|
||||||
|
SD_NONE = 0
|
||||||
|
SD_CVT = 1
|
||||||
|
SD_DMT = 2
|
||||||
|
SD_CTA = 3
|
||||||
|
SD_UGF = 4
|
||||||
|
SD_OVT = 5
|
||||||
|
|
||||||
|
class AspectRatio(IntEnum):
|
||||||
|
"""
|
||||||
|
Class `AspectRatio` contains all possible variants of timing aspect ratio.
|
||||||
|
"""
|
||||||
|
AR_NONE = 0
|
||||||
|
AR_4_3 = 1
|
||||||
|
AR_16_9 = 2
|
||||||
|
|
||||||
|
class ReduceBlanking(IntEnum):
|
||||||
|
"""
|
||||||
|
Class `ReduceBlanking` contains all possible variants of timing reduce blanking.
|
||||||
|
"""
|
||||||
|
RB_NONE = 0
|
||||||
|
RB1 = 1
|
||||||
|
RB2 = 2
|
||||||
|
RB3 = 3
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
self.frame_rate = 0.0
|
||||||
|
self.hactive = 0
|
||||||
|
self.vactive = 0
|
||||||
|
self.htotal = 0
|
||||||
|
self.vtotal = 0
|
||||||
|
self.hstart = 0
|
||||||
|
self.vstart = 0
|
||||||
|
self.hswidth = 0
|
||||||
|
self.vswidth = 0
|
||||||
|
self.id = 0
|
||||||
|
self.aspect_ratio = self.AspectRatio.AR_NONE
|
||||||
|
self.standard = self.Standard.SD_NONE
|
||||||
|
self.reduce_blanking = self.ReduceBlanking.RB_NONE
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return f"{self.frame_rate / 1000:03} " \
|
||||||
|
f"{self.htotal} {self.hstart} {self.hactive} {self.hswidth:+} " \
|
||||||
|
f"{self.vtotal} {self.vstart} {self.vactive} {self.vswidth:+}"
|
||||||
|
|
||||||
|
def __eq__(self, other) -> bool:
|
||||||
|
return self.hactive == other.hactive and self.vactive == other.vactive and self.htotal == other.htotal and \
|
||||||
|
self.vtotal == other.vtotal and self.hstart == other.hstart and self.vstart == other.vstart and \
|
||||||
|
self.hswidth == other.hswidth and self.vswidth == other.vswidth
|
||||||
|
|
||||||
|
def is_valid(self) -> bool:
|
||||||
|
"""
|
||||||
|
Check that timing is correct (Resolutions and frame rate more than 0)
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
is valid (bool) - valid (True) or not (False)
|
||||||
|
"""
|
||||||
|
return self.hactive > 0 and \
|
||||||
|
self.vactive > 0 and \
|
||||||
|
self.htotal > 0 and \
|
||||||
|
self.vtotal > 0 and \
|
||||||
|
self.hstart > 0 and \
|
||||||
|
self.vstart > 0 and \
|
||||||
|
self.frame_rate > 0
|
||||||
|
|
||||||
|
@property
|
||||||
|
def pixel_clock(self) -> float:
|
||||||
|
"""
|
||||||
|
Returns calculated pixel clock required for this video mode in MHz. 0.0 if video mode is not valid.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
pixel clock (float)
|
||||||
|
"""
|
||||||
|
if self.is_valid():
|
||||||
|
return round(self.htotal * self.vtotal * self.frame_rate / 1000000000.0, 3)
|
||||||
|
else:
|
||||||
|
return 0.0
|
||||||
94
UniTAP/common/video_frame.py
Normal file
94
UniTAP/common/video_frame.py
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
from enum import IntEnum
|
||||||
|
from .color_info import ColorInfo
|
||||||
|
from .data_info import DataInfo
|
||||||
|
from .timestamp import Timestamp
|
||||||
|
from PIL import Image
|
||||||
|
|
||||||
|
|
||||||
|
class ImageFileFormat(IntEnum):
|
||||||
|
"""
|
||||||
|
Describe all supported image file formats for saving `VideoFrame`:
|
||||||
|
- BIN.
|
||||||
|
- PPM.
|
||||||
|
- BMP.
|
||||||
|
- DSC.
|
||||||
|
"""
|
||||||
|
IFF_BIN = 0
|
||||||
|
IFF_PPM = 1
|
||||||
|
IFF_BMP = 2
|
||||||
|
IFF_DSC = 3
|
||||||
|
|
||||||
|
|
||||||
|
class VideoFrame:
|
||||||
|
|
||||||
|
"""
|
||||||
|
Class `VideoFrame` contains base information about video frame:
|
||||||
|
- Height (int).
|
||||||
|
- Width (int).
|
||||||
|
- Data (bytearray).
|
||||||
|
- Color info (object of `ColorInfo`).
|
||||||
|
- Data info (object of `DataInfo`).
|
||||||
|
- Timestamp (object of `Timestamp`).
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
self.width = 0
|
||||||
|
self.height = 0
|
||||||
|
self.data = bytearray()
|
||||||
|
self.color_info = ColorInfo()
|
||||||
|
self.data_info = DataInfo()
|
||||||
|
self.timestamp = Timestamp(0)
|
||||||
|
self._compressed = False
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return f"Resolution: {self.width}x{self.height}\n" \
|
||||||
|
f"Data length: {len(self.data)}\n" \
|
||||||
|
f"Color Info:\n{self.color_info}\n" \
|
||||||
|
f"Data Info:\n{self.data_info}\n" \
|
||||||
|
f"Timestamp:\n{self.timestamp}\n"
|
||||||
|
|
||||||
|
def is_compressed(self) -> bool:
|
||||||
|
return self._compressed
|
||||||
|
|
||||||
|
|
||||||
|
def get_vf_from_image(path: str, width: int, height: int) -> VideoFrame:
|
||||||
|
"""
|
||||||
|
|
||||||
|
Function allows getting prepared object of `VideoFrame` from external (custom) image.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
path (str) - full path to image.
|
||||||
|
width (int) - width of image.
|
||||||
|
height (int) - height of image.
|
||||||
|
|
||||||
|
"""
|
||||||
|
if not os.path.exists(path):
|
||||||
|
raise FileNotFoundError(f"Image: {path} is missing!")
|
||||||
|
|
||||||
|
image = Image.open(path)
|
||||||
|
|
||||||
|
if width < image.size[0] and height < image.size[1]:
|
||||||
|
image = image.crop((0, 0, width, height))
|
||||||
|
|
||||||
|
size = image.size
|
||||||
|
|
||||||
|
if size == [0, 0]:
|
||||||
|
raise ValueError("Invalid image size.")
|
||||||
|
|
||||||
|
convert_image = image.convert('RGB').resize(size=(width, height), resample=Image.Resampling.LANCZOS)
|
||||||
|
|
||||||
|
video_frame = VideoFrame()
|
||||||
|
video_frame.data = bytearray(convert_image.tobytes())
|
||||||
|
video_frame.width = width
|
||||||
|
video_frame.height = height
|
||||||
|
video_frame.color_info.bpc = 8
|
||||||
|
video_frame.color_info.color_format = ColorInfo.ColorFormat.CF_RGB
|
||||||
|
video_frame.color_info.colorimetry = ColorInfo.Colorimetry.CM_sRGB
|
||||||
|
# video_frame.color_info.dynamic_range = ColorInfo.DynamicRange.DR_VESA
|
||||||
|
video_frame.data_info.packing = DataInfo.Packing.P_PACKED
|
||||||
|
video_frame.data_info.component_order = DataInfo.ComponentOrder.CO_RGB
|
||||||
|
video_frame.data_info.alignment = DataInfo.Alignment.A_LSB
|
||||||
|
|
||||||
|
return video_frame
|
||||||
52
UniTAP/common/video_mode.py
Normal file
52
UniTAP/common/video_mode.py
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
from .timing import Timing
|
||||||
|
from .color_info import ColorInfo
|
||||||
|
|
||||||
|
|
||||||
|
class VideoMode:
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
Class `VideoMode` combines information about `Timing` and `ColorInfo`.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self, timing: Timing = Timing(), color_info: ColorInfo = ColorInfo()):
|
||||||
|
self.timing = timing
|
||||||
|
self.color_info = color_info
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return f"{self.timing.frame_rate / 1000:03} " \
|
||||||
|
f"{self.timing.htotal} {self.timing.hstart} " \
|
||||||
|
f"{self.timing.hactive} {self.timing.hswidth:+} " \
|
||||||
|
f"{self.timing.vtotal} {self.timing.vstart} " \
|
||||||
|
f"{self.timing.vactive} {self.timing.vswidth:+} " \
|
||||||
|
f"{self.color_info.color_format.name}/" \
|
||||||
|
f"{self.color_info.colorimetry.name}/" \
|
||||||
|
f"{self.color_info.dynamic_range.name} {self.color_info.bpc}"
|
||||||
|
|
||||||
|
def __eq__(self, other):
|
||||||
|
return self.timing == other.timing and self.color_info == other.color_info
|
||||||
|
|
||||||
|
def is_valid(self) -> bool:
|
||||||
|
"""
|
||||||
|
|
||||||
|
Check that `Timing` and `ColorInfo` of Video mode is valid.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of bool type - Video mode valid or not
|
||||||
|
"""
|
||||||
|
return self.timing.is_valid() and self.color_info.is_valid()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def bit_rate(self) -> float:
|
||||||
|
"""
|
||||||
|
|
||||||
|
Returns calculated bit rate required for this video mode in Gbps. 0 if video mode is not valid
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of float type
|
||||||
|
"""
|
||||||
|
if self.is_valid():
|
||||||
|
return round(self.timing.pixel_clock * self.color_info.bpp / 1000.0, 3)
|
||||||
|
else:
|
||||||
|
return 0.0
|
||||||
2
UniTAP/dev/__init__.py
Normal file
2
UniTAP/dev/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
from .device import *
|
||||||
|
from .ports import *
|
||||||
459
UniTAP/dev/dev_3xx_roles.py
Normal file
459
UniTAP/dev/dev_3xx_roles.py
Normal file
@@ -0,0 +1,459 @@
|
|||||||
|
from .ports import DPRX, DPTX, HDRX, HDTX, PDC340
|
||||||
|
from .modules import MemoryManager, Capturer, DUTTests
|
||||||
|
from UniTAP.libs.lib_tsi.tsi_io import DeviceIO, PortProtocol
|
||||||
|
|
||||||
|
|
||||||
|
class UCD340:
|
||||||
|
"""
|
||||||
|
Class `UCD340` describes of device UCD-340. Device has several possible role:
|
||||||
|
- 'USB-C, DP Alt Mode Reference Sink' `USBCSink`
|
||||||
|
- 'USB-C, DP Alt Mode Reference Source' `USBCSource`.
|
||||||
|
"""
|
||||||
|
class USBCSink:
|
||||||
|
"""
|
||||||
|
Class `USBCSink` contains information of available functionality modules for role USB-C Sink (RX - receiver)
|
||||||
|
role:
|
||||||
|
- `DPRX`.
|
||||||
|
- `DUTTests`.
|
||||||
|
- `PDC`.
|
||||||
|
"""
|
||||||
|
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
|
||||||
|
self.__port_io = dev_io.create_port_io(0, PortProtocol.DisplayPortThrowUSBC)
|
||||||
|
self.__dprx = DPRX(self.__port_io, memory_manager, capturer)
|
||||||
|
self.__dut_tests = DUTTests(dev_io)
|
||||||
|
self.__pdcrx = PDC340(self.__port_io)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dprx(self) -> DPRX:
|
||||||
|
"""
|
||||||
|
Returns DP Sink (RX - receiver) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DPRX type.
|
||||||
|
"""
|
||||||
|
return self.__dprx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def pdcrx(self) -> PDC340:
|
||||||
|
"""
|
||||||
|
Returns PDC Sink (RX - receiver) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of `PDC340` type.
|
||||||
|
"""
|
||||||
|
return self.__pdcrx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dut_tests(self) -> DUTTests:
|
||||||
|
"""
|
||||||
|
Returns DUT Test module.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DUTTests type.
|
||||||
|
"""
|
||||||
|
return self.__dut_tests
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
"""
|
||||||
|
Returns name of role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of str type.
|
||||||
|
"""
|
||||||
|
return list(UCD340.ROLE_DICT.keys())[list(UCD340.ROLE_DICT.values()).index(type(self))]
|
||||||
|
|
||||||
|
class USBCSource:
|
||||||
|
"""
|
||||||
|
Class `USBCSource` contains information of available functionality modules for role USB-C Source
|
||||||
|
(TX - transmitter) role:
|
||||||
|
- `DPTX`.
|
||||||
|
- `DUTTests`.
|
||||||
|
- `PDC`.
|
||||||
|
"""
|
||||||
|
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
|
||||||
|
self.__port_io = dev_io.create_port_io(0, PortProtocol.DisplayPortThrowUSBC)
|
||||||
|
self.__dptx = DPTX(self.__port_io, memory_manager, capturer)
|
||||||
|
self.__dut_tests = DUTTests(dev_io)
|
||||||
|
self.__pdctx = PDC340(self.__port_io)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dptx(self) -> DPTX:
|
||||||
|
"""
|
||||||
|
Returns DP Source (TX - transmitter) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DPTX type.
|
||||||
|
"""
|
||||||
|
return self.__dptx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def pdctx(self) -> PDC340:
|
||||||
|
"""
|
||||||
|
Returns PDC Source (TX - transmitter) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of `PDC340` type.
|
||||||
|
"""
|
||||||
|
return self.__pdctx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dut_tests(self) -> DUTTests:
|
||||||
|
"""
|
||||||
|
Returns DUT Test module.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DUTTests type.
|
||||||
|
"""
|
||||||
|
return self.__dut_tests
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
"""
|
||||||
|
Returns name of role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of str type.
|
||||||
|
"""
|
||||||
|
return list(UCD340.ROLE_DICT.keys())[list(UCD340.ROLE_DICT.values()).index(type(self))]
|
||||||
|
|
||||||
|
ROLE_DICT = {
|
||||||
|
"USB-C, DP Alt Mode Reference Sink": USBCSink,
|
||||||
|
"USB-C, DP Alt Mode Reference Source": USBCSource
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class UCD240(UCD340):
|
||||||
|
"""
|
||||||
|
Class `UCD240` describes of device UCD-240 and have the same functionality as the class 'UCD340'.
|
||||||
|
Device has several possible role:
|
||||||
|
- 'USB-C, DP Alt Mode Reference Sink' `USBCSink`
|
||||||
|
- 'USB-C, DP Alt Mode Reference Source' `USBCSource`.
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
class UCD323:
|
||||||
|
"""
|
||||||
|
Class `UCD323` describes of device UCD-323. Device has several possible role:
|
||||||
|
- 'DisplayPort Reference Sink (SST, HDCP 2.3)' `DPSink`
|
||||||
|
- 'DisplayPort Reference Source (SST, HDCP 2.3)' `DPSource`
|
||||||
|
- 'HDMI Reference Sink (HDCP 2.3)' `HDMISink`
|
||||||
|
- 'HDMI Reference Source (HDCP 2.3)' `HDMISource`
|
||||||
|
"""
|
||||||
|
class DPSink:
|
||||||
|
"""
|
||||||
|
Class `DPSink` contains information of available functionality modules for role DP Sink (RX - receiver) role:
|
||||||
|
- `DPRX`.
|
||||||
|
- `DUTTests`.
|
||||||
|
"""
|
||||||
|
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
|
||||||
|
self.__dprx = DPRX(dev_io.create_port_io(0, PortProtocol.DisplayPort), memory_manager, capturer)
|
||||||
|
self.__dut_tests = DUTTests(dev_io)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dprx(self) -> DPRX:
|
||||||
|
"""
|
||||||
|
Returns DP Sink (RX - receiver) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DPRX type.
|
||||||
|
"""
|
||||||
|
return self.__dprx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dut_tests(self) -> DUTTests:
|
||||||
|
"""
|
||||||
|
Returns DUT Test module.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DUTTests type.
|
||||||
|
"""
|
||||||
|
return self.__dut_tests
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
"""
|
||||||
|
Returns name of role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of str type.
|
||||||
|
"""
|
||||||
|
return list(UCD323.ROLE_DICT.keys())[list(UCD323.ROLE_DICT.values()).index(type(self))]
|
||||||
|
|
||||||
|
class DPSource:
|
||||||
|
"""
|
||||||
|
Class `DPSink` contains information of available functionality modules for role DP Source (TX - transmitter)
|
||||||
|
role:
|
||||||
|
- `DPTX`.
|
||||||
|
- `DUTTests`.
|
||||||
|
"""
|
||||||
|
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
|
||||||
|
self.__dptx = DPTX(dev_io.create_port_io(0, PortProtocol.DisplayPort), memory_manager, capturer)
|
||||||
|
self.__dut_tests = DUTTests(dev_io)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dptx(self) -> DPTX:
|
||||||
|
"""
|
||||||
|
Returns DP Source (TX - transmitter) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DPTX type.
|
||||||
|
"""
|
||||||
|
return self.__dptx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dut_tests(self) -> DUTTests:
|
||||||
|
"""
|
||||||
|
Returns DUT Test module.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DUTTests type.
|
||||||
|
"""
|
||||||
|
return self.__dut_tests
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
"""
|
||||||
|
Returns name of role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of str type.
|
||||||
|
"""
|
||||||
|
return list(UCD323.ROLE_DICT.keys())[list(UCD323.ROLE_DICT.values()).index(type(self))]
|
||||||
|
|
||||||
|
class HDMISink:
|
||||||
|
"""
|
||||||
|
Class `HDMISink` contains information of available functionality modules for role HDMI Sink (RX - receiver)
|
||||||
|
role:
|
||||||
|
- `HDRX`.
|
||||||
|
- `DUTTests`.
|
||||||
|
"""
|
||||||
|
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
|
||||||
|
self.__hdrx = HDRX(dev_io.create_port_io(0, PortProtocol.HDMI), memory_manager, capturer)
|
||||||
|
self.__dut_tests = DUTTests(dev_io)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def hdrx(self) -> HDRX:
|
||||||
|
"""
|
||||||
|
Returns HDMI Sink (RX - receiver) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of HDRX type.
|
||||||
|
"""
|
||||||
|
return self.__hdrx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dut_tests(self) -> DUTTests:
|
||||||
|
"""
|
||||||
|
Returns DUT Test module.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DUTTests type.
|
||||||
|
"""
|
||||||
|
return self.__dut_tests
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
"""
|
||||||
|
Returns name of role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of str type.
|
||||||
|
"""
|
||||||
|
return list(UCD323.ROLE_DICT.keys())[list(UCD323.ROLE_DICT.values()).index(type(self))]
|
||||||
|
|
||||||
|
class HDMISource:
|
||||||
|
"""
|
||||||
|
Class `HDMISource` contains information of available functionality modules for role HDMI Source
|
||||||
|
(TX - transmitter) role:
|
||||||
|
- `HDTX`.
|
||||||
|
- `DUTTests`.
|
||||||
|
"""
|
||||||
|
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
|
||||||
|
self.__hdtx = HDTX(dev_io.create_port_io(0, PortProtocol.HDMI), memory_manager, capturer)
|
||||||
|
self.__dut_tests = DUTTests(dev_io)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def hdtx(self) -> HDTX:
|
||||||
|
"""
|
||||||
|
Returns HDMI Source (TX - transmitter) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of HDTX type.
|
||||||
|
"""
|
||||||
|
return self.__hdtx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dut_tests(self) -> DUTTests:
|
||||||
|
"""
|
||||||
|
Returns DUT Test module.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DUTTests type.
|
||||||
|
"""
|
||||||
|
return self.__dut_tests
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
"""
|
||||||
|
Returns name of role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of str type.
|
||||||
|
"""
|
||||||
|
return list(UCD323.ROLE_DICT.keys())[list(UCD323.ROLE_DICT.values()).index(type(self))]
|
||||||
|
|
||||||
|
ROLE_DICT = {
|
||||||
|
"DisplayPort Reference Sink (SST, HDCP 2.3)": DPSink,
|
||||||
|
"DisplayPort Reference Source (SST, HDCP 2.3)": DPSource,
|
||||||
|
"HDMI Reference Sink (HDCP 2.3)": HDMISink,
|
||||||
|
"HDMI Reference Source (HDCP 2.3)": HDMISource,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class UCD301:
|
||||||
|
"""
|
||||||
|
Class `UCD301` describes of device UCD-301. Device has several possible role:
|
||||||
|
- 'DisplayPort Reference Sink (SST, HDCP 2.3)' `DPSink`
|
||||||
|
- 'HDMI Reference Sink (HDCP 2.3)' `HDMISink`
|
||||||
|
"""
|
||||||
|
class DPSink:
|
||||||
|
"""
|
||||||
|
Class `DPSink` contains information of available functionality modules for role DP Sink (RX - receiver) role:
|
||||||
|
- `DPRX`.
|
||||||
|
- `DUTTests`.
|
||||||
|
"""
|
||||||
|
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
|
||||||
|
self.__dprx = DPRX(dev_io.create_port_io(0, PortProtocol.DisplayPort), memory_manager, capturer)
|
||||||
|
self.__dut_tests = DUTTests(dev_io)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dprx(self) -> DPRX:
|
||||||
|
"""
|
||||||
|
Returns DP Sink (RX - receiver) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DPRX type.
|
||||||
|
"""
|
||||||
|
return self.__dprx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dut_tests(self) -> DUTTests:
|
||||||
|
"""
|
||||||
|
Returns DUT Test module.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DUTTests type.
|
||||||
|
"""
|
||||||
|
return self.__dut_tests
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
"""
|
||||||
|
Returns name of role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of str type.
|
||||||
|
"""
|
||||||
|
return list(UCD301.ROLE_DICT.keys())[list(UCD301.ROLE_DICT.values()).index(type(self))]
|
||||||
|
|
||||||
|
class HDMISink:
|
||||||
|
"""
|
||||||
|
Class `HDMISink` contains information of available functionality modules for role HDMI Sink (RX - receiver)
|
||||||
|
role:
|
||||||
|
- `HDRX`.
|
||||||
|
- `DUTTests`.
|
||||||
|
"""
|
||||||
|
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
|
||||||
|
self.__hdrx = HDRX(dev_io.create_port_io(0, PortProtocol.HDMI), memory_manager, capturer)
|
||||||
|
self.__dut_tests = DUTTests(dev_io)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def hdrx(self) -> HDRX:
|
||||||
|
"""
|
||||||
|
Returns HDMI Sink (RX - receiver) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of HDRX type.
|
||||||
|
"""
|
||||||
|
return self.__hdrx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dut_tests(self) -> DUTTests:
|
||||||
|
"""
|
||||||
|
Returns DUT Test module.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DUTTests type.
|
||||||
|
"""
|
||||||
|
return self.__dut_tests
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
"""
|
||||||
|
Returns name of role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of str type.
|
||||||
|
"""
|
||||||
|
return list(UCD301.ROLE_DICT.keys())[list(UCD301.ROLE_DICT.values()).index(type(self))]
|
||||||
|
|
||||||
|
class DPSinkHDMISink:
|
||||||
|
"""
|
||||||
|
Class `DPSinkHDMISink` contains information of available functionality modules for role DP and HDMI Sink
|
||||||
|
(RX - receiver) role:
|
||||||
|
- `DPRX`.
|
||||||
|
- `HDRX`.
|
||||||
|
- `DUTTests`.
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
|
||||||
|
self.__dprx = DPRX(dev_io.create_port_io(0, PortProtocol.DisplayPort), memory_manager, capturer)
|
||||||
|
self.__hdrx = HDRX(dev_io.create_port_io(0, PortProtocol.HDMI), memory_manager, capturer)
|
||||||
|
self.__dut_tests = DUTTests(dev_io)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def hdrx(self) -> HDRX:
|
||||||
|
"""
|
||||||
|
Returns HDMI Sink (RX - receiver) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of HDRX type.
|
||||||
|
"""
|
||||||
|
return self.__hdrx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dprx(self) -> DPRX:
|
||||||
|
"""
|
||||||
|
Returns DP Sink (RX - receiver) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DPRX type.
|
||||||
|
"""
|
||||||
|
return self.__dprx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dut_tests(self) -> DUTTests:
|
||||||
|
"""
|
||||||
|
Returns DUT Test module.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DUTTests type.
|
||||||
|
"""
|
||||||
|
return self.__dut_tests
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
"""
|
||||||
|
Returns name of role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of str type.
|
||||||
|
"""
|
||||||
|
return list(UCD301.ROLE_DICT.keys())[list(UCD301.ROLE_DICT.values()).index(type(self))]
|
||||||
|
|
||||||
|
ROLE_DICT = {
|
||||||
|
"DisplayPort Reference Sink (SST, HDCP 2.3)": DPSink,
|
||||||
|
"HDMI, DisplayPort (SST), SPDIF Reference Sink": DPSinkHDMISink,
|
||||||
|
"HDMI Reference Sink (HDCP 2.3)": HDMISink,
|
||||||
|
}
|
||||||
220
UniTAP/dev/dev_4xx_roles.py
Normal file
220
UniTAP/dev/dev_4xx_roles.py
Normal file
@@ -0,0 +1,220 @@
|
|||||||
|
from UniTAP.dev.ports import DPRX4xx, DPTX4xx, HDRX4xx, HDTX4xx, PDC424
|
||||||
|
from .modules import MemoryManager, Capturer, DUTTests
|
||||||
|
from UniTAP.libs.lib_tsi.tsi_io import DeviceIO, PortProtocol
|
||||||
|
|
||||||
|
|
||||||
|
class UCD400:
|
||||||
|
"""
|
||||||
|
Class `UCD400` describes of device UCD-400. Device has one possible role:
|
||||||
|
- 'DisplayPort Source and Sink' `DPSourceDPSink`
|
||||||
|
"""
|
||||||
|
class DPSourceDPSink:
|
||||||
|
"""
|
||||||
|
Class `DPSourceDPSink` contains information of available functionality modules for role DP Sink
|
||||||
|
(RX - receiver) and DP Source (TX - transmitter) roles:
|
||||||
|
- `DPRX4xx`.
|
||||||
|
- `DPTX4xx`.
|
||||||
|
- `DUTTests`.
|
||||||
|
"""
|
||||||
|
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
|
||||||
|
super().__init__()
|
||||||
|
self.__dprx = DPRX4xx(dev_io.create_port_io(0, PortProtocol.DisplayPort), memory_manager, capturer)
|
||||||
|
self.__dptx = DPTX4xx(dev_io.create_port_io(1, PortProtocol.DisplayPort), memory_manager, capturer)
|
||||||
|
self.__dut_tests = DUTTests(dev_io)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dprx(self) -> DPRX4xx:
|
||||||
|
"""
|
||||||
|
Returns DP Sink (RX - receiver) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DPRX4xx type.
|
||||||
|
"""
|
||||||
|
return self.__dprx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dptx(self) -> DPTX4xx:
|
||||||
|
"""
|
||||||
|
Returns DP Source (TX - transmitter) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DPTX4xx type.
|
||||||
|
"""
|
||||||
|
return self.__dptx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dut_tests(self) -> DUTTests:
|
||||||
|
"""
|
||||||
|
Returns DUT Test module.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DUTTests type.
|
||||||
|
"""
|
||||||
|
return self.__dut_tests
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
"""
|
||||||
|
Returns name of role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of str type.
|
||||||
|
"""
|
||||||
|
return list(UCD400.ROLE_DICT.keys())[list(UCD400.ROLE_DICT.values()).index(type(self))]
|
||||||
|
|
||||||
|
ROLE_DICT = {
|
||||||
|
"DisplayPort Source and Sink": DPSourceDPSink
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class UCD422:
|
||||||
|
"""
|
||||||
|
Class `UCD422` describes of device UCD-422. Device has one possible role:
|
||||||
|
- 'HDMI Source and Sink' `HDMISourceHDMISink`
|
||||||
|
"""
|
||||||
|
class HDMISourceHDMISink:
|
||||||
|
"""
|
||||||
|
Class `DPSourceDPSink` contains information of available functionality modules for role HDMI Sink
|
||||||
|
(RX - receiver) and HDMI Source (TX - transmitter) roles:
|
||||||
|
- `HDRX4xx`.
|
||||||
|
- `HDTX4xx`.
|
||||||
|
- `DUTTests`.
|
||||||
|
"""
|
||||||
|
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
|
||||||
|
super().__init__()
|
||||||
|
self.__hdrx = HDRX4xx(dev_io.create_port_io(0, PortProtocol.HDMI), memory_manager, capturer)
|
||||||
|
self.__hdtx = HDTX4xx(dev_io.create_port_io(1, PortProtocol.HDMI), memory_manager, capturer)
|
||||||
|
self.__dut_tests = DUTTests(dev_io)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def hdtx(self) -> HDTX4xx:
|
||||||
|
"""
|
||||||
|
Returns HDMI Source (TX - transmitter) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of HDTX4xx type.
|
||||||
|
"""
|
||||||
|
return self.__hdtx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def hdrx(self) -> HDRX4xx:
|
||||||
|
"""
|
||||||
|
Returns HDMI Sink (RX - receiver) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of HDRX4xx type.
|
||||||
|
"""
|
||||||
|
return self.__hdrx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dut_tests(self) -> DUTTests:
|
||||||
|
"""
|
||||||
|
Returns DUT Test module.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DUTTests type.
|
||||||
|
"""
|
||||||
|
return self.__dut_tests
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
"""
|
||||||
|
Returns name of role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of str type.
|
||||||
|
"""
|
||||||
|
return list(UCD422.ROLE_DICT.keys())[list(UCD422.ROLE_DICT.values()).index(type(self))]
|
||||||
|
|
||||||
|
ROLE_DICT = {
|
||||||
|
"HDMI Source and Sink": HDMISourceHDMISink
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class UCD424:
|
||||||
|
"""
|
||||||
|
Class `UCD424` describes of device UCD-424. Device has one possible role:
|
||||||
|
- 'USB-C Source and Sink' `USBCSourceUSBCSink`.
|
||||||
|
"""
|
||||||
|
class USBCSourceUSBCSink:
|
||||||
|
"""
|
||||||
|
Class `DPSourceDPSink` contains information of available functionality modules for role HDMI Sink
|
||||||
|
(RX - receiver) and HDMI Source (TX - transmitter) roles:
|
||||||
|
- `DPRX4xx`.
|
||||||
|
- `DPTX4xx`.
|
||||||
|
- `DUTTests`.
|
||||||
|
- `PDC`.
|
||||||
|
"""
|
||||||
|
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
|
||||||
|
super().__init__()
|
||||||
|
self.__port_rx = dev_io.create_port_io(0, PortProtocol.DisplayPortThrowUSBC)
|
||||||
|
self.__port_tx = dev_io.create_port_io(1, PortProtocol.DisplayPortThrowUSBC)
|
||||||
|
self.__dprx = DPRX4xx(self.__port_rx, memory_manager, capturer)
|
||||||
|
self.__dptx = DPTX4xx(self.__port_tx, memory_manager, capturer)
|
||||||
|
self.__dut_tests = DUTTests(dev_io)
|
||||||
|
self.__pdcrx = PDC424(self.__port_rx)
|
||||||
|
self.__pdctx = PDC424(self.__port_tx)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dprx(self) -> DPRX4xx:
|
||||||
|
"""
|
||||||
|
Returns DP Sink (RX - receiver) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DPRX4xx type.
|
||||||
|
"""
|
||||||
|
return self.__dprx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dptx(self) -> DPTX4xx:
|
||||||
|
"""
|
||||||
|
Returns DP Source (TX - transmitter) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DPTX4xx type.
|
||||||
|
"""
|
||||||
|
return self.__dptx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def pdcrx(self) -> PDC424:
|
||||||
|
"""
|
||||||
|
Returns PDC Sink (RX - receiver) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of `PDC424` type.
|
||||||
|
"""
|
||||||
|
return self.__pdcrx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def pdctx(self) -> PDC424:
|
||||||
|
"""
|
||||||
|
Returns PDC source (TX - transmitter) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of `PDC424` type.
|
||||||
|
"""
|
||||||
|
return self.__pdctx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dut_tests(self) -> DUTTests:
|
||||||
|
"""
|
||||||
|
Returns DUT Test module.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DUTTests type.
|
||||||
|
"""
|
||||||
|
return self.__dut_tests
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
"""
|
||||||
|
Returns name of role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of str type.
|
||||||
|
"""
|
||||||
|
return list(UCD424.ROLE_DICT.keys())[list(UCD424.ROLE_DICT.values()).index(type(self))]
|
||||||
|
|
||||||
|
ROLE_DICT = {
|
||||||
|
"USB-C Source and Sink": USBCSourceUSBCSink
|
||||||
|
}
|
||||||
258
UniTAP/dev/dev_5xx_roles.py
Normal file
258
UniTAP/dev/dev_5xx_roles.py
Normal file
@@ -0,0 +1,258 @@
|
|||||||
|
from UniTAP.dev.ports import DPRX5xx, DPTX5xx, PDC500
|
||||||
|
from .modules import MemoryManager, Capturer, DUTTests
|
||||||
|
from UniTAP.libs.lib_tsi.tsi_io import DeviceIO, PortProtocol
|
||||||
|
|
||||||
|
|
||||||
|
class UCD500:
|
||||||
|
"""
|
||||||
|
Class `UCD500` describes of device UCD-500. Device has one possible role:
|
||||||
|
- 'DisplayPort Source and Sink' `DPSourceDPSink`.
|
||||||
|
- 'DisplayPort Source and USB-C, DP Alt Mode Sink' `DPSourceUSBCSink`.
|
||||||
|
- 'DisplayPort Sink and USB-C, DP Alt Mode Source' `USBCSourceDPSink`.
|
||||||
|
- 'USB-C, DP Alt Mode Source and Sink' `USBCSourceUSBCSink`.
|
||||||
|
"""
|
||||||
|
class DPSourceDPSink:
|
||||||
|
"""
|
||||||
|
Class `DPSourceDPSink` contains information of available functionality modules for role DP Sink
|
||||||
|
(RX - receiver) and DP Source (TX - transmitter) roles:
|
||||||
|
- `DPRX5xx`.
|
||||||
|
- `DPTX5xx`.
|
||||||
|
- `DUTTests`.
|
||||||
|
"""
|
||||||
|
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
|
||||||
|
self.__dprx = DPRX5xx(dev_io.create_port_io(0, PortProtocol.DisplayPort), memory_manager, capturer)
|
||||||
|
self.__dptx = DPTX5xx(dev_io.create_port_io(1, PortProtocol.DisplayPort), memory_manager, capturer)
|
||||||
|
self.__dut_tests = DUTTests(dev_io)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dprx(self) -> DPRX5xx:
|
||||||
|
"""
|
||||||
|
Returns DP Sink (RX - receiver) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DPRX5xx type.
|
||||||
|
"""
|
||||||
|
return self.__dprx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dptx(self) -> DPTX5xx:
|
||||||
|
"""
|
||||||
|
Returns DP Source (TX - transmitter) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DPTX5xx type.
|
||||||
|
"""
|
||||||
|
return self.__dptx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dut_tests(self) -> DUTTests:
|
||||||
|
"""
|
||||||
|
Returns DUT Test module.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DUTTests type.
|
||||||
|
"""
|
||||||
|
return self.__dut_tests
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
"""
|
||||||
|
Returns name of role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of str type.
|
||||||
|
"""
|
||||||
|
return list(UCD500.ROLE_DICT.keys())[list(UCD500.ROLE_DICT.values()).index(type(self))]
|
||||||
|
|
||||||
|
class DPSourceUSBCSink:
|
||||||
|
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
|
||||||
|
self.__port_rx = dev_io.create_port_io(0, PortProtocol.DisplayPortThrowUSBC)
|
||||||
|
self.__dptx = DPTX5xx(dev_io.create_port_io(1, PortProtocol.DisplayPort), memory_manager, capturer)
|
||||||
|
self.__dprx = DPRX5xx(self.__port_rx, memory_manager, capturer)
|
||||||
|
self.__pdcrx = PDC500(self.__port_rx)
|
||||||
|
self.__dut_tests = DUTTests(dev_io)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dprx(self) -> DPRX5xx:
|
||||||
|
"""
|
||||||
|
Returns DP Sink (RX - receiver) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DPRX5xx type.
|
||||||
|
"""
|
||||||
|
return self.__dprx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dptx(self) -> DPTX5xx:
|
||||||
|
"""
|
||||||
|
Returns DP Source (TX - transmitter) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DPTX5xx type.
|
||||||
|
"""
|
||||||
|
return self.__dptx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def pdcrx(self) -> PDC500:
|
||||||
|
"""
|
||||||
|
Returns PDC Sink (RX - receiver) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of `PDC500` type.
|
||||||
|
"""
|
||||||
|
return self.__pdcrx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dut_tests(self) -> DUTTests:
|
||||||
|
"""
|
||||||
|
Returns DUT Test module.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DUTTests type.
|
||||||
|
"""
|
||||||
|
return self.__dut_tests
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
"""
|
||||||
|
Returns name of role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of str type.
|
||||||
|
"""
|
||||||
|
return list(UCD500.ROLE_DICT.keys())[list(UCD500.ROLE_DICT.values()).index(type(self))]
|
||||||
|
|
||||||
|
class USBCSourceDPSink:
|
||||||
|
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
|
||||||
|
self.__port_tx = dev_io.create_port_io(1, PortProtocol.DisplayPortThrowUSBC)
|
||||||
|
self.__dptx = DPTX5xx(self.__port_tx, memory_manager, capturer)
|
||||||
|
self.__dprx = DPRX5xx(dev_io.create_port_io(0, PortProtocol.DisplayPort), memory_manager, capturer)
|
||||||
|
self.__pdctx = PDC500(self.__port_tx)
|
||||||
|
self.__dut_tests = DUTTests(dev_io)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dprx(self) -> DPRX5xx:
|
||||||
|
"""
|
||||||
|
Returns DP Sink (RX - receiver) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DPRX5xx type.
|
||||||
|
"""
|
||||||
|
return self.__dprx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dptx(self) -> DPTX5xx:
|
||||||
|
"""
|
||||||
|
Returns DP Source (TX - transmitter) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DPTX5xx type.
|
||||||
|
"""
|
||||||
|
return self.__dptx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def pdctx(self) -> PDC500:
|
||||||
|
"""
|
||||||
|
Returns PDC source (TX - transmitter) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of `PDC500` type.
|
||||||
|
"""
|
||||||
|
return self.__pdctx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dut_tests(self) -> DUTTests:
|
||||||
|
"""
|
||||||
|
Returns DUT Test module.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DUTTests type.
|
||||||
|
"""
|
||||||
|
return self.__dut_tests
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
"""
|
||||||
|
Returns name of role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of str type.
|
||||||
|
"""
|
||||||
|
return list(UCD500.ROLE_DICT.keys())[list(UCD500.ROLE_DICT.values()).index(type(self))]
|
||||||
|
|
||||||
|
class USBCSourceUSBCSink:
|
||||||
|
def __init__(self, dev_io: DeviceIO, memory_manager: MemoryManager, capturer: Capturer):
|
||||||
|
self.__port_rx = dev_io.create_port_io(0, PortProtocol.DisplayPortThrowUSBC)
|
||||||
|
self.__port_tx = dev_io.create_port_io(1, PortProtocol.DisplayPortThrowUSBC)
|
||||||
|
self.__dprx = DPRX5xx(self.__port_rx, memory_manager, capturer)
|
||||||
|
self.__dptx = DPTX5xx(self.__port_tx, memory_manager, capturer)
|
||||||
|
self.__pdcrx = PDC500(self.__port_rx)
|
||||||
|
self.__pdctx = PDC500(self.__port_tx)
|
||||||
|
self.__dut_tests = DUTTests(dev_io)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dprx(self) -> DPRX5xx:
|
||||||
|
"""
|
||||||
|
Returns DP Sink (RX - receiver) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DPRX5xx type.
|
||||||
|
"""
|
||||||
|
return self.__dprx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dptx(self) -> DPTX5xx:
|
||||||
|
"""
|
||||||
|
Returns DP Source (TX - transmitter) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DPTX5xx type.
|
||||||
|
"""
|
||||||
|
return self.__dptx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def pdcrx(self) -> PDC500:
|
||||||
|
"""
|
||||||
|
Returns PDC Sink (RX - receiver) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of `PDC500` type.
|
||||||
|
"""
|
||||||
|
return self.__pdcrx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def pdctx(self) -> PDC500:
|
||||||
|
"""
|
||||||
|
Returns PDC source (TX - transmitter) role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of `PDC500` type.
|
||||||
|
"""
|
||||||
|
return self.__pdctx
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dut_tests(self) -> DUTTests:
|
||||||
|
"""
|
||||||
|
Returns DUT Test module.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of DUTTests type.
|
||||||
|
"""
|
||||||
|
return self.__dut_tests
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
"""
|
||||||
|
Returns name of role.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of str type.
|
||||||
|
"""
|
||||||
|
return list(UCD500.ROLE_DICT.keys())[list(UCD500.ROLE_DICT.values()).index(type(self))]
|
||||||
|
|
||||||
|
ROLE_DICT = {
|
||||||
|
"DisplayPort Source and Sink": DPSourceDPSink,
|
||||||
|
"DisplayPort Source and USB-C, DP Alt Mode Sink": DPSourceUSBCSink,
|
||||||
|
"DisplayPort Sink and USB-C, DP Alt Mode Source": USBCSourceDPSink,
|
||||||
|
"USB-C, DP Alt Mode Source and Sink": USBCSourceUSBCSink
|
||||||
|
}
|
||||||
154
UniTAP/dev/device.py
Normal file
154
UniTAP/dev/device.py
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
import copy
|
||||||
|
import weakref
|
||||||
|
from typing import TypeVar, Type, List
|
||||||
|
|
||||||
|
from .dev_5xx_roles import UCD500
|
||||||
|
from .dev_4xx_roles import UCD400, UCD422, UCD424
|
||||||
|
from .dev_3xx_roles import UCD240, UCD340, UCD323, UCD301
|
||||||
|
from .modules import *
|
||||||
|
|
||||||
|
from UniTAP.libs.lib_tsi.tsi_io import DeviceIO
|
||||||
|
from UniTAP.utils import tsi_logging as logging
|
||||||
|
|
||||||
|
RoleType = TypeVar("RoleType",
|
||||||
|
UCD500.DPSourceUSBCSink,
|
||||||
|
UCD500.DPSourceDPSink,
|
||||||
|
UCD500.USBCSourceUSBCSink,
|
||||||
|
UCD500.USBCSourceDPSink,
|
||||||
|
|
||||||
|
UCD424.USBCSourceUSBCSink,
|
||||||
|
UCD422.HDMISourceHDMISink,
|
||||||
|
UCD400.DPSourceDPSink,
|
||||||
|
|
||||||
|
UCD340.USBCSink,
|
||||||
|
UCD340.USBCSource,
|
||||||
|
|
||||||
|
UCD323.DPSink,
|
||||||
|
UCD323.DPSource,
|
||||||
|
UCD323.HDMISink,
|
||||||
|
UCD323.HDMISource,
|
||||||
|
|
||||||
|
UCD301.DPSink,
|
||||||
|
UCD301.HDMISink,
|
||||||
|
|
||||||
|
UCD240.USBCSink,
|
||||||
|
UCD240.USBCSource)
|
||||||
|
|
||||||
|
MODEL_TO_CLASS = {
|
||||||
|
"UCD-500": UCD500,
|
||||||
|
"UCD-424": UCD424,
|
||||||
|
"UCD-422": UCD422,
|
||||||
|
"UCD-400": UCD400,
|
||||||
|
"UCD-340": UCD340,
|
||||||
|
"UCD-323": UCD323,
|
||||||
|
"UCD-301": UCD301,
|
||||||
|
"UCD-240": UCD240
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class NotExistingRoleSelected(Exception):
|
||||||
|
"""
|
||||||
|
Redefinition of base exception.
|
||||||
|
Define error of 'not existing role selected'.
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class DeviceRoleIsAlreadySelected(Exception):
|
||||||
|
"""
|
||||||
|
Redefinition of base exception.
|
||||||
|
Define error of 'device role already selected'.
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class TSIDevice:
|
||||||
|
"""
|
||||||
|
Class `TSIDevice` ... Allows:
|
||||||
|
- Select role of the device `select_role`.
|
||||||
|
- Get and redefine OPF (Operator feedback dialog) handler `opf_handler`.
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self, io: DeviceIO, name: str, serial_number: str, roles: List[RoleType]):
|
||||||
|
self.__io = io
|
||||||
|
self.__io_proxy = weakref.proxy(self.__io)
|
||||||
|
self.__memory_manager = MemoryManager(self.__io_proxy)
|
||||||
|
self.__capturer = Capturer(self.__io_proxy)
|
||||||
|
self.__opf_handler = OperatorFeedbackHandler(self.__io_proxy)
|
||||||
|
self.__terminal = Terminal(self.__io_proxy)
|
||||||
|
self.__name = name
|
||||||
|
self.__serial_number = serial_number
|
||||||
|
self.__role_list = roles
|
||||||
|
logging.info(f"[UniTAP] TSIDevice.init: {self}")
|
||||||
|
|
||||||
|
def __del__(self):
|
||||||
|
del self.__io
|
||||||
|
logging.info(f"[UniTAP] TSIDevice.del: {self}")
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return f"{self.__name} [{self.__serial_number}]"
|
||||||
|
|
||||||
|
def __define_internal_handler(self, role, role_type):
|
||||||
|
if role_type in [UCD500.DPSourceUSBCSink, UCD500.DPSourceDPSink, UCD500.USBCSourceUSBCSink,
|
||||||
|
UCD500.USBCSourceDPSink, UCD424.USBCSourceUSBCSink, UCD400.DPSourceDPSink]:
|
||||||
|
self.opf_handler._set_roles(role.dptx, role.dprx)
|
||||||
|
elif role_type in [UCD422.HDMISourceHDMISink]:
|
||||||
|
self.opf_handler._set_roles(role.hdtx, role.hdrx)
|
||||||
|
|
||||||
|
def select_role(self, role_type: Type[RoleType]) -> RoleType:
|
||||||
|
"""
|
||||||
|
Function allows selecting role of the chosen device.
|
||||||
|
For example: `UniTAP.dev.UCD500.DPSourceDPSink` - will be opened UCD-500 in role DisplayPort Source and Sink.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
role_type (RoleType) - one of the possible roles.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of `RoleType` type. Selected role.
|
||||||
|
"""
|
||||||
|
# TODO: Remove this limitation. Caused by TSI lib problem.
|
||||||
|
if self.__io.get_role() is not None:
|
||||||
|
raise DeviceRoleIsAlreadySelected(f"Device role is already selected.")
|
||||||
|
if role_type not in self.__role_list:
|
||||||
|
raise NotExistingRoleSelected(f"Role: {role_type} is not available on this device.")
|
||||||
|
self.__io.select_role(self.__role_list.index(role_type))
|
||||||
|
self.__io.set_role(role_type(self.__io_proxy,
|
||||||
|
weakref.proxy(self.__memory_manager),
|
||||||
|
weakref.proxy(self.__capturer)))
|
||||||
|
self.__define_internal_handler(self.__io.get_role(), role_type)
|
||||||
|
|
||||||
|
return self.__io.get_role()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def available_roles(self) -> list:
|
||||||
|
"""
|
||||||
|
Returns available list of roles.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of list type.
|
||||||
|
"""
|
||||||
|
return copy.deepcopy(self.__role_list)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def opf_handler(self):
|
||||||
|
"""
|
||||||
|
Returns current OPF handler.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of handler type.
|
||||||
|
"""
|
||||||
|
return self.__opf_handler.handler
|
||||||
|
|
||||||
|
@opf_handler.setter
|
||||||
|
def opf_handler(self, value):
|
||||||
|
"""
|
||||||
|
Set new OPF handler.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
value - new OPF handler
|
||||||
|
"""
|
||||||
|
self.__opf_handler.handler = value
|
||||||
|
|
||||||
|
@property
|
||||||
|
def _terminal(self) -> Terminal:
|
||||||
|
return self.__terminal
|
||||||
5
UniTAP/dev/modules/__init__.py
Normal file
5
UniTAP/dev/modules/__init__.py
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
from .memory_manager import MemoryManager
|
||||||
|
from .capturer import *
|
||||||
|
from .opf import *
|
||||||
|
from .dut_tests import *
|
||||||
|
from .terminal import *
|
||||||
2
UniTAP/dev/modules/capturer/__init__.py
Normal file
2
UniTAP/dev/modules/capturer/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
from .capture import Capturer, CaptureConfig, CaptureStatus, CaptureError, AudioCaptureStatus,\
|
||||||
|
EventCaptureStatus, VideoCaptureStatus
|
||||||
550
UniTAP/dev/modules/capturer/capture.py
Normal file
550
UniTAP/dev/modules/capturer/capture.py
Normal file
@@ -0,0 +1,550 @@
|
|||||||
|
import time
|
||||||
|
from typing import Union
|
||||||
|
|
||||||
|
from UniTAP.libs.lib_tsi.tsi_io import DeviceIO
|
||||||
|
from UniTAP.libs.lib_tsi.tsi import *
|
||||||
|
from UniTAP.dev.modules.capturer.statuses import CaptureStatus, AudioCaptureStatus, EventCaptureStatus, \
|
||||||
|
VideoCaptureStatus, BulkCaptureStatus
|
||||||
|
from UniTAP.common import AudioFrameData, VideoFrameDSC, create_from_pps
|
||||||
|
from UniTAP.dev.ports.modules.capturer.event.event_types import EventData
|
||||||
|
from threading import Lock
|
||||||
|
from UniTAP.utils import function_scheduler
|
||||||
|
from UniTAP.dev.ports.modules.capturer.bulk.private_bulk_types import *
|
||||||
|
from UniTAP.dev.ports.modules.capturer.bulk.bulk_types import *
|
||||||
|
from .types import *
|
||||||
|
|
||||||
|
|
||||||
|
TIMEOUT = 10
|
||||||
|
|
||||||
|
|
||||||
|
class CaptureConfig:
|
||||||
|
class Type(IntEnum):
|
||||||
|
NONE = -1
|
||||||
|
LIVE = 0
|
||||||
|
BUFFERED = 1
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
self.audio = False
|
||||||
|
self.video = False
|
||||||
|
self.event = False
|
||||||
|
self.type = CaptureConfig.Type.NONE
|
||||||
|
self.frame_count = 0
|
||||||
|
|
||||||
|
def from_int(self, value: int):
|
||||||
|
self.video = bool(value & 1 << 3)
|
||||||
|
self.audio = bool(value & 1 << 4)
|
||||||
|
self.event = bool(value & 1 << 5)
|
||||||
|
self.type = CaptureConfig.Type.LIVE if value & (1 << 2) else CaptureConfig.Type.BUFFERED
|
||||||
|
self.frame_count = value >> 8
|
||||||
|
|
||||||
|
def to_int(self) -> int:
|
||||||
|
value = 0
|
||||||
|
|
||||||
|
if self.video:
|
||||||
|
value |= (1 << 3)
|
||||||
|
|
||||||
|
if self.audio:
|
||||||
|
value |= (1 << 4)
|
||||||
|
|
||||||
|
if self.event:
|
||||||
|
value |= (1 << 5)
|
||||||
|
|
||||||
|
if self.video or self.audio:
|
||||||
|
if self.type == CaptureConfig.Type.LIVE:
|
||||||
|
value |= (1 << 2)
|
||||||
|
else:
|
||||||
|
value |= (self.frame_count << 8)
|
||||||
|
|
||||||
|
return value
|
||||||
|
|
||||||
|
|
||||||
|
class Capturer:
|
||||||
|
|
||||||
|
def __init__(self, port_io: DeviceIO):
|
||||||
|
self.__io = port_io
|
||||||
|
self.__config = CaptureConfig()
|
||||||
|
self.__status = CaptureStatus.Unknown
|
||||||
|
self.__mutex = Lock()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def config(self):
|
||||||
|
return self.__config
|
||||||
|
|
||||||
|
@property
|
||||||
|
def status(self):
|
||||||
|
return self.__status
|
||||||
|
|
||||||
|
@status.setter
|
||||||
|
def status(self, value: CaptureStatus):
|
||||||
|
self.__status = value
|
||||||
|
|
||||||
|
@property
|
||||||
|
def device(self):
|
||||||
|
return self.__io
|
||||||
|
|
||||||
|
@property
|
||||||
|
def video_capturer_status(self) -> VideoCaptureStatus:
|
||||||
|
return VideoCaptureStatus(self.__io.get(TSI_VIDCAP_CAPTURE_STATUS_R, c_int)[1])
|
||||||
|
|
||||||
|
@property
|
||||||
|
def audio_capturer_status(self) -> AudioCaptureStatus:
|
||||||
|
return AudioCaptureStatus(self.__io.get(TSI_R_AUDCAP_STATUS, c_int)[1])
|
||||||
|
|
||||||
|
@property
|
||||||
|
def event_capturer_status(self) -> EventCaptureStatus:
|
||||||
|
return EventCaptureStatus(self.__io.get(TSI_EVCAP_CTRL, c_uint32)[1] & 0xFF)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def bulk_capturer_status(self) -> BulkCaptureStatus:
|
||||||
|
return BulkCaptureStatus(self.__io.get(TSI_BULK_CAPTURE_STATUS_R, c_uint32)[1] & 0x3)
|
||||||
|
|
||||||
|
def start_capture(self, config: CaptureConfig):
|
||||||
|
self.__mutex.acquire()
|
||||||
|
|
||||||
|
self.__config.from_int(self.__current_config().to_int() | config.to_int())
|
||||||
|
self.__io.set(TSI_CAP_CONFIG, self.__config.to_int())
|
||||||
|
|
||||||
|
if self.__io.set(TSI_W_CAP_COMMAND, 1) == 0:
|
||||||
|
self.__status = CaptureStatus.Running
|
||||||
|
else:
|
||||||
|
self.__status = CaptureStatus.Unknown
|
||||||
|
|
||||||
|
self.__mutex.release()
|
||||||
|
|
||||||
|
def stop_capture(self, config: CaptureConfig):
|
||||||
|
self.__mutex.acquire()
|
||||||
|
|
||||||
|
self.__config.from_int(self.__current_config().to_int() & ~config.to_int())
|
||||||
|
self.__io.set(TSI_CAP_CONFIG, self.__config.to_int())
|
||||||
|
|
||||||
|
if self.__io.set(TSI_W_CAP_COMMAND, 2) == 0:
|
||||||
|
self.__status = CaptureStatus.Stop
|
||||||
|
else:
|
||||||
|
self.__status = CaptureStatus.Unknown
|
||||||
|
|
||||||
|
self.__mutex.release()
|
||||||
|
|
||||||
|
def __capture_events(self, event_count=0):
|
||||||
|
event = EventData()
|
||||||
|
|
||||||
|
if event_count > 0:
|
||||||
|
event_size = self.__io.get(TSI_R_EVCAP_DATA, None, 0)[0]
|
||||||
|
if event_size > 0:
|
||||||
|
event.data = bytearray(self.__io.get(TSI_R_EVCAP_DATA, c_ubyte, event_size)[1])
|
||||||
|
|
||||||
|
return event
|
||||||
|
|
||||||
|
def get_buffer_capacity(self, stream_number: int = None):
|
||||||
|
if stream_number is not None:
|
||||||
|
self.__io.set(TSI_DPRX_STREAM_SELECT, stream_number, c_uint32)
|
||||||
|
self.__io.set(TSI_DPRX_MSA_COMMAND_W, 2, c_uint32)
|
||||||
|
|
||||||
|
width = self.__io.get(TSI_R_INPUT_WIDTH , c_uint32)[1]
|
||||||
|
height = self.__io.get(TSI_R_INPUT_HEIGHT , c_uint32)[1]
|
||||||
|
total_memory_bytes = self.__io.get(TSI_MEMORY_SIZE_R, c_uint64)[1]
|
||||||
|
bpc = self.__io.get(TSI_INPUT_COLOR_DEPTH_R , c_uint32)[1]
|
||||||
|
color_format = self.__io.get(TSI_INPUT_COLOR_MODE_R , c_uint32)[1]
|
||||||
|
|
||||||
|
bpp = self._get_bits_per_pixel(bpc, color_format)
|
||||||
|
line_alignment = 1023
|
||||||
|
pixel_size = self._get_pixel_size(color_format, bpp)
|
||||||
|
line_size = width * pixel_size
|
||||||
|
line_pitch = self._align(line_size, line_alignment)
|
||||||
|
one_frame_size_bytes = (height + 1) * line_pitch
|
||||||
|
|
||||||
|
if one_frame_size_bytes == 0:
|
||||||
|
return 0
|
||||||
|
else:
|
||||||
|
return int(total_memory_bytes / one_frame_size_bytes)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def _get_bits_per_pixel(bpc, color_format) -> int:
|
||||||
|
if color_format in [0, 1, 6]:
|
||||||
|
return 0
|
||||||
|
elif color_format in [2, 4, 9]:
|
||||||
|
return 3 * bpc
|
||||||
|
elif color_format == 3:
|
||||||
|
return 2 * bpc
|
||||||
|
elif color_format == 5:
|
||||||
|
return 3 * bpc / 2
|
||||||
|
elif color_format == 7:
|
||||||
|
return bpc
|
||||||
|
elif color_format == 8:
|
||||||
|
return bpc
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def _get_pixel_size(color_format, bpp):
|
||||||
|
if color_format == 5:
|
||||||
|
return 4 if bpp >= 18 else 2
|
||||||
|
elif color_format in [7, 8]:
|
||||||
|
return 6 if bpp > 10 else 4
|
||||||
|
else:
|
||||||
|
return 6 if bpp > 32 else 4
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def _align(value, alignment):
|
||||||
|
return (value + alignment) & ~alignment
|
||||||
|
|
||||||
|
def get_available_events_count(self) -> int:
|
||||||
|
return self.__io.get(TSI_R_EVCAP_COUNT, c_uint32)[1]
|
||||||
|
|
||||||
|
def capture_n_events(self, events_count: int):
|
||||||
|
if events_count <= 0:
|
||||||
|
raise ValueError(f"Events count must be more than 0.")
|
||||||
|
|
||||||
|
buffer = []
|
||||||
|
|
||||||
|
def is_enough_events():
|
||||||
|
return self.get_available_events_count() >= events_count
|
||||||
|
|
||||||
|
function_scheduler(is_enough_events, interval=1, timeout=TIMEOUT)
|
||||||
|
|
||||||
|
for i in range(events_count):
|
||||||
|
buffer.append(self.__capture_events(self.get_available_events_count()))
|
||||||
|
|
||||||
|
return buffer
|
||||||
|
|
||||||
|
def read_all_events(self):
|
||||||
|
buffer = []
|
||||||
|
while self.get_available_events_count() > 0:
|
||||||
|
buffer.append(self.__capture_events(self.get_available_events_count()))
|
||||||
|
|
||||||
|
return buffer
|
||||||
|
|
||||||
|
def __capture_audio(self, m_sec=1000):
|
||||||
|
|
||||||
|
audio_frame = AudioFrameData()
|
||||||
|
|
||||||
|
audio_frame.channel_count = self.__io.get(TSI_R_AUDCAP_CHANNEL_COUNT, c_int)[1]
|
||||||
|
audio_frame.sample_size = self.__io.get(TSI_R_AUDCAP_SAMPLE_SIZE, c_int)[1] * 8
|
||||||
|
audio_frame.sample_rate = self.__io.get(TSI_R_AUDCAP_SAMPLE_RATE, c_int)[1]
|
||||||
|
audio_frame.timestamp = self.__io.get(TSI_R_AUDCAP_TIMESTAMP, c_uint64)[1]
|
||||||
|
audio_frame.samples = self.__io.get(TSI_R_AUDCAP_SAMPLE_COUNT, c_int)[1]
|
||||||
|
audio_frame.frame_counter = self.__io.get(TSI_R_AUDCAP_FRAME_COUNTER, c_int)[1]
|
||||||
|
audio_frame.sample_format = self.__io.get(TSI_R_AUDCAP_SAMPLE_FORMAT, c_int)[1]
|
||||||
|
|
||||||
|
min_buff_size = self.__io.get(TSI_R_AUDCAP_MIN_BUFFER_SIZE, c_uint32)[1]
|
||||||
|
audio_frame.data = self.__io.get(TSI_R_AUDCAP_SAMPLE_DATA, c_uint8, min_buff_size)[1]
|
||||||
|
|
||||||
|
m_sec -= 1000 * len(audio_frame.data) / 2 / audio_frame.channel_count / audio_frame.sample_rate
|
||||||
|
|
||||||
|
return audio_frame, m_sec
|
||||||
|
|
||||||
|
def capture_audio_by_n_frames(self, frames_count: int, timeout: int = None):
|
||||||
|
if frames_count <= 0:
|
||||||
|
raise ValueError(f"Frames count must be more than 0.")
|
||||||
|
|
||||||
|
buffer = []
|
||||||
|
time_break = False
|
||||||
|
|
||||||
|
timeout = timeout if timeout is not None else TIMEOUT
|
||||||
|
|
||||||
|
while not time_break and len(buffer) < frames_count:
|
||||||
|
captured = 0
|
||||||
|
start_time = time.time()
|
||||||
|
while captured < 10:
|
||||||
|
status = self.audio_capturer_status
|
||||||
|
current_time = time.time()
|
||||||
|
if current_time - start_time > timeout:
|
||||||
|
time_break = True
|
||||||
|
break
|
||||||
|
if status == AudioCaptureStatus.Stop:
|
||||||
|
continue
|
||||||
|
|
||||||
|
audio_frame, m_sec = self.__capture_audio()
|
||||||
|
if len(audio_frame.data) > 0:
|
||||||
|
captured += 1
|
||||||
|
buffer.append(audio_frame)
|
||||||
|
|
||||||
|
return buffer
|
||||||
|
|
||||||
|
def capture_audio_by_m_sec(self, m_sec: int):
|
||||||
|
if m_sec <= 0:
|
||||||
|
raise ValueError(f"Seconds count must be more than 0.")
|
||||||
|
|
||||||
|
buffer = []
|
||||||
|
time_break = False
|
||||||
|
|
||||||
|
while m_sec > 0 and not time_break:
|
||||||
|
captured = 0
|
||||||
|
start_time = time.time()
|
||||||
|
while captured < 10 and m_sec > 0:
|
||||||
|
status = self.audio_capturer_status
|
||||||
|
current_time = time.time()
|
||||||
|
if current_time - start_time > TIMEOUT:
|
||||||
|
time_break = True
|
||||||
|
break
|
||||||
|
if status == AudioCaptureStatus.Stop:
|
||||||
|
continue
|
||||||
|
|
||||||
|
audio_frame, m_sec = self.__capture_audio(m_sec=m_sec)
|
||||||
|
if len(audio_frame.data) > 0:
|
||||||
|
captured += 1
|
||||||
|
buffer.append(audio_frame)
|
||||||
|
|
||||||
|
return buffer
|
||||||
|
|
||||||
|
def get_available_video_frame_count(self):
|
||||||
|
return self.__io.get(TSI_VIDCAP_AVAILABLE_FRAME_COUNT, c_int)[1]
|
||||||
|
|
||||||
|
def __check_available_video(self, timeout) -> bool:
|
||||||
|
def is_video_available(capturer):
|
||||||
|
return capturer.video_capturer_status == VideoCaptureStatus.LiveModeActive
|
||||||
|
|
||||||
|
return function_scheduler(is_video_available, self, interval=1, timeout=timeout)
|
||||||
|
|
||||||
|
def __check_available_buffered_video(self, timeout) -> bool:
|
||||||
|
def is_video_available(capturer):
|
||||||
|
return capturer.video_capturer_status == VideoCaptureStatus.Transferring
|
||||||
|
|
||||||
|
return function_scheduler(is_video_available, self, interval=1, timeout=timeout)
|
||||||
|
|
||||||
|
def __check_available_bulk_data(self, timeout) -> bool:
|
||||||
|
def is_bulk_available(capturer):
|
||||||
|
return capturer.bulk_capturer_status == BulkCaptureStatus.Transferring
|
||||||
|
|
||||||
|
return function_scheduler(is_bulk_available, self, interval=1, timeout=timeout)
|
||||||
|
|
||||||
|
def __capture_video(self, timeout=TIMEOUT,
|
||||||
|
capture_type=CaptureConfig.Type.LIVE) -> Union[VideoFrame, VideoFrameDSC]:
|
||||||
|
if timeout <= 0:
|
||||||
|
raise ValueError(f"Timeout must be more than 0.")
|
||||||
|
|
||||||
|
if capture_type == CaptureConfig.Type.BUFFERED:
|
||||||
|
if not self.__check_available_buffered_video(timeout):
|
||||||
|
raise BufferedCaptureError(
|
||||||
|
f"Cannot get frames from buffer. "
|
||||||
|
f"Current buffered capture status is {self.video_capturer_status.name}"
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
if not self.__check_available_video(timeout):
|
||||||
|
raise CaptureError(
|
||||||
|
f"Cannot start to capture video. Current video capture status {self.video_capturer_status.name}")
|
||||||
|
|
||||||
|
try:
|
||||||
|
result = self.__io.set(TSI_VIDCAP_CAPTURE_NEXT_W, 0)
|
||||||
|
if result == TSI_ERROR_DATA_PROTECTION_ENABLED:
|
||||||
|
raise CaptureError("Video data is HDCP protected. Capturing is not available.")
|
||||||
|
except AssertionError as e:
|
||||||
|
raise CaptureError(f"Error: {e}")
|
||||||
|
|
||||||
|
try:
|
||||||
|
min_buffer_size = self.__io.get(TSI_R_VIDCAP_MIN_BUFFER_SIZE, c_int)[1]
|
||||||
|
if min_buffer_size <= 0:
|
||||||
|
raise ValueError("Minimum buffer size must be more than 0")
|
||||||
|
except AssertionError as e:
|
||||||
|
raise CaptureError(f"Error: {e}")
|
||||||
|
|
||||||
|
try:
|
||||||
|
frame_data = bytearray(self.__io.get(TSI_R_VIDCAP_FRAME_DATA, c_uint8, min_buffer_size)[1])
|
||||||
|
if len(frame_data) <= 0:
|
||||||
|
raise ValueError("Minimum length of captured data must be more than 0")
|
||||||
|
except AssertionError as e:
|
||||||
|
raise CaptureError(f"Error: {e}")
|
||||||
|
|
||||||
|
frame_attributes = self.__io.get(TSI_VIDCAP_FRAME_HEADER_R, VideoFrameHeader)[1]
|
||||||
|
|
||||||
|
if frame_attributes.is_dsc() and len(frame_data) > 128:
|
||||||
|
vf = VideoFrameDSC()
|
||||||
|
vf.compression_info = create_from_pps(frame_data[:128])
|
||||||
|
else:
|
||||||
|
vf = VideoFrame()
|
||||||
|
|
||||||
|
vf.width = frame_attributes.width
|
||||||
|
vf.height = frame_attributes.height
|
||||||
|
vf.color_info.bpc = frame_attributes.bpc
|
||||||
|
vf.color_info.dynamic_range = frame_attributes.dynamic_range
|
||||||
|
vf.color_info.color_format = frame_attributes.color_format
|
||||||
|
vf.color_info.colorimetry = frame_attributes.colorimetry
|
||||||
|
vf.data_info.component_order = DataInfo.ComponentOrder.CO_UCDRX
|
||||||
|
vf.data_info.alignment = DataInfo.Alignment.A_MSB
|
||||||
|
vf.data_info.packing = DataInfo.Packing.P_PACKED
|
||||||
|
vf.timestamp = frame_attributes.timestamp
|
||||||
|
vf.data = frame_data
|
||||||
|
|
||||||
|
return vf
|
||||||
|
|
||||||
|
def capture_video_by_n_frames(self, frames_count: int, capture_type: CaptureConfig.Type = CaptureConfig.Type.LIVE):
|
||||||
|
if frames_count <= 0:
|
||||||
|
raise ValueError(f"Frames count must be more than 0.")
|
||||||
|
|
||||||
|
buffer = []
|
||||||
|
|
||||||
|
if capture_type == CaptureConfig.Type.BUFFERED:
|
||||||
|
timeout = max(10, round(0.006 * frames_count))
|
||||||
|
try:
|
||||||
|
for i in range(frames_count):
|
||||||
|
buffer.append(self.__capture_video(timeout=timeout, capture_type=capture_type))
|
||||||
|
except BufferedCaptureError as e:
|
||||||
|
return buffer
|
||||||
|
else:
|
||||||
|
for i in range(frames_count):
|
||||||
|
buffer.append(self.__capture_video())
|
||||||
|
|
||||||
|
return buffer
|
||||||
|
|
||||||
|
def capture_video_by_n_sec(self, sec: int):
|
||||||
|
if sec <= 0:
|
||||||
|
raise ValueError(f"Seconds count must be more than 0.")
|
||||||
|
|
||||||
|
buffer = []
|
||||||
|
|
||||||
|
time_start = time.time()
|
||||||
|
while time.time() - time_start < sec:
|
||||||
|
buffer.append(self.__capture_video())
|
||||||
|
|
||||||
|
return buffer
|
||||||
|
|
||||||
|
def set_video_stream_number(self, number: int):
|
||||||
|
self.__mutex.acquire()
|
||||||
|
self.__io.set(TSI_DPRX_STREAM_SELECT, number, c_uint32)
|
||||||
|
self.__mutex.release()
|
||||||
|
|
||||||
|
def __current_config(self) -> CaptureConfig:
|
||||||
|
config = CaptureConfig()
|
||||||
|
config.from_int(self.__io.get(TSI_CAP_CONFIG, c_uint)[1])
|
||||||
|
return config
|
||||||
|
|
||||||
|
# Capture CRC
|
||||||
|
def capture_crc(self, crc_frame_count: int = 1) -> List[tuple[int, int, int]]:
|
||||||
|
if crc_frame_count <= 0:
|
||||||
|
raise ValueError(f"Incorrect crc frame count: {crc_frame_count}")
|
||||||
|
|
||||||
|
crc_values = self.__io.get(TSI_VIDCAP_SIGNAL_CRC_R, CrcStruct, crc_frame_count)[1]
|
||||||
|
crc_list = []
|
||||||
|
if crc_frame_count == 1:
|
||||||
|
crc_list = [(crc_values.r, crc_values.g, crc_values.b)]
|
||||||
|
else:
|
||||||
|
[crc_list.append((crc.r, crc.g, crc.b)) for crc in crc_values]
|
||||||
|
return crc_list
|
||||||
|
|
||||||
|
# Bulk Capturer
|
||||||
|
def read_bulk_capture_caps(self) -> CaptureCaps:
|
||||||
|
return self.__io.get(TSI_BULK_CAPTURE_CAPS_R, CaptureCaps)[1]
|
||||||
|
|
||||||
|
def read_bulk_trigger_caps(self) -> int:
|
||||||
|
return self.__io.get(TSI_BULK_TRIGGER_CAPS_R, c_uint32)[1]
|
||||||
|
|
||||||
|
def write_bulk_trigger_settings(self, trigger_mask: int, trigger_config: list, trigger_config_ext: list):
|
||||||
|
self.__io.set(TSI_BULK_TRIGGER_MASK_W, trigger_mask, c_uint32)
|
||||||
|
self.__io.set(TSI_BULK_TRIGGER_CONFIGURATION_W, trigger_config, c_uint32, data_count=len(trigger_config))
|
||||||
|
self.__io.set(TSI_BULK_TRIGGER_CONFIGURATION_EXT_W, trigger_config_ext, c_uint32,
|
||||||
|
data_count=len(trigger_config_ext))
|
||||||
|
|
||||||
|
def write_bulk_size(self, size: int):
|
||||||
|
data = SBlock()
|
||||||
|
data.BLOCK = 0
|
||||||
|
data.OFFSET = 0
|
||||||
|
data.SIZE = size
|
||||||
|
self.__io.set(TSI_BULK_CAPTURE_BLOCK, data, SBlock)
|
||||||
|
|
||||||
|
def write_encoding_type(self, value: EncodingTypeEnum):
|
||||||
|
self.__io.set(TSI_BULK_CAPTURE_TYPE, value.value, c_uint32)
|
||||||
|
|
||||||
|
def read_encoding_type(self) -> EncodingTypeEnum:
|
||||||
|
return EncodingTypeEnum(self.__io.get(TSI_BULK_CAPTURE_TYPE, c_uint32)[1])
|
||||||
|
|
||||||
|
def write_lane_count(self, value: LaneCountEnum):
|
||||||
|
self.__io.set(TSI_BULK_CAPTURE_LANE_COUNT, value.value, c_uint32)
|
||||||
|
|
||||||
|
def read_lane_count(self) -> LaneCountEnum:
|
||||||
|
return LaneCountEnum(self.__io.get(TSI_BULK_CAPTURE_LANE_COUNT, c_uint32)[1])
|
||||||
|
|
||||||
|
def write_bulk_gpio(self, gpio: bool):
|
||||||
|
self.__io.set(TSI_BULK_CAPTURE_GPIO_W, TSI_BULK_CAPTURE_GPIO_5BIT if gpio else TSI_BULK_CAPTURE_GPIO_OFF,
|
||||||
|
c_uint32)
|
||||||
|
|
||||||
|
def write_bulk_trigger_position(self, position: int):
|
||||||
|
self.__io.set(TSI_BULK_TRIGGER_POS, position)
|
||||||
|
|
||||||
|
def start_bulk_capture(self):
|
||||||
|
|
||||||
|
self.__mutex.acquire()
|
||||||
|
|
||||||
|
self.__io.set(TSI_EVCAP_CTRL, 1)
|
||||||
|
self.__io.set(TSI_BULK_CAPTURE_CONTROL_W, TSI_BULK_CAPTURE_START)
|
||||||
|
|
||||||
|
self.__mutex.release()
|
||||||
|
|
||||||
|
def stop_bulk_capture(self):
|
||||||
|
self.__mutex.acquire()
|
||||||
|
|
||||||
|
self.__io.set(TSI_EVCAP_CTRL, 0)
|
||||||
|
self.__io.set(TSI_BULK_CAPTURE_CONTROL_W, TSI_BULK_CAPTURE_STOP)
|
||||||
|
|
||||||
|
self.__mutex.release()
|
||||||
|
|
||||||
|
def start_event_capture(self):
|
||||||
|
self.__mutex.acquire()
|
||||||
|
|
||||||
|
self.__io.set(TSI_EVCAP_CTRL, 1)
|
||||||
|
self.__io.set(TSI_EVCAP_EVENT_SRC_EN, UCD_ALL_EVENTS)
|
||||||
|
|
||||||
|
self.__mutex.release()
|
||||||
|
|
||||||
|
def stop_event_capture(self):
|
||||||
|
self.__mutex.acquire()
|
||||||
|
|
||||||
|
self.__io.set(TSI_EVCAP_CTRL, 0)
|
||||||
|
|
||||||
|
self.__mutex.release()
|
||||||
|
|
||||||
|
def clear_bulk_buffer(self):
|
||||||
|
max_time_waiting = 5
|
||||||
|
value = -1
|
||||||
|
time_waited = time.time()
|
||||||
|
|
||||||
|
while value != TSI_BULK_STATUS_IDLE and time.time() - time_waited < max_time_waiting:
|
||||||
|
self.__io.set(TSI_BULK_CAPTURE_CLEAR_W, 0)
|
||||||
|
value = self.__io.get(TSI_BULK_CAPTURE_STATUS_R)[1]
|
||||||
|
|
||||||
|
def bulk_capture(self, all_size: int, trigger_enabled: Optional[TriggerVarType]) -> list:
|
||||||
|
buffer = []
|
||||||
|
iterations = int(all_size / (1024 * 1024))
|
||||||
|
prev_status = 0
|
||||||
|
last_bulk_capture_time = time.time()
|
||||||
|
for i in range(iterations):
|
||||||
|
event_count = self.__io.get(TSI_EVCAP_COUNT_R, c_uint32)[1]
|
||||||
|
if event_count > 0:
|
||||||
|
event_number = 0
|
||||||
|
prev_timestamp = 0
|
||||||
|
events_captured = 0
|
||||||
|
while event_count > 0 and events_captured < 500:
|
||||||
|
event_size = self.__io.get(TSI_R_EVCAP_DATA, None, 0)[0]
|
||||||
|
if event_size > 0:
|
||||||
|
cap_data = CapturedData()
|
||||||
|
cap_data.data = bytearray(self.__io.get(TSI_R_EVCAP_DATA, c_ubyte, event_size)[1])
|
||||||
|
cap_data.data = cap_data.data[3:]
|
||||||
|
cap_data.type = CapturedDataType.Event
|
||||||
|
cap_data.timestamp = int.from_bytes(bytes=cap_data.data[:8], byteorder='big')
|
||||||
|
if cap_data.timestamp == prev_timestamp:
|
||||||
|
event_number += 1
|
||||||
|
else:
|
||||||
|
event_number = 0
|
||||||
|
buffer.append(cap_data)
|
||||||
|
prev_timestamp = cap_data.timestamp
|
||||||
|
events_captured += 1
|
||||||
|
event_count -= 1
|
||||||
|
|
||||||
|
bulk_status = self.__io.get(TSI_BULK_CAPTURE_STATUS_R, c_int32)[1]
|
||||||
|
if bulk_status == TSI_BULK_STATUS_IDLE and prev_status == TSI_BULK_STATUS_TRANSFERRING:
|
||||||
|
return buffer
|
||||||
|
prev_status = bulk_status
|
||||||
|
|
||||||
|
now = time.time()
|
||||||
|
if trigger_enabled is not None and now - last_bulk_capture_time >= TIMEOUT:
|
||||||
|
return buffer
|
||||||
|
|
||||||
|
if not self.__check_available_bulk_data(TIMEOUT):
|
||||||
|
return buffer
|
||||||
|
|
||||||
|
self.__io.set(TSI_EVCAP_CTRL, 0)
|
||||||
|
cap_data = CapturedData()
|
||||||
|
cap_data.type = CapturedDataType.Bulk
|
||||||
|
result, data, _ = self.__io.get(TSI_BULK_CAPTURE_DATA_R, c_ubyte, 1024 * 1024)
|
||||||
|
cap_data.data = bytearray(data)
|
||||||
|
if result >= TSI_SUCCESS and len(cap_data.data) > 0:
|
||||||
|
buffer.append(cap_data)
|
||||||
|
last_bulk_capture_time = time.time()
|
||||||
|
|
||||||
|
return buffer
|
||||||
108
UniTAP/dev/modules/capturer/result_object.py
Normal file
108
UniTAP/dev/modules/capturer/result_object.py
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
from UniTAP.common.timestamp import Timestamp
|
||||||
|
|
||||||
|
|
||||||
|
class ResultObject:
|
||||||
|
"""
|
||||||
|
The base class of all capture results.
|
||||||
|
Contains information about `start_capture_time`, `end_capture_time`, `timestamp` and `buffer` with captured data.
|
||||||
|
"""
|
||||||
|
def __init__(self):
|
||||||
|
self.__start_capture_time = 0
|
||||||
|
self.__end_capture_time = 0
|
||||||
|
self.__timestamp = Timestamp(0)
|
||||||
|
self.__buffer = []
|
||||||
|
|
||||||
|
@property
|
||||||
|
def start_capture_time(self) -> int:
|
||||||
|
"""
|
||||||
|
Return start capture time.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of `int` type
|
||||||
|
"""
|
||||||
|
return self.__start_capture_time
|
||||||
|
|
||||||
|
@property
|
||||||
|
def end_capture_time(self) -> int:
|
||||||
|
"""
|
||||||
|
Return end capture time.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of `int` type
|
||||||
|
"""
|
||||||
|
return self.__end_capture_time
|
||||||
|
|
||||||
|
@property
|
||||||
|
def timestamp(self) -> Timestamp:
|
||||||
|
"""
|
||||||
|
Return timestamp.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of `Timestamp` type
|
||||||
|
"""
|
||||||
|
return self.__timestamp
|
||||||
|
|
||||||
|
@property
|
||||||
|
def buffer(self) -> list:
|
||||||
|
"""
|
||||||
|
Return buffer with captured data.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
object of list type
|
||||||
|
"""
|
||||||
|
return self.__buffer
|
||||||
|
|
||||||
|
@buffer.setter
|
||||||
|
def buffer(self, value):
|
||||||
|
"""
|
||||||
|
Set data to buffer
|
||||||
|
|
||||||
|
Args:
|
||||||
|
value - any type of object
|
||||||
|
"""
|
||||||
|
self.__buffer.append(value)
|
||||||
|
|
||||||
|
@start_capture_time.setter
|
||||||
|
def start_capture_time(self, start_capture_time: int):
|
||||||
|
"""
|
||||||
|
Set start capture time.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
start_capture_time (int) - must be more than 0.
|
||||||
|
"""
|
||||||
|
if start_capture_time <= 0:
|
||||||
|
raise ValueError(f"Start capture time cannot be less than 0.")
|
||||||
|
self.__start_capture_time = start_capture_time
|
||||||
|
|
||||||
|
@end_capture_time.setter
|
||||||
|
def end_capture_time(self, end_capture_time: int):
|
||||||
|
"""
|
||||||
|
Set end capture time.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
end_capture_time (int) - must be more than 0.
|
||||||
|
"""
|
||||||
|
if end_capture_time <= 0:
|
||||||
|
raise ValueError(f"End capture time cannot be less than 0.")
|
||||||
|
self.__end_capture_time = end_capture_time
|
||||||
|
|
||||||
|
@timestamp.setter
|
||||||
|
def timestamp(self, timestamp: int):
|
||||||
|
"""
|
||||||
|
Set timestamp.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
timestamp (int) - must be more than 0.
|
||||||
|
"""
|
||||||
|
if timestamp <= 0:
|
||||||
|
raise ValueError(f"Timestamp cannot be less than 0.")
|
||||||
|
self.__timestamp.value = timestamp
|
||||||
|
|
||||||
|
def clear(self):
|
||||||
|
"""
|
||||||
|
Clear all data.
|
||||||
|
"""
|
||||||
|
self.__start_capture_time = 0
|
||||||
|
self.__end_capture_time = 0
|
||||||
|
self.__timestamp = Timestamp(0)
|
||||||
|
self.__buffer = []
|
||||||
100
UniTAP/dev/modules/capturer/statuses.py
Normal file
100
UniTAP/dev/modules/capturer/statuses.py
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
from enum import IntEnum
|
||||||
|
|
||||||
|
|
||||||
|
class CaptureStatus(IntEnum):
|
||||||
|
Unknown = -1
|
||||||
|
Stop = 0
|
||||||
|
Running = 1
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
if self.value == CaptureStatus.Unknown:
|
||||||
|
return f"Capture status: {self.value}"
|
||||||
|
elif self.value == CaptureStatus.Stop:
|
||||||
|
return f"Capture status: is not working"
|
||||||
|
elif self.value == CaptureStatus.Running:
|
||||||
|
return f"Capture status: working"
|
||||||
|
else:
|
||||||
|
return f"Capture status: Unknown state"
|
||||||
|
|
||||||
|
|
||||||
|
class BulkCaptureStatus(IntEnum):
|
||||||
|
Unknown = -1
|
||||||
|
Idle = 0
|
||||||
|
Waiting = 1
|
||||||
|
Capturing = 2
|
||||||
|
Transferring = 3
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
if self.value == BulkCaptureStatus.Unknown:
|
||||||
|
return f"Bulk capture status: {self.value}"
|
||||||
|
elif self.value == BulkCaptureStatus.Idle:
|
||||||
|
return f"Bulk capture status: Doing nothing"
|
||||||
|
elif self.value == BulkCaptureStatus.Waiting:
|
||||||
|
return f"Bulk capture status: Waiting"
|
||||||
|
elif self.value == BulkCaptureStatus.Capturing:
|
||||||
|
return f"Bulk capture status: Capturing in progress"
|
||||||
|
elif self.value == BulkCaptureStatus.Transferring:
|
||||||
|
return f"Bulk capture status: Transferring"
|
||||||
|
else:
|
||||||
|
return f"Bulk capture status: Unknown state"
|
||||||
|
|
||||||
|
|
||||||
|
class AudioCaptureStatus(IntEnum):
|
||||||
|
Unknown = -1
|
||||||
|
Stop = 0
|
||||||
|
Running = 1
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
if self.value == AudioCaptureStatus.Unknown:
|
||||||
|
return f"Audio capture status: {self.value}"
|
||||||
|
elif self.value == AudioCaptureStatus.Stop:
|
||||||
|
return f"Audio capture status: is not working"
|
||||||
|
elif self.value == AudioCaptureStatus.Running:
|
||||||
|
return f"Audio capture status: working"
|
||||||
|
else:
|
||||||
|
return f"Video capture status: Unknown state"
|
||||||
|
|
||||||
|
|
||||||
|
class VideoCaptureStatus(IntEnum):
|
||||||
|
Unknown = -1
|
||||||
|
Idle = 0 # Doing nothing
|
||||||
|
Capturing = 1 # Capturing in progress
|
||||||
|
Transferring = 2 # Transferring in progress
|
||||||
|
LiveModeActive = 3 # Live mode active
|
||||||
|
Malfunction = 4 # Malfunction (requires restart)
|
||||||
|
Done = 7 # Capturing and transferring done
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
if self.value == VideoCaptureStatus.Unknown:
|
||||||
|
return f"Video capture status: {self.value}"
|
||||||
|
elif self.value == VideoCaptureStatus.Idle:
|
||||||
|
return f"Video capture status: Doing nothing"
|
||||||
|
elif self.value == VideoCaptureStatus.Capturing:
|
||||||
|
return f"Video capture status: Capturing in progress"
|
||||||
|
elif self.value == VideoCaptureStatus.Transferring:
|
||||||
|
return f"Video capture status: Transferring in progress"
|
||||||
|
elif self.value == VideoCaptureStatus.LiveModeActive:
|
||||||
|
return f"Video capture status: Live mode active"
|
||||||
|
elif self.value == VideoCaptureStatus.Malfunction:
|
||||||
|
return f"Video capture status: Malfunction (requires restart)"
|
||||||
|
elif self.value == VideoCaptureStatus.Done:
|
||||||
|
return f"Video capture status: Capturing and transferring done"
|
||||||
|
else:
|
||||||
|
return f"Video capture status: Unknown state"
|
||||||
|
|
||||||
|
|
||||||
|
class EventCaptureStatus(IntEnum):
|
||||||
|
Unknown = -1
|
||||||
|
Stop = 0
|
||||||
|
Running = 1
|
||||||
|
Invalid = 0xFF
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
if self.value == EventCaptureStatus.Unknown:
|
||||||
|
return f"Event capture status: {self.value}"
|
||||||
|
elif self.value == EventCaptureStatus.Stop:
|
||||||
|
return f"Event capture status: is not working"
|
||||||
|
elif self.value == EventCaptureStatus.Running:
|
||||||
|
return f"Event capture status: working"
|
||||||
|
else:
|
||||||
|
return f"Video capture status: Unknown state"
|
||||||
180
UniTAP/dev/modules/capturer/types.py
Normal file
180
UniTAP/dev/modules/capturer/types.py
Normal file
@@ -0,0 +1,180 @@
|
|||||||
|
from UniTAP.common.timestamp import Timestamp
|
||||||
|
from ctypes import c_uint8, c_ubyte, c_uint16, c_uint32, c_uint64, Structure
|
||||||
|
from enum import IntEnum
|
||||||
|
from UniTAP.common import ColorInfo, DataInfo, VideoFrame
|
||||||
|
|
||||||
|
|
||||||
|
class CapturedDataType(IntEnum):
|
||||||
|
Unknown = 0
|
||||||
|
Video = 1
|
||||||
|
Audio = 2
|
||||||
|
Event = 3
|
||||||
|
Bulk = 4
|
||||||
|
|
||||||
|
|
||||||
|
class CapturedData:
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
self.frame_number = 0
|
||||||
|
self.timestamp = 0
|
||||||
|
self.width = 0
|
||||||
|
self.height = 0
|
||||||
|
self.dataFormat = 0
|
||||||
|
self.colorimetry = 0
|
||||||
|
self.colorMode = 0
|
||||||
|
self.bpc = 0
|
||||||
|
self.type = 0
|
||||||
|
self.data = 0
|
||||||
|
|
||||||
|
|
||||||
|
class CrcStruct(Structure):
|
||||||
|
_fields_ = [
|
||||||
|
("r", c_uint16),
|
||||||
|
("g", c_uint16),
|
||||||
|
("b", c_uint16),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
class VideoFrameHeader(Structure):
|
||||||
|
__BPC_PA_TO_INT = {
|
||||||
|
0: 6,
|
||||||
|
1: 8,
|
||||||
|
2: 10,
|
||||||
|
3: 12,
|
||||||
|
4: 16,
|
||||||
|
5: 7,
|
||||||
|
6: 14
|
||||||
|
}
|
||||||
|
|
||||||
|
__PA_PACKING_TO_VF_PACKING = {
|
||||||
|
0: DataInfo.Packing.P_PLANAR,
|
||||||
|
1: DataInfo.Packing.P_PLANAR
|
||||||
|
}
|
||||||
|
|
||||||
|
__PA_CF_TO_CI_CF = {
|
||||||
|
0: ColorInfo.ColorFormat.CF_RGB,
|
||||||
|
1: ColorInfo.ColorFormat.CF_YCbCr_422,
|
||||||
|
2: ColorInfo.ColorFormat.CF_YCbCr_444,
|
||||||
|
3: ColorInfo.ColorFormat.CF_YCbCr_420,
|
||||||
|
4: ColorInfo.ColorFormat.CF_Y_ONLY,
|
||||||
|
5: ColorInfo.ColorFormat.CF_RAW,
|
||||||
|
6: ColorInfo.ColorFormat.CF_DSC,
|
||||||
|
7: ColorInfo.ColorFormat.CF_IDO_DEFINED
|
||||||
|
}
|
||||||
|
__PA_CR_TO_CI_CR = {
|
||||||
|
0: ColorInfo.Colorimetry.CM_NONE,
|
||||||
|
1: ColorInfo.Colorimetry.CM_SMPTE_170M,
|
||||||
|
2: ColorInfo.Colorimetry.CM_ITUR_BT709,
|
||||||
|
3: ColorInfo.Colorimetry.CM_NONE
|
||||||
|
}
|
||||||
|
|
||||||
|
__PA_EXT_CR_TO_CI_CR = {
|
||||||
|
0: ColorInfo.Colorimetry.CM_xvYCC601,
|
||||||
|
1: ColorInfo.Colorimetry.CM_xvYCC709,
|
||||||
|
2: ColorInfo.Colorimetry.CM_sYCC601,
|
||||||
|
3: ColorInfo.Colorimetry.CM_AdobeYCC601,
|
||||||
|
4: ColorInfo.Colorimetry.CM_AdobeRGB,
|
||||||
|
5: ColorInfo.Colorimetry.CM_ITUR_BT2020_YcCbcCrc,
|
||||||
|
6: ColorInfo.Colorimetry.CM_ITUR_BT2020_RGB,
|
||||||
|
7: ColorInfo.Colorimetry.CM_ITUR_BT601
|
||||||
|
}
|
||||||
|
|
||||||
|
class PixelAttributes(Structure):
|
||||||
|
_fields_ = [
|
||||||
|
("component_format", c_uint32, 4),
|
||||||
|
("", c_uint32, 1),
|
||||||
|
("bpc", c_uint32, 3),
|
||||||
|
("video_mode", c_uint32, 1),
|
||||||
|
("stereo_mode", c_uint32, 1),
|
||||||
|
("field_id", c_uint32, 1),
|
||||||
|
("stereo_id", c_uint32, 1),
|
||||||
|
("blanked", c_uint32, 1),
|
||||||
|
("encrypted", c_uint32, 1),
|
||||||
|
("pixel_packing_format", c_uint32, 2),
|
||||||
|
("color_format", c_uint32, 3),
|
||||||
|
("dynamic_range", c_uint32, 1),
|
||||||
|
("colorimetry", c_uint32, 2),
|
||||||
|
("ext_colorimetry", c_uint32, 3),
|
||||||
|
("", c_uint32, 1),
|
||||||
|
("dsc_compressed", c_uint32, 1),
|
||||||
|
("ext_color_format", c_uint32, 2),
|
||||||
|
("video_footer", c_uint32, 1),
|
||||||
|
("video_packet_crc", c_uint32, 1),
|
||||||
|
]
|
||||||
|
|
||||||
|
_fields_ = [
|
||||||
|
('sync', c_uint32),
|
||||||
|
('number', c_uint32),
|
||||||
|
('', c_uint32),
|
||||||
|
('size_words', c_uint32),
|
||||||
|
('frame_timestamp', c_uint64, 62),
|
||||||
|
('time_unit', c_uint64, 2),
|
||||||
|
('attributes', PixelAttributes),
|
||||||
|
("f_width", c_uint32, 16),
|
||||||
|
("f_height", c_uint32, 16)
|
||||||
|
]
|
||||||
|
|
||||||
|
@property
|
||||||
|
def bpc(self) -> int:
|
||||||
|
return self.__BPC_PA_TO_INT.get(self.attributes.bpc, 0)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dynamic_range(self) -> ColorInfo.DynamicRange:
|
||||||
|
if self.attributes.dynamic_range:
|
||||||
|
return ColorInfo.DynamicRange.DR_CTA
|
||||||
|
else:
|
||||||
|
return ColorInfo.DynamicRange.DR_VESA
|
||||||
|
|
||||||
|
@property
|
||||||
|
def color_format(self) -> ColorInfo.ColorFormat:
|
||||||
|
return self.__PA_CF_TO_CI_CF.get(self.attributes.color_format,
|
||||||
|
ColorInfo.ColorFormat.CF_UNKNOWN)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def colorimetry(self) -> ColorInfo.Colorimetry:
|
||||||
|
if self.attributes.colorimetry == 3:
|
||||||
|
return self.__PA_EXT_CR_TO_CI_CR.get(self.attributes.ext_colorimetry,
|
||||||
|
ColorInfo.Colorimetry.CM_NONE)
|
||||||
|
else:
|
||||||
|
return self.__PA_CR_TO_CI_CR.get(self.attributes.colorimetry,
|
||||||
|
ColorInfo.Colorimetry.CM_NONE)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def timestamp(self) -> Timestamp:
|
||||||
|
value = self.frame_timestamp
|
||||||
|
value &= 0x7FFFFFFFFFFFFFFF
|
||||||
|
value *= 100 if (self.time_unit & 0x1) else 1000
|
||||||
|
return Timestamp(value)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def packing(self) -> DataInfo.Packing:
|
||||||
|
return self.__PA_PACKING_TO_VF_PACKING.get(self.attributes.pixel_packing_format,
|
||||||
|
DataInfo.Packing.P_UNKNOWN)
|
||||||
|
|
||||||
|
def is_dsc(self) -> bool:
|
||||||
|
return self.attributes.color_format == 6
|
||||||
|
|
||||||
|
@property
|
||||||
|
def width(self):
|
||||||
|
if self.color_format == ColorInfo.ColorFormat.CF_YCbCr_420:
|
||||||
|
return self.f_width << 1
|
||||||
|
else:
|
||||||
|
return self.f_width
|
||||||
|
|
||||||
|
@property
|
||||||
|
def height(self):
|
||||||
|
return self.f_height
|
||||||
|
|
||||||
|
|
||||||
|
class CaptureError(Exception):
|
||||||
|
|
||||||
|
def __init__(self, message: str):
|
||||||
|
self.__message = message
|
||||||
|
super().__init__(self.__message)
|
||||||
|
|
||||||
|
|
||||||
|
class BufferedCaptureError(Exception):
|
||||||
|
|
||||||
|
def __init__(self, message: str):
|
||||||
|
self.__message = message
|
||||||
|
super().__init__(self.__message)
|
||||||
1
UniTAP/dev/modules/capturer/utils.py
Normal file
1
UniTAP/dev/modules/capturer/utils.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from UniTAP.libs.lib_uicl.uicl_utils import *
|
||||||
4
UniTAP/dev/modules/dut_tests/__init__.py
Normal file
4
UniTAP/dev/modules/dut_tests/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
from .dut_tests import DUTTests, TestGroupId, SubTestResultObject, TestResultObject, TestResult, \
|
||||||
|
PackedTimings1Lane, PackedTimings2Lane, PackedTimings4Lane, EventIndication
|
||||||
|
from .dut_default_params import *
|
||||||
|
from .report import *
|
||||||
195
UniTAP/dev/modules/dut_tests/cfg/[0x01]src_dut_crc.json
Normal file
195
UniTAP/dev/modules/dut_tests/cfg/[0x01]src_dut_crc.json
Normal file
@@ -0,0 +1,195 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x10300",
|
||||||
|
"defaultValue": "10000",
|
||||||
|
"description": "Defines timeout for all CRC based video tests, in milliseconds. Default setting is 10000ms.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_CRC_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10301",
|
||||||
|
"defaultValue": "200",
|
||||||
|
"description": "Total number of frames to be tested. After calculation of CRC for total number of frames test will be completed. If total number is equal to 0, then test will be executing up to test timeout. Default setting is 200.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_CRC_FRAMES_TO_TEST",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test duration, in frames",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10302",
|
||||||
|
"defaultValue": "20",
|
||||||
|
"description": "Number of reference frames. Default setting is 20.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_CRC_REF_FRAME_COUNT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Reference frames",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10303",
|
||||||
|
"defaultValue": "20",
|
||||||
|
"description": "Number of bad frames allowed in single CRC tests. Default setting is 20\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_CRC_LIM_FRAME_MISMATCHES",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Allowed mismatches, in frames",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10304",
|
||||||
|
"defaultValue": "1920",
|
||||||
|
"description": "Defined the expected video width, in pixels. If the video being received does not match this setting, the test will fail. Default setting is 1920.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_CRC_REF_WIDTH",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Expected video width, in pixels",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10305",
|
||||||
|
"defaultValue": "1080",
|
||||||
|
"description": "Defines the expected video height, in pixels. If the video being received does not match this setting, the test will fail. Default setting is 1080.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_CRC_REF_HEIGHT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Expected video weight, in pixels",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10306",
|
||||||
|
"defaultValue": "24",
|
||||||
|
"description": "Defines the color depth as bits per pixel. If the input video color depth does not match this setting, the test will fail. Default setting is 24.\n",
|
||||||
|
"enumerationVariants": "12\n15\n16\n18\n20\n21\n24\n30\n32\n36\n48",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_CRC_REF_COLORDEPTH",
|
||||||
|
"maxValue": 2147480000,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Expected color depth, as bits per pixel",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10307",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines the required frame rate for CRC based tests, in millihertz. Setting of zero (0) disables the frame-rate requirement. Default setting is 0.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_CRC_REQUIRED_FRAME_RATE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Expected frame rate, in millihertz (mHz)",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10308",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines the maximum allowed deviation of input frame-rate from the required frame rate (TSI_CRC_REQUIRED_FRAME_RATE), in millihertz. When this setting is non-zero, it defines the range of allowed frame rate as requirements ± tolerance. If the frame-rate requirement is set to zero, this setting has no effect. Default setting is 0 mHz.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_CRC_FRAME_RATE_TOLERANCE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Frame rate tolerance, in millihertz (mHz)",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10309",
|
||||||
|
"defaultValue": [46750, 45886, 6835],
|
||||||
|
"description": "Contains CRC reference values. Each CRC set consists of 3 16-bit words; One word for each color channel. Red / Cr color channel CRC is at the lowest address (first word), followed by Green / Y channel (second word) and then Blue / Cb channel (third word). Maximum number of CRC value sets is 65535. Default CRC set is empty (=no default value).",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_CRC_REFERENCE_CRC_VALUES",
|
||||||
|
"name": "Provided CRC value sets",
|
||||||
|
"type": 6
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1030c",
|
||||||
|
"defaultValue": "1",
|
||||||
|
"description": "Defines the number of iterations the defined CRC sequence must be found in order to pass the test. Default is 1.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_CRC_MOTION_TEST_ITERATIONS",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Motion test iterations (# loops)",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1030d",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Color format. Default setting is 0.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_CRC_COLOR_FORMAT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Color format",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10317",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Data transfer timeout in milliseconds. Default setting is 0.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_CRC_DATA_TRANSFER_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Data transfer timeout.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10320",
|
||||||
|
"defaultValue": "",
|
||||||
|
"description": "Contains the full path to the folder where failed frames are to be saved without trailing backslash (‘\\’). No default. Failed frame file-name will be “Failed_<#>.ppm”, where <#> is replaced with an auto-incremented number.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_CRC_FAILED_FRAME_TARGET_FOLDER",
|
||||||
|
"maxLength": 10000,
|
||||||
|
"name": "Location where the failed frames are to be saved",
|
||||||
|
"type": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10322",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines the number of failed frames to be exported from the video test. Default setting is 0. If the setting is 0, no frames are exported.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_CRC_MAX_EXPORT_FAILED",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Maximum number of exported frames",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10323",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Export format",
|
||||||
|
"flag": 3,
|
||||||
|
"enumerationVariants": "0 # Binary file\n1 # PPM image\n2 # BMP image",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"id": "TSI_CRC_EXPORT_FORMAT",
|
||||||
|
"maxLength": 10000,
|
||||||
|
"name": "Export format",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10321",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Align 12",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_CRC_ALIGN_12",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Align 12",
|
||||||
|
"type": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x01",
|
||||||
|
"name": "CRC Video Tests",
|
||||||
|
"old_names": [
|
||||||
|
"CRC based Video Test Set"
|
||||||
|
]
|
||||||
|
}
|
||||||
86
UniTAP/dev/modules/dut_tests/cfg/[0x02]src_dut_audio.json
Normal file
86
UniTAP/dev/modules/dut_tests/cfg/[0x02]src_dut_audio.json
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x2020",
|
||||||
|
"defaultValue": "44100",
|
||||||
|
"description": "Sample rate that should be present when running the test, in Hz. Default setting is 44100 Hz. If the audio stream sample rate does not match, the test will result fail.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_EXPECTED_SAMPLE_RATE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Expected sampling rate of audio signal",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x2021",
|
||||||
|
"defaultValue": "1000",
|
||||||
|
"description": "Expected audible signal frequency that should be present when running the test, in Hz. Default setting is 1000 Hz.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_EXPECTED_AUDIO_FREQUENCY",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Expected audible (sine) frequency as Hz",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x2022",
|
||||||
|
"defaultValue": "1",
|
||||||
|
"description": "Maximum allowed frequency deviation for the audible signal from the reference frequency, in Hz. Default setting is 1 Hz.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_AUDIO_FREQUENCY_TOLERANCE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Allowed deviation from expected frequency as Hz",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x2023",
|
||||||
|
"defaultValue": "5",
|
||||||
|
"description": "This value defines the accepted RDV range by adding/subtracting it from the calculated base RDV when performing glitch detection. Lower values mean more sensitive to glitches – please note that setting this value too low will cause even perfectly good signal to fail the test. Valid range for this setting is 0 to 32767.0; The default setting is 5.0 (327680 scaled). Important: FIXED POINT ENCODING. When setting this value parameter, the value being set must be multiplied by 65536 and set as a 32-bit integer. When reading the value, the received value must be divided by 65536 and shown as a floating point quantity.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_AUDIO_GLITCH_DETECT_TRESHOLD",
|
||||||
|
"maxValue": 100,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "The percentage deviation from the ideal sine",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x2024",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines how many glitches are allowed before the audio test is considered failed. Default setting is 0. Important: Due to implementation specific characteristics, a single (but very audible) glitch is probably detected multiple times. The number of times a glitch is detected depends greatly on the severity of the glitch, and it's location respective to the sine waveform. Because of this, setting a non-zero but very low value may not make sense.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_AUDIO_GLITCHES_ALLOWED",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Number of audio glitches allowed per test",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x2025",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Maximum number of frames failed frames saved per test run. Default setting is 0. If the setting is “0”, no frames are saved.",
|
||||||
|
"flag": 3,
|
||||||
|
"enumerationVariants": "0 # Save none\n1 # Save failed\n2 # Save all",
|
||||||
|
"id": "TSI_AUDIO_TEST_SAVE_CONDITIONS",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Tested audio save conditions",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x2026",
|
||||||
|
"defaultValue": "",
|
||||||
|
"description": "Contains the full path to the folder where failed frames are to be saved without trailing backslash (‘\\’). No default. Failed frame file-name will be “Failed_<#>.ppm”, where <#> is replaced with an auto-incremented number.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_AUDIO_TEST_STORAGE_FOLDER",
|
||||||
|
"maxLength": 10000,
|
||||||
|
"name": "Location where the captured audio is to be saved",
|
||||||
|
"type": 11
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x02",
|
||||||
|
"name": "Audio Test",
|
||||||
|
"old_names": [
|
||||||
|
"Validate audio signal frequency and glitch-free audio reproduction"
|
||||||
|
]
|
||||||
|
}
|
||||||
2041
UniTAP/dev/modules/dut_tests/cfg/[0x03]src_dut_dp_8b10b_ll_cts.json
Normal file
2041
UniTAP/dev/modules/dut_tests/cfg/[0x03]src_dut_dp_8b10b_ll_cts.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,91 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x10700",
|
||||||
|
"defaultValue": "5000",
|
||||||
|
"description": "Defines timeout for each test iteration, in milliseconds. The test iterates through a number of iterations depending on other tests. Each iteration must complete within this timeout in order for the test succeed. Default setting is 5000ms.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP_LTT_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10701",
|
||||||
|
"defaultValue": "4",
|
||||||
|
"description": "Defines the maximum number of lanes to be tested. Valid settings are 1, 2 and 4. Default setting is 4.\n",
|
||||||
|
"enumerationVariants": "1\n2\n4",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP_LTT_MAX_LANE_COUNT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Max lanes count supported by DUT",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10702",
|
||||||
|
"defaultValue": "20",
|
||||||
|
"description": "Defines the maximum link rate to be tested. The setting is in multiplier of 0.27Gbps. Valid settings are 6, 10, 20 and 30. Default setting is 20.",
|
||||||
|
"enumerationVariants": "6 # 1.62 Gbps\n10 # 2.7 Gbps\n20 # 5.4 Gbps\n30 # 8.1Gbps",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP_LTT_MAX_RATE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Max lane rate supported by DUT",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10705",
|
||||||
|
"defaultValue": "1000",
|
||||||
|
"description": "Defines the length of the HPD pulse used to start each test iteration, in milliseconds. Default setting is 1000ms.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP_LTT_HPD_PULSE_DURATION",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Long HPD pulse duration, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10706",
|
||||||
|
"defaultValue": "5000",
|
||||||
|
"description": "Defines how long the test waits for LT start after issuing HPD pulse, in milliseconds. Default setting is 5000ms",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP_LTT_LT_START_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Link training start timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10707",
|
||||||
|
"defaultValue": "3000",
|
||||||
|
"description": "Defines the additional delay inserted in between test iterations, in milliseconds. Default setting is 3000ms.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP_LTT_TEST_LOOP_DELAY",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Delay between test cycles, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10703",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Reserved for DUT Capabilities flags and DUT Test automation capabilities flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"description": "0x10703", "defaultValue": "0"},
|
||||||
|
{"description": "0x10704", "defaultValue": "0"}
|
||||||
|
],
|
||||||
|
"flag": 3,
|
||||||
|
"id": "RESERVED",
|
||||||
|
"name": "Reserved",
|
||||||
|
"type": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x04",
|
||||||
|
"name": "Link Config Tests",
|
||||||
|
"old_names": [
|
||||||
|
"Link Test Set"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,222 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x10100",
|
||||||
|
"defaultValue": "5000",
|
||||||
|
"description": "Timeout period used for all DP RX electrical tests, in milliseconds. Default timeout is 5000ms.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP_RX_TEST_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10101",
|
||||||
|
"defaultValue": "2600",
|
||||||
|
"description": "These two CI’s define the acceptable voltage range DP link lines. The measured voltage must be higher than TSI_DP_RX_LINKS_LOW_VOLTAGE setting, and lower than TSI_DP_RX_LINKS_HI_VOLTAGE setting in order to pass test. Default setting for low voltage limit is 2600mV, and for high voltage limit 4000mV.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP_RX_LINKS_LOW_VOLTAGE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "Main link low voltage limit, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10102",
|
||||||
|
"defaultValue": "4000",
|
||||||
|
"description": "These two CI’s define the acceptable voltage range DP link lines. The measured voltage must be higher than TSI_DP_RX_LINKS_LOW_VOLTAGE setting, and lower than TSI_DP_RX_LINKS_HI_VOLTAGE setting in order to pass test. Default setting for low voltage limit is 2600mV, and for high voltage limit 4000mV.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP_RX_LINKS_HI_VOLTAGE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "Main link high voltage limit, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10103",
|
||||||
|
"defaultValue": "-100",
|
||||||
|
"description": "These to CI’s define the acceptable voltage range for HDP line when it is in logical zero state. The measured voltage must be higher than TSI_DP_RX_HDP_ZERO_LOW_VOLTAGE setting, and lower than TSI_DP_RX_HPD_ZERO_HI_VOLTAGE setting in order to pass test. Default setting for low voltage limit is -100mV, and for high voltage limit 800mV.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP_RX_HPD_ZERO_LOW_VOLTAGE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "HPD line logical zero low voltage level limit, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10104",
|
||||||
|
"defaultValue": "800",
|
||||||
|
"description": "These to CI’s define the acceptable voltage range for HDP line when it is in logical zero state. The measured voltage must be higher than TSI_DP_RX_HDP_ZERO_LOW_VOLTAGE setting, and lower than TSI_DP_RX_HPD_ZERO_HI_VOLTAGE setting in order to pass test. Default setting for low voltage limit is -100mV, and for high voltage limit 800mV.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP_RX_HPD_ZERO_HI_VOLTAGE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "HPD line logical zero high voltage level limit, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10105",
|
||||||
|
"defaultValue": "800",
|
||||||
|
"description": "These two CI’s define the acceptable voltage range for HPD line when it is in logical one state. The measured voltage must be higher than TSI_DP_RX_HDP_ONE_LOW_VOLTAGE setting, and lower than TSI_DP_RX_HDP_ONE_HI_VOLTAGE setting in order to pass test. Default setting for low voltage limit is 2000mV, and for high voltage limit 5500mV.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP_RX_HPD_ONE_LOW_VOLTAGE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "HPD line logical one low voltage level limit, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10106",
|
||||||
|
"defaultValue": "5500",
|
||||||
|
"description": "These two CI’s define the acceptable voltage range for HPD line when it is in logical one state. The measured voltage must be higher than TSI_DP_RX_HDP_ONE_LOW_VOLTAGE setting, and lower than TSI_DP_RX_HDP_ONE_HI_VOLTAGE setting in order to pass test. Default setting for low voltage limit is 800mV, and for high voltage limit 5500mV.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP_RX_HPD_ONE_HI_VOLTAGE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "HPD line logical one high voltage level limit, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10107",
|
||||||
|
"defaultValue": "20",
|
||||||
|
"description": "These two CI’s define the acceptable AUX+ line idle voltage range when the AUX is idle. The measured voltage must be higher than TSI_DP_RX_AUX_P_IDLE_LOW_VOLTAGE setting, and lower than TSI_DP_RX_AUX_P_IDLE_HI_VOLTAGE setting in order to pass test. Default setting for low voltage limit is 2400mV, and for high voltage limit 2600mV.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP_RX_AUX_P_IDLE_LOW_VOLTAGE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "AUX + line idle low voltage level limit, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10108",
|
||||||
|
"defaultValue": "500",
|
||||||
|
"description": "These two CI’s define the acceptable AUX+ line idle voltage range when the AUX is idle. The measured voltage must be higher than TSI_DP_RX_AUX_P_IDLE_LOW_VOLTAGE setting, and lower than TSI_DP_RX_AUX_P_IDLE_HI_VOLTAGE setting in order to pass test. Default setting for low voltage limit is 3600mV, and for high voltage limit 2600mV.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP_RX_AUX_P_IDLE_HI_VOLTAGE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "AUX + line idle high voltage level limit, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10109",
|
||||||
|
"defaultValue": "2600",
|
||||||
|
"description": "These two CI’s defined the acceptable AUX- line idle voltage range when the AUX is idle. The measured voltage must be higher than TSI_DP_RX_AUX_N_IDLE_LOW_VOLTAGE setting, and lower than TSI_DP_RX_AUX_N_IDLE_HI_VOLTAGE setting in order to pass test. Default setting for low voltage limit is 2400mV, and for high voltage limit 3600mV.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP_RX_AUX_N_IDLE_LOW_VOLTAGE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "AUX - line idle low voltage level limit, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1010a",
|
||||||
|
"defaultValue": "3600",
|
||||||
|
"description": "These two CI’s defined the acceptable AUX- line idle voltage range when the AUX is idle. The measured voltage must be higher than TSI_DP_RX_AUX_N_IDLE_LOW_VOLTAGE setting, and lower than TSI_DP_RX_AUX_N_IDLE_HI_VOLTAGE setting in order to pass test. Default setting for low voltage limit is 3600mV, and for high voltage limit 3600mV.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP_RX_AUX_N_IDLE_HI_VOLTAGE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "AUX - line idle high voltage level limit, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1010b",
|
||||||
|
"defaultValue": "150",
|
||||||
|
"description": "These two CI’s define the AUX+ (TSI_DP_RX_AUX_P_TRIG_VOLTAGE) and AUX(TSI_DP_RX_AUX_N_TRIG_VOLTAGE) line state change trigger levels. Default settings are for AUX+ 150mV and for AUX- 200mV.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP_RX_AUX_P_TRIG_VOLTAGE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "AUX + line signal trigger level, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1010c",
|
||||||
|
"defaultValue": "200",
|
||||||
|
"description": "These two CI’s define the AUX+ (TSI_DP_RX_AUX_P_TRIG_VOLTAGE) and AUX(TSI_DP_RX_AUX_N_TRIG_VOLTAGE) line state change trigger levels. Default settings are for AUX+ 150mV and for AUX- 200mV.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP_RX_AUX_N_TRIG_VOLTAGE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "AUX - line signal trigger level, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1010d",
|
||||||
|
"defaultValue": "200",
|
||||||
|
"description": "Timeout for AUX signal capture, in milliseconds. When the TE generates a HPD pulse during test, it waits for this amount of time (max.) for DUT to read DPCD locations 0x200 to 0x205. If this transaction is not seen, the test will fail. Default setting is 200ms.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP_RX_AUX_SIGNAL_CAPT_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "AUX signal capture timeout, milliseconds",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1010e",
|
||||||
|
"defaultValue": "5",
|
||||||
|
"description": "Retry count for AUX signal capture. If the AUX signal capture after TE generated a HPD pulse fails, the TE will re-try this many times. Default setting is 5.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP_RX_AUX_SIGNAL_CAPT_TRIES",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "AUX signal capture attempts, times",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1010f",
|
||||||
|
"defaultValue": "4",
|
||||||
|
"description": "Maximum number of lanes supported by the connected DUT. Typical values are 1, 2 or 4. Default setting is 4.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP_RX_MAX_DUT_MAX_LANES",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Maximum lanes count supported by DUT",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10110",
|
||||||
|
"defaultValue": "20",
|
||||||
|
"description": "Maximum link rate supported by the connected DUT, as multiplier of 0.27Gbps. Typical values are 6 (RBR), 10 (HBR), 20 (HBR-2) or 30 (HBR-3). Please note that HBR3 speed is not supported on all TE devices.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP_RX_MAX_DUT_LANE_RATE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Maximum data rate supported by DUT in 0.27Gbps",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10111",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "DUT Capabilities flags",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP_RX_DUT_CAPS",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DUT Capabilities flags",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10112",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "DUT Test automation capabilities flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "DUT is capable for test link training"},
|
||||||
|
{"mask": "0x00000002", "description": "DUT is capable for test video pattern"},
|
||||||
|
{"mask": "0x00000004", "description": "DUT is capable for test EDID read"}
|
||||||
|
],
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP_RX_DUT_TA_CAPS",
|
||||||
|
"name": "DUT Test automation capabilities flags.",
|
||||||
|
"type": 12
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x05",
|
||||||
|
"name": "Electrical Tests",
|
||||||
|
"old_names": [
|
||||||
|
"DP Electrical Test Set"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,174 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x10200",
|
||||||
|
"defaultValue": "5000",
|
||||||
|
"description": "Timeout period used for all HDMI RX electrical tests, in milliseconds. Default timeout is 5000ms.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_RX_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10201",
|
||||||
|
"defaultValue": "4700",
|
||||||
|
"description": "HDMI power line voltage low limit, in millivolts. The voltage detected from HDMI power line must be higher than this value in order to pass tests. Default setting is 4700mV.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_RX_POWER_LOW_LIMIT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "Power line low voltage limit, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10202",
|
||||||
|
"defaultValue": "5300",
|
||||||
|
"description": "HDMI power line voltage high limit, in millivolts. The voltage detected from HDMI power line must be less than this value in order to pass tests. Default setting is 5300mV.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_RX_POWER_HIGH_LIMIT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "Power line high voltage limit, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10203",
|
||||||
|
"defaultValue": "2900",
|
||||||
|
"description": "HDMI link line voltage low limit, in millivolts. The voltage detected from HDMI link line(s) during test must be higher than this value in order to pass test. Default setting is 2900mV. Important: The acceptable setting for this value can be different for different types of DUT’s. Proper calibration of this value will require testing multiple DUT’s of same type in order to find typical value for the DUT in question.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_RX_LINK_LOW_LIMIT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "Main link low voltage limit, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10204",
|
||||||
|
"defaultValue": "3100",
|
||||||
|
"description": "HDMI link line voltage high limit, in millivolts. The voltage detected from HDMI link line(s) during test must be less than this value in order to pass test. Default setting is 3100mV. Important: The acceptable setting for this value can be different for different types of DUT’s. Proper calibration of this value will require testing multiple DUT’s of same type in order to find typical value for the DUT in question.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_RX_LINK_HIGH_LIMIT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "Main link high voltage limit, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10205",
|
||||||
|
"defaultValue": "-50",
|
||||||
|
"description": "HDMI HPD logical zero voltage level, lower limit, in millivolts. When HPD line is expected to be in logical zero state, the measured voltage must be higher than this value in order to pass test. Default setting is 0mV.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_RX_HPD_ZERO_LOW_LIMIT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "HPD line logical zero low voltage limit, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10206",
|
||||||
|
"defaultValue": "400",
|
||||||
|
"description": "HDMI HPD logical zero voltage level, higher limit, in millivolts. When HDP line is expected to be in logical zero state, the measured voltage must be lower than this value in order to pass test. Default setting is 400mV.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_RX_HPD_ZERO_HIGH_LIMIT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "HPD line logical zero high voltage limit, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10207",
|
||||||
|
"defaultValue": "2400",
|
||||||
|
"description": "HDMI HPD logical one voltage level, lower limit, in millivolts. When HPD line is expected to be in logical one state, the measured voltage must be less than this value in order to pass test. Default setting is 2400mV.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_RX_HPD_ONE_LOW_LIMIT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "HPD line logical one low voltage limit, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10208",
|
||||||
|
"defaultValue": "5300",
|
||||||
|
"description": "HDMI HPD logical one voltage level, higher limit, in millivolts. When HPD line is expected to be in logical one state, the measured voltage must be less than this value in order to pass test. Default setting is 5300mV.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_RX_HPD_ONE_HIGHT_LIMIT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "HPD line logical one high voltage limit, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10209",
|
||||||
|
"defaultValue": "4500",
|
||||||
|
"description": "DDC Line voltage low limit, in millivolts. Test will measure DDC line voltage when the line is not being driven low. The measured value must be higher than this value in order to pass test. Default setting is 4500mV.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_RX_DDC_LOW_LIMIT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "DDC lines low voltage limit, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1020a",
|
||||||
|
"defaultValue": "5500",
|
||||||
|
"description": "DDC Line voltage high limit, in millivolts. Test will measure DDC line voltage when the line is not being driven low. The measured value must be lower than this value in order to pass test. Default setting is 5500mV.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_RX_DDC_HIGH_LIMIT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "DDC lines high voltage limit, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1020b",
|
||||||
|
"defaultValue": "-50",
|
||||||
|
"description": "CCE Line logical zero voltage level, lower limit, in millivolts. The CCE line voltage is measured when CCE line state is logical zero. The measured value must be higher than this value in order to pass test. Default setting is 0mV.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_RX_CEC_ZERO_LOW_LIMIT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "CEC line logical zero low voltage limit, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1020c",
|
||||||
|
"defaultValue": "600",
|
||||||
|
"description": "CCE Line logical zero voltage level, higher limit, in millivolts. The CCE line voltage is measured when CCE line state is logical zero. The measured value must be lower than this value in order to pass test. Default setting is 600mV.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_RX_CEC_ZERO_HIGH_LIMIT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "CEC line logical zero high voltage limit, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1020d",
|
||||||
|
"defaultValue": "2500",
|
||||||
|
"description": "CCE Line logical one voltage level, lower limit, in millivolts. The CCE line voltage is measured when CCE line state is logical one. The measured value must be higher than this setting in order to pass test. Default setting is 2500mV.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_RX_CEC_ONE_LOW_LIMIT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "CEC line logical one low voltage limit, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1020e",
|
||||||
|
"defaultValue": "3600",
|
||||||
|
"description": "CCE Line logical one voltage level, higher limit, in millivolts. The CCE line voltage is measured when CCE line state is logical one. The measured value must be lower that this setting in order to pass test. Default setting is 3600mV.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_RX_CEC_ONE_HIGH_LIMIT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "CEC line logical one high voltage limit, mV",
|
||||||
|
"type": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x06",
|
||||||
|
"name": "Electrical Tests",
|
||||||
|
"old_names": [
|
||||||
|
"HDMI Electrical Test Set"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,300 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x10500",
|
||||||
|
"defaultValue": "5000",
|
||||||
|
"description": "Defines the test activity maximum run-time, in milliseconds. Default setting is 5000ms. Important: When the test is waiting for DUT with a max. delay this timeout is not advancing during the wait.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EL_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10501",
|
||||||
|
"defaultValue": "0x0000000F",
|
||||||
|
"description": "Defines DUT capabilities.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "DUT Support DisplayPort Alternate mode"},
|
||||||
|
{"mask": "0x00000002", "description": "DUT can act as a power source"},
|
||||||
|
{"mask": "0x00000004", "description": "DUT can act as a power sink"},
|
||||||
|
{"mask": "0x00000008", "description": "DUT does not support PD Contract"}
|
||||||
|
],
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EL_DUT_CAPS",
|
||||||
|
"name": "Defines DUT USBC capabilities.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10502",
|
||||||
|
"defaultValue": "1500",
|
||||||
|
"description": "Defines the time period for USB Type-C re-plug simulation “disconnected” state. The period is defined in milliseconds. Default value is 1500ms.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EL_REPLUG_TIME",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Re-plug duration, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10503",
|
||||||
|
"defaultValue": "10000",
|
||||||
|
"description": "Defines the time period that the TE will wait for DUT to complete power contract negotiation. Time is defined in milliseconds. Default value is 5000ms.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EL_DUT_ATTACH_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DUT attach timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10504",
|
||||||
|
"defaultValue": "5000",
|
||||||
|
"description": "Defines power contract timeout, in milliseconds",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EL_PWR_CONTRACT_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Power Contract timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10505",
|
||||||
|
"defaultValue": "261",
|
||||||
|
"description": "Defines the low limit for the voltage window when power sink current is 0.5A or 0.9A. The limit is defined in millivolts (mV). Default setting is 261mV.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EL_CC_LOW_VOLTAGE_1",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "CC low voltage limit for default current (0.5A/0.9A), in mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10506",
|
||||||
|
"defaultValue": "588",
|
||||||
|
"description": "Defines the high limit for the voltage window when power sink current is 0.5A or 0.9A. The limit is defined in millivolts (mV). Default settingf is 588mV.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EL_CC_HI_VOLTAGE_1",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "CC high voltage limit for default current (0.5A/0.9A), in mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10507",
|
||||||
|
"defaultValue": "675",
|
||||||
|
"description": "Defines the low limit for the voltage window when power sink current is 1.5A. The limit is defined in millivolts (mV). Default setting is 675mV.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EL_CC_LOW_VOLTAGE_2",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "CC low voltage limit for 1.5A current, in mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10508",
|
||||||
|
"defaultValue": "1189",
|
||||||
|
"description": "Defines the high limit for the voltage window when power sink current is 1.5A. The limit is defined in millivolts (mV). Default setting is 1189mV.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EL_CC_HI_VOLTAGE_2",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "CC high voltage limit for 1.5A current, in mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10509",
|
||||||
|
"defaultValue": "1238",
|
||||||
|
"description": "Defines the low limit for the voltage window when power sink current is 3.0A. The limit is defined in millivolts (mV). Default setting is 1238mV.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EL_CC_LOW_VOLTAGE_3",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "CC low voltage limit for 3.0A, in mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1050a",
|
||||||
|
"defaultValue": "2181",
|
||||||
|
"description": "Defines the high limit for the voltage window when power sink current is 3.0A. The limit is defined in millivolts (mV). Default setting is 2181mV.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EL_CC_HI_VOLTAGE_3",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "CC high voltage limit for 3.0A, in mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1050b",
|
||||||
|
"defaultValue": "4750",
|
||||||
|
"description": "Defines the low limit for the Vcon voltage window. The limit is defined in millivolts (mV). Default setting is 4750mV.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EL_VCON_LOW_VOLTAGE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "Vconn low voltage limit, in mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1050c",
|
||||||
|
"defaultValue": "5500",
|
||||||
|
"description": "Defines the high limit for the Vcon voltage window. The limit is defined in millivolts (mV). Default setting is 5500mV.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EL_VCON_HI_VOLTAGE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "Vconn high voltage limit, in mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1050d",
|
||||||
|
"defaultValue": "5000",
|
||||||
|
"description": "Defines the timeout the TE will wait for the DUT to enter into DisplayPort alternate mode. The timeout is defined in milliseconds. Default setting is 5000ms.\n ",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EL_DP_ALT_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DP Alt timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1050e",
|
||||||
|
"defaultValue": "100",
|
||||||
|
"description": "Defines the low voltage limit for the positive DP AUX line when idle. The limit is defined in millivolts (mV). Default setting 100mV.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EL_AUX_P_IDLE_LOW_VOLTAGE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "DP Alt Mode AUX + line idle low voltage limit, signed, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1050f",
|
||||||
|
"defaultValue": "600",
|
||||||
|
"description": "Defines the high voltage limit for the positive DP AUX line when idle. The limit is defined in millivolts (mV). Default setting is 600mV.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EL_AUX_P_IDLE_HI_VOLTAGE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "DP Alt Mode AUX + line idle high voltage limit, signed, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10510",
|
||||||
|
"defaultValue": "2500",
|
||||||
|
"description": "Defines the low voltage limit for the negative DP AUX line when idle. The limit is defined in millivolts (mV). Default setting is 2500mV.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EL_AUX_N_IDLE_LOW_VOLTAGE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "DP Alt Mode AUX - line idle low voltage limit, signed, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10511",
|
||||||
|
"defaultValue": "3000",
|
||||||
|
"description": "Defines the high voltage limit for the negative DP AUX line when idle. The limit is defined in millivolts (mV). Default setting is 3000mV",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EL_AUX_N_IDLE_HI_VOLTAGE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "DP Alt Mode AUX - line idle high voltage limit, signed, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10512",
|
||||||
|
"defaultValue": "4750",
|
||||||
|
"description": "Defines the low limit for Vbus voltage window. The limit is defined in millivolts (mV). Default setting is 4750mV.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EL_VBUS_LOW_VOLTAGE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "Vbus voltage low limit, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10513",
|
||||||
|
"defaultValue": "5500",
|
||||||
|
"description": "Defines the high limit for Vbus voltage window. The limit is defined in millivolts (mV). Default setting is 5500mV.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EL_VBUS_HI_VOLTAGE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": -2147483647,
|
||||||
|
"name": "Vbus voltage high limit, mV",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10514",
|
||||||
|
"defaultValue": "100",
|
||||||
|
"description": "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. Default setting is 100‰.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EL_VBUS_CURRENT_MAX_DEV",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Vbus current deviation (between wires), mA",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10515",
|
||||||
|
"defaultValue": "100",
|
||||||
|
"description": "Defines the highest allowed deviation between maximum and minimum currents measured from the individual GND 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. Default setting is 100‰.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EL_GND_CURRENT_MAX_DEV",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Return (GND) current deviation (between wires), mA",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10516",
|
||||||
|
"defaultValue": "2000",
|
||||||
|
"description": "Defines delay from end of power contract negotiation to voltage / current measurements. The delay is defined in milliseconds, and the default setting is 2000ms\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EL_PWR_MEASURE_DELAY",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Measurement delay, msec",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10517",
|
||||||
|
"defaultValue": "5",
|
||||||
|
"description": "Defines the minimum current, in mA, that a Power Sink DUT must use in order to pass the test. Set this value to zero (0) to disable minimum current check. Default value is 5.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EL_MIN_DUT_CURRENT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Minimum current, mA",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10518",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Delay after load resistor on, milliseconds. This helps to skip transient processes.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EL_RES_ON_DELAY",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Delay after connection load resistors, ms",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10519",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Delay for measure CC lines voltage after DUT plug detection, milliseconds. For Pegatron factory default value is 1500 ms.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EL_CC_MEASURE_DELAY",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Delay for measure CC lines voltage after DUT plug detection, milliseconds",
|
||||||
|
"type": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x07",
|
||||||
|
"name": "USB-C Electrical Tests",
|
||||||
|
"old_names": [
|
||||||
|
"USBC Electrical Tests"
|
||||||
|
]
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x10F0000",
|
||||||
|
"defaultValue": "200000",
|
||||||
|
"description": "Defines test timeout in milliseconds, default value is 200000ms.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_TEST_CFG_HDCP2_1A_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10F0001",
|
||||||
|
"defaultValue": [48, 187, 226, 110, 98],
|
||||||
|
"description": "Defines Revoke ID.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_TEST_CFG_HDCP2_1A_REVOKEID",
|
||||||
|
"name": "Revoke ID",
|
||||||
|
"type": 7
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10F0002",
|
||||||
|
"defaultValue": "1",
|
||||||
|
"description": "Defines source DUT capabilities flags.",
|
||||||
|
"enumerationVariants": "0 # False\n1 # True",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_TEST_CFG_HDCP2_1A_SRC_DUT_CAP",
|
||||||
|
"maxValue": 1,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Source_EncDisableBootstrapping",
|
||||||
|
"type": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x09",
|
||||||
|
"name": "HDCP 2.3 CTS 1A",
|
||||||
|
"old_names": [
|
||||||
|
"HDCP 2.3 CTS 1A Test Set"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x1110000",
|
||||||
|
"defaultValue": "200000",
|
||||||
|
"description": "Defines test timeout in milliseconds, default value is 200000ms.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_TEST_CFG_HDCP2_1B_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x0A",
|
||||||
|
"name": "HDCP 2.3 CTS 1B",
|
||||||
|
"old_names": [
|
||||||
|
"HDCP 2.3 CTS 1B Test Set"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x1130000",
|
||||||
|
"defaultValue": "200000",
|
||||||
|
"description": "Defines test timeout in milliseconds, default value is 200000ms.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_TEST_CFG_HDCP2_3A_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x0B",
|
||||||
|
"name": "HDCP 2.3 CTS 3A",
|
||||||
|
"old_names": [
|
||||||
|
"HDCP 2.3 CTS 3A Test Set"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x1140000",
|
||||||
|
"defaultValue": "200000",
|
||||||
|
"description": "Defines test timeout in milliseconds, default value is 200000ms.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_TEST_CFG_HDCP2_3B_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x0C",
|
||||||
|
"name": "HDCP 2.3 CTS 3B",
|
||||||
|
"old_names": [
|
||||||
|
"HDCP 2.3 CTS 3B Test Set"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x1120000",
|
||||||
|
"defaultValue": "200000",
|
||||||
|
"description": "Defines test timeout in milliseconds, default value is 200000ms.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_TEST_CFG_HDCP2_2C_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x0D",
|
||||||
|
"name": "HDCP 2.3 CTS 2C",
|
||||||
|
"old_names": [
|
||||||
|
"HDCP 2.3 CTS 2C Test Set"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x1150000",
|
||||||
|
"defaultValue": "200000",
|
||||||
|
"description": "Defines test timeout in milliseconds, default value is 200000ms.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_TEST_CFG_HDCP2_3C_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1150001",
|
||||||
|
"defaultValue": "1",
|
||||||
|
"description": "Defines Repeater_MultipleOutputs.",
|
||||||
|
"enumerationVariants": "0 # False\n1 # True",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_TEST_CFG_HDCP2_3C_REPEATER_MULTIPLE_OUTPUTS",
|
||||||
|
"maxValue": 1,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Repeater_MultipleOutputs",
|
||||||
|
"type": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x0E",
|
||||||
|
"name": "HDCP 2.3 CTS 3C",
|
||||||
|
"old_names": [
|
||||||
|
"HDCP 2.3 CTS 3C Test Set"
|
||||||
|
]
|
||||||
|
}
|
||||||
111
UniTAP/dev/modules/dut_tests/cfg/[0x0F]snk_dut_vrr.json
Normal file
111
UniTAP/dev/modules/dut_tests/cfg/[0x0F]snk_dut_vrr.json
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x1180000",
|
||||||
|
"defaultValue": "10000",
|
||||||
|
"description": "Timeout period used for all VRR tests, in milliseconds. Default timeout is 10000ms.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_VRR_SINK_DUT_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1180001",
|
||||||
|
"defaultValue": "60",
|
||||||
|
"description": "VRR Max value. Default timeout is 60.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_VRR_SINK_DUT_VRR_MAX",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "VRR Max value",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1180002",
|
||||||
|
"defaultValue": "30",
|
||||||
|
"description": "VRR Min value. Default timeout is 30.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_VRR_SINK_DUT_VRR_MIN",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "VRR Min value",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1180003",
|
||||||
|
"defaultValue": "45",
|
||||||
|
"description": "VRR Static value. Default timeout is 45.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_VRR_SINK_DUT_VRR_STATIC",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "VRR Static value",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1180004",
|
||||||
|
"defaultValue": "1",
|
||||||
|
"description": "Determines step of changing frame rate. Default timeout is 1.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_VRR_SINK_DUT_VRR_STEP",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "VRR Step value",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1180005",
|
||||||
|
"defaultValue": "1000",
|
||||||
|
"description": "Determines timer to change frame rate. Default timeout is 1000.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_VRR_SINK_DUT_VRR_TIME_STEP",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "VRR Time step value",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1180006",
|
||||||
|
"defaultValue": "0x00000003",
|
||||||
|
"description": "VRR Enable and M_CONST",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "VRR Enable value"},
|
||||||
|
{"mask": "0x00000002", "description": "M_CONST"}
|
||||||
|
],
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_VRR_SINK_DUT_VRR_ENABLE",
|
||||||
|
"name": "VRR Enable and M_CONST",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1180007",
|
||||||
|
"defaultValue": "3",
|
||||||
|
"description": "VFront and RB.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000003", "description": "Base VFront"},
|
||||||
|
{"mask": "0x00000004", "description": "RB"}
|
||||||
|
],
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_VRR_SINK_DUT_BASE_VFRONT",
|
||||||
|
"name": "VFront and RB",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1180008",
|
||||||
|
"defaultValue": "50",
|
||||||
|
"description": "Base Refresh Rate. Default timeout is 50.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_VRR_SINK_DUT_BASE_RATE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Base Refresh Rate",
|
||||||
|
"type": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x0F",
|
||||||
|
"name": "VRR Sink DUT Tests"
|
||||||
|
}
|
||||||
111
UniTAP/dev/modules/dut_tests/cfg/[0x10]src_dut_vrr.json
Normal file
111
UniTAP/dev/modules/dut_tests/cfg/[0x10]src_dut_vrr.json
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x1170000",
|
||||||
|
"defaultValue": "10000",
|
||||||
|
"description": "Timeout period used for all VRR tests, in milliseconds. Default timeout is 10000ms.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_VRR_SRC_DUT_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1170001",
|
||||||
|
"defaultValue": "60",
|
||||||
|
"description": "VRR Max value. Default timeout is 60.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_VRR_SRC_DUT_VRR_MAX",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "VRR Max value",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1170002",
|
||||||
|
"defaultValue": "30",
|
||||||
|
"description": "VRR Min value. Default timeout is 30.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_VRR_SRC_DUT_VRR_MIN",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "VRR Min value",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1170003",
|
||||||
|
"defaultValue": "45",
|
||||||
|
"description": "VRR Static value. Default timeout is 45.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_VRR_SRC_DUT_VRR_STATIC",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "VRR Static value",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1170004",
|
||||||
|
"defaultValue": "1",
|
||||||
|
"description": "Determines step of changing frame rate. Default timeout is 1.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_VRR_SRC_DUT_VRR_STEP",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "VRR Step value",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1170005",
|
||||||
|
"defaultValue": "1000",
|
||||||
|
"description": "Determines timer to change frame rate. Default timeout is 1000.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_VRR_SRC_DUT_VRR_TIME_STEP",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "VRR Time step value",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1170006",
|
||||||
|
"defaultValue": "0x00000003",
|
||||||
|
"description": "VRR Enable and M_CONST",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "VRR Enable value"},
|
||||||
|
{"mask": "0x00000002", "description": "M_CONST"}
|
||||||
|
],
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_VRR_SRC_DUT_VRR_ENABLE",
|
||||||
|
"name": "VRR Enable and M_CONST",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1170007",
|
||||||
|
"defaultValue": "3",
|
||||||
|
"description": "VFront and RB.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000003", "description": "Base VFront"},
|
||||||
|
{"mask": "0x00000004", "description": "RB"}
|
||||||
|
],
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_VRR_SRC_DUT_BASE_VFRONT",
|
||||||
|
"name": "VFront value",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1170008",
|
||||||
|
"defaultValue": "50",
|
||||||
|
"description": "Base Refresh Rate. Default timeout is 50.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_VRR_SRC_DUT_BASE_RATE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Base Refresh Rate",
|
||||||
|
"type": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x10",
|
||||||
|
"name": "VRR Source DUT Tests"
|
||||||
|
}
|
||||||
26
UniTAP/dev/modules/dut_tests/cfg/[0x11]src_dut_cec.json
Normal file
26
UniTAP/dev/modules/dut_tests/cfg/[0x11]src_dut_cec.json
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x10400",
|
||||||
|
"defaultValue": "5000",
|
||||||
|
"description": "Defines the CEC functional test timeout, in milliseconds. The test must complete within this time-period in order to succeed. Default setting is 5000ms.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_RX_CEC_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x10401",
|
||||||
|
"defaultValue": "16384",
|
||||||
|
"description": "Defines the CEC local PHY address. The address is stored in lowest 16-bits. Default setting is 0x4000 (“4.0.0.0”).\nTypically these addresses are given as “A.B.C.D”, similar to IP addresses. Each number in the address can be a value between 0 and 15. Therefore, address “8.9.10.11” would become HEX value 0x000089AB.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_RX_CEC_LOCAL_PHY_ADDR",
|
||||||
|
"name": "Local CEC physical address",
|
||||||
|
"type": 8
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x11",
|
||||||
|
"name": "CEC functional Test Set"
|
||||||
|
}
|
||||||
@@ -0,0 +1,223 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x10",
|
||||||
|
"defaultValue": "640",
|
||||||
|
"description": "Defines frame width as number of elements. Actual width in pixels is therefore this value multiplied by the element width.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_REF1_WIDTH",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Reference width as count of elements",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x11",
|
||||||
|
"defaultValue": "480",
|
||||||
|
"description": "Defines frame height as number of elements. Actual height in pixels is therefore this value multiplied by the element height.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_REF1_HEIGHT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Reference height as count of elements",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x12",
|
||||||
|
"defaultValue": "3",
|
||||||
|
"description": "Defines the size of the element body, in as bytes of storage required. Certain formats allow this container to be of different size: For example RGB 8:8:8 can have size of 3 and/or 4. Often, the 4 byte version is referred to as ARGB, but TSI does not process the Alpha (“A”) channel, so the presence of that is ignored.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_REF1_ELEMENT_SIZE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Size of a single element as bytes",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x13",
|
||||||
|
"defaultValue": "1",
|
||||||
|
"description": "Defines the width of a single element as number of pixels. Important: TSI_REF1_PIXELS_PER_ELEMENT name define is considered obsolete, however it continues to be defined for backwards compatibility. The new name was incorporated as it is more descriptive.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_REF1_ELEMENT_WIDTH",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Element width as pixels",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x14",
|
||||||
|
"defaultValue": "1",
|
||||||
|
"description": "Defines the height of a single element as number of pixels. Important: TSI_REF1_LINES_PER_ELEMENT name define is considered obsolete, however it continues to be defined for backwards compatibility. The new name was incorporated as it is more descriptive.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_REF1_ELEMENT_HEIGHT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Element height as pixels",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x15",
|
||||||
|
"defaultValue": "8",
|
||||||
|
"description": "Defines the color depth of the image as number of bits per color channel regardless of the color format.",
|
||||||
|
"enumerationVariants": "6\n8\n10\n12\n16",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_REF1_COLOR_DEPTH",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Active color bits per channel",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x16",
|
||||||
|
"defaultValue": "17",
|
||||||
|
"description": "Defines the element format used to encode the pixel data of the bitmap. Please see table below for currently defined format ID values:\nDefine -- ID -- Description\n\n TSI_ELF_RGB_080808 -- 0 -- RGB color, max color depth 8 bits per channel. Encoded as 3 unsigned bytes or 4 unsigned bytes per element. \n\nTSI_ELF_RGB_161616 -- 1 -- RGB color, max color depth 16 bits per channel. Encoded as 3 unsigned shorts or 4 unsigned shorts per element. \n\nTSI_ELF_YCbCr_080808 -- 0x100 -- YCbCr color, max color depth 8 bits per channel. Encoded as 3 unsigned bytes or 4 unsigned bytes per element. \n\nTSI_ELF_YCbCr_161616 -- 0x101 -- YCbCr color, max color depth 16 bits per channel. Encoded as 3 unsigned shorts or 4 unsigned shorts per element.\n\nImportant: TSI_REF1_PIXEL_FORMAT name define is considered obsolete, however it continues to be defined for backwards compatibility. The new name was incorporated as it is more descriptive.",
|
||||||
|
"enumerationVariants": "16 # RGB 6bpc\n17 # RGB 8bpc\n18 # RGB 10bpc\n19 # RGB 12bpc\n20 # RGB 16bpc\n256 # YCbCr 444 080808\n257 # YCbCr 444 161616\n800 # YCbCr 420 080808\n801 # YCbCr 420 10bpc\n802 # YCbCr 420 12bpc 161616\n803 # YCbCr 420 161616",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_REF1_ELEMENT_FORMAT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Element data layout ID",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x17",
|
||||||
|
"defaultValue": "",
|
||||||
|
"description": "Contains bitmap data encoded as defined in other TSI_REF1_* CI’s.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_REF1_FRAME_DATA",
|
||||||
|
"maxLength": 10000,
|
||||||
|
"name": "Array of bytes that form the bitmap",
|
||||||
|
"type": 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x119",
|
||||||
|
"defaultValue": "RGB",
|
||||||
|
"description": "Ref Image colorspace",
|
||||||
|
"flag": 3,
|
||||||
|
"enumerationVariants": "RGB\nYCbCr 444\nYCbCr 422\nYCbCr 420",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"id": "UI_VIDEO_PARAMS_COLORSPACE",
|
||||||
|
"maxLength": 10000,
|
||||||
|
"name": "Reference image colorspace",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x18",
|
||||||
|
"defaultValue": "1",
|
||||||
|
"description": "LSB-MSB data alignment",
|
||||||
|
"flag": 3,
|
||||||
|
"enumerationVariants": "1 # LSB\n0 # MSB",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"id": "TSI_REF1_LSB_MSB",
|
||||||
|
"maxLength": 10000,
|
||||||
|
"name": "LSB-MSB data alignment",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1000",
|
||||||
|
"defaultValue": "60",
|
||||||
|
"description": "Defines the length of the video test as number of frames. Default setting is 60 frames. Important: 32-bit version of TSI with very high resolution inputs may require the test length to be reduced.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_TEST_LENGTH",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Length of video test in frames",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1001",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines number of frame that are allowed to be considered as “failed” before the entire test is considered as “failed”. Default setting is 0.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_LIM_FRAME_MISMATCHES",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Maximum number of failed frames allowed per test",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1002",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines the number of pixels that allowed to be considered as “failed” before the frame is considered as “failed”. Default setting is 0.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_LIM_PIXEL_MISMATCHES",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Maximum number of failed pixels allowed per frame",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1003",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines maximum difference allowed between reference image and captured image. If the difference is larger than the value of this CI on any color channel, the pixel is considered “failed”. Default setting is 0.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_PIXEL_TOLERANCE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Maximum difference between color values allowed",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1080",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Maximum number of frames failed frames saved per test run. Default setting is 0. If the setting is “0”, no frames are saved.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_MAX_AUTO_SAVE_FAILED",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Maximum number of failed frames to auto-save",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1081",
|
||||||
|
"defaultValue": "",
|
||||||
|
"description": "Contains the full path to the folder where failed frames are to be saved without trailing backslash (‘\\’). No default. Failed frame file-name will be “Failed_<#>.ppm”, where <#> is replaced with an auto-incremented number.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_FAILED_FRAME_TARGET_FOLDER",
|
||||||
|
"maxLength": 10000,
|
||||||
|
"name": "Location where the failed frames are to be saved",
|
||||||
|
"type": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1082",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines the number of failed frames to be exported from the video test. Default setting is 0. If the setting is 0, no frames are exported.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_MAX_EXPORT_FAILED",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Maximum number of exported frames",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1084",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Export format",
|
||||||
|
"flag": 3,
|
||||||
|
"enumerationVariants": "0 # Binary file\n1 # PPM image\n2 # BMP image",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"id": "TSI_EXPORT_FORMAT",
|
||||||
|
"maxLength": 10000,
|
||||||
|
"name": "Export format",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1085",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Align 12",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_EXPORT_ALIGN_12",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Align 12",
|
||||||
|
"type": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x12",
|
||||||
|
"name": "Pixel Level Video Tests",
|
||||||
|
"old_names": [
|
||||||
|
"Compare video frame sequence with a single reference"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,551 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x01160000",
|
||||||
|
"defaultValue": "10000",
|
||||||
|
"description": "Defines a test timeout, in milliseconds. Default setting is 10000ms. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160001",
|
||||||
|
"defaultValue": "2",
|
||||||
|
"description": "Defines a DSC video mode: 1920x1080 @ 30Hz. Default and only ID: 2.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_DSC_VM_0",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DSC video mode: 1920x1080 @ 30Hz.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160002",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "DUT Capability flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines the CTA resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines the RB1 resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines the RB2 resolution support. Default value: 0."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP14_SINKCTS_DSC_VM_T_0",
|
||||||
|
"name": "DUT Capability flags.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160003",
|
||||||
|
"defaultValue": "3",
|
||||||
|
"description": "Defines a DSC video mode: 1920x1080 @ 60Hz. Default and only ID: 3.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_DSC_VM_1",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DSC video mode: 1920x1080 @ 60Hz.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160004",
|
||||||
|
"defaultValue": "0x00000001",
|
||||||
|
"description": "DUT Capability flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines the CTA resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines the RB1 resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines the RB2 resolution support. Default value: 0."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP14_SINKCTS_DSC_VM_T_1",
|
||||||
|
"name": "DUT Capability flags.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160005",
|
||||||
|
"defaultValue": "4",
|
||||||
|
"description": "Defines a DSC video mode: 1920x1080 @ 120Hz. Default and only ID: 4.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_DSC_VM_2",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DSC video mode: 1920x1080 @ 120Hz.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160006",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "DUT Capability flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines the CTA resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines the RB1 resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines the RB2 resolution support. Default value: 0."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP14_SINKCTS_DSC_VM_T_2",
|
||||||
|
"name": "DUT Capability flags.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160007",
|
||||||
|
"defaultValue": "5",
|
||||||
|
"description": "Defines a DSC video mode: 3840x2160 @ 30Hz. Default and only ID: 5.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_DSC_VM_3",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DSC video mode: 3840x2160 @ 30Hz.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160008",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "DUT Capability flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines the CTA resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines the RB1 resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines the RB2 resolution support. Default value: 0."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP14_SINKCTS_DSC_VM_T_3",
|
||||||
|
"name": "DUT Capability flags.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160009",
|
||||||
|
"defaultValue": "6",
|
||||||
|
"description": "Defines a DSC video mode: 3840x2160 @ 60Hz. Default and only ID: 6.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_DSC_VM_4",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DSC video mode: 3840x2160 @ 60Hz.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x0116000A",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "DUT Capability flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines the CTA resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines the RB1 resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines the RB2 resolution support. Default value: 0."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP14_SINKCTS_DSC_VM_T_4",
|
||||||
|
"name": "DUT Capability flags.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x0116000B",
|
||||||
|
"defaultValue": "7",
|
||||||
|
"description": "Defines a DSC video mode: 3840x2160 @ 120Hz. Default and only ID: 7.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_DSC_VM_5",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DSC video mode: 3840x2160 @ 120Hz.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x0116000C",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "DUT Capability flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines the CTA resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines the RB1 resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines the RB2 resolution support. Default value: 0."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP14_SINKCTS_DSC_VM_T_5",
|
||||||
|
"name": "DUT Capability flags.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x0116000D",
|
||||||
|
"defaultValue": "8",
|
||||||
|
"description": "Defines a DSC video mode: 5120x2160 @ 30Hz. Default and only ID: 8.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_DSC_VM_6",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DSC video mode: 5120x2160 @ 30Hz.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x0116000E",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "DUT Capability flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines the CTA resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines the RB1 resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines the RB2 resolution support. Default value: 0."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP14_SINKCTS_DSC_VM_T_6",
|
||||||
|
"name": "DUT Capability flags.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x0116000F",
|
||||||
|
"defaultValue": "9",
|
||||||
|
"description": "Defines a DSC video mode: 5120x2160 @ 60Hz. Default and only ID: 9.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_DSC_VM_7",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DSC video mode: 5120x2160 @ 60Hz.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160010",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "DUT Capability flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines the CTA resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines the RB1 resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines the RB2 resolution support. Default value: 0."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP14_SINKCTS_DSC_VM_T_7",
|
||||||
|
"name": "DUT Capability flags.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160011",
|
||||||
|
"defaultValue": "10",
|
||||||
|
"description": "Defines a DSC video mode: 5120x2160 @ 120Hz. Default and only ID: 10.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_DSC_VM_8",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DSC video mode: 5120x2160 @ 120Hz.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160012",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "DUT Capability flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines the CTA resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines the RB1 resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines the RB2 resolution support. Default value: 0."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP14_SINKCTS_DSC_VM_T_8",
|
||||||
|
"name": "DUT Capability flags.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160013",
|
||||||
|
"defaultValue": "11",
|
||||||
|
"description": "Defines a DSC video mode: 7680x4320 @ 30Hz. Default and only ID: 11.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_DSC_VM_9",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DSC video mode: 7680x4320 @ 30Hz.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160014",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "DUT Capability flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines the CTA resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines the RB1 resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines the RB2 resolution support. Default value: 0."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP14_SINKCTS_DSC_VM_T_9",
|
||||||
|
"name": "DUT Capability flags.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160015",
|
||||||
|
"defaultValue": "12",
|
||||||
|
"description": "Defines a DSC video mode: 7680x4320 @ 60Hz. Default and only ID: 12.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_DSC_VM_10",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DSC video mode: 7680x4320 @ 60Hz.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160016",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "DUT Capability flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines the CTA resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines the RB1 resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines the RB2 resolution support. Default value: 0."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP14_SINKCTS_DSC_VM_T_10",
|
||||||
|
"name": "DUT Capability flags.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160017",
|
||||||
|
"defaultValue": "13",
|
||||||
|
"description": "Defines a DSC video mode: 7680x4320 @ 100Hz. Default and only ID: 13.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_DSC_VM_11",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DSC video mode: 7680x4320 @ 100Hz.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160018",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "DUT Capability flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines the CTA resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines the RB1 resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines the RB2 resolution support. Default value: 0."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP14_SINKCTS_DSC_VM_T_11",
|
||||||
|
"name": "DUT Capability flags.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160019",
|
||||||
|
"defaultValue": "1",
|
||||||
|
"description": "Defines the DSC video mode source. Default value is 0. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready.\n",
|
||||||
|
"enumerationVariants": "0 # Use test configuration (below)\n1 # Use sink DUT EDID",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_DSC_SOURCE",
|
||||||
|
"maxValue": 2147480000,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Source of the most packet video modes table",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x0116001A",
|
||||||
|
"defaultValue": "1",
|
||||||
|
"description": "Defines the Sink DUT support 444 CRC for Simple 422 bitstream. Default value is 1. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready.\n",
|
||||||
|
"enumerationVariants": "0 # YCbCr 422 bitstream\n1 # YCbCr 444 bitstream",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_SUPPORT_444CRC",
|
||||||
|
"maxValue": 2147480000,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Sink DUT support 444 CRC for Simple 422 bitstream.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x0116001B",
|
||||||
|
"defaultValue": "1",
|
||||||
|
"description": "Defines the Source of the most packet video modes table. Default value is 1. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready.\n",
|
||||||
|
"enumerationVariants": "0 # Use test configuration (below)\n1 # Use sink DUT EDID",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_PACKET_SOURCE",
|
||||||
|
"maxValue": 2147480000,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Source of the most packet video modes table.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x0116001C",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: CVT 1280 x 800 @ 60p [RB1] 18bpp 99%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_VIDEO_MODE_0",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: CVT 1280 x 800 @ 60p [RB1] 18bpp 99%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x0116001D",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: DMT 1280 x 768 @ 60p [RB1] 18bpp 95%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_VIDEO_MODE_1",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: DMT 1280 x 768 @ 60p [RB1] 18bpp 95%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x0116001E",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: DMT 800 x 600 @ 60.317p 30bpp 93%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_VIDEO_MODE_2",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: DMT 800 x 600 @ 60.317p 30bpp 93%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x0116001F",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: DMT 1024 x 768 @ 60p 18bpp 90%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_VIDEO_MODE_3",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: DMT 1024 x 768 @ 60p 18bpp 90%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160020",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: DMT 1280 x 1024 @ 60p 24bpp 100%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_VIDEO_MODE_4",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: DMT 1280 x 1024 @ 60p 24bpp 100%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160021",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: DMT 1280 x 960 @ 60p 24bpp 100%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_VIDEO_MODE_5",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: DMT 1280 x 960 @ 60p 24bpp 100%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160022",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: DMT 1360 x 768 @ 60p 30bpp 99%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_VIDEO_MODE_6",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: DMT 1360 x 768 @ 60p 30bpp 99%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160023",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: CVT 1280 x 800 @ 60p 30bpp 97%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_VIDEO_MODE_7",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: CVT 1280 x 800 @ 60p 30bpp 97%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160024",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: DMT 1400 x 1050 @ 60p [RB1] 24bpp 94%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_VIDEO_MODE_8",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: DMT 1400 x 1050 @ 60p [RB1] 24bpp 94%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160025",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: DMT 1280 x 768 @ 60p 30bpp 92%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_VIDEO_MODE_9",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: DMT 1280 x 768 @ 60p 30bpp 92%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160026",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: CVT 1600 x 1200 @ 60p [RB1] 18bpp 90%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_VIDEO_MODE_10",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: CVT 1600 x 1200 @ 60p [RB1] 18bpp 90%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160027",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: CVT 2048 x 1536 @ 60p [RB1] 24bpp 97%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_VIDEO_MODE_11",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: CVT 2048 x 1536 @ 60p [RB1] 24bpp 97%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160028",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: DMT 1792 x 1344 @ 60p 24bpp 95%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_VIDEO_MODE_12",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: DMT 1792 x 1344 @ 60p 24bpp 95%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x01160029",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: DMT 1600 x 1200 @ 60p 30bpp 94%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_VIDEO_MODE_13",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: DMT 1600 x 1200 @ 60p 30bpp 94%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x0116002A",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: CTA 1440 x 480 @ 59.94p 24bpp 100%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_VIDEO_MODE_14",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: CTA 1440 x 480 @ 59.94p 24bpp 100%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x0116002B",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: CTA 1440 x 576 @ 50p 24bpp 100%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_VIDEO_MODE_15",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: CTA 1440 x 576 @ 50p 24bpp 100%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x0116002C",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: CTA 1920 x 1080 @ 60p 30bpp 86%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_VIDEO_MODE_16",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: CTA 1920 x 1080 @ 60p 30bpp 86%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x0116002D",
|
||||||
|
"defaultValue": "1",
|
||||||
|
"description": "Defines the Skip visual video check during DisplayID CTS tests. Default value is 0. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready.\n",
|
||||||
|
"enumerationVariants": "0 # Never skip\n1 # Skip if CRC matches",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP14_SINKCTS_VISUAL_TEST_CHECK",
|
||||||
|
"maxValue": 2147480000,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Skip visual video check during DisplayID CTS tests.",
|
||||||
|
"type": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x13",
|
||||||
|
"name": "DP 1.4 LL CTS",
|
||||||
|
"old_names": [
|
||||||
|
"DP 1.4 LL CTS",
|
||||||
|
"DP 1.4 Link Layer Sink DUT CTS"
|
||||||
|
]
|
||||||
|
}
|
||||||
29
UniTAP/dev/modules/dut_tests/cfg/[0x14]src_dut_hdr10+.json
Normal file
29
UniTAP/dev/modules/dut_tests/cfg/[0x14]src_dut_hdr10+.json
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x202A",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Metadata at the same frame of associated video (0) or at one frame advance (1). Default 0",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDR10_CTS_DISTR_SAME_FRAME",
|
||||||
|
"maxValue": 1,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Video / Metadata frame offset",
|
||||||
|
"type": 4,
|
||||||
|
"enumerationVariants": "0 # Metadata at the same frame of associated Video data\n1 # Metadata at one frame advance from associated Video data"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x202B",
|
||||||
|
"defaultValue": "10",
|
||||||
|
"description": "Defines the time period the TE will wait for metadata change; defined in seconds; default value is 10sec.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDR10_CTS_DISTR_TIMEOUT",
|
||||||
|
"maxValue": 1000,
|
||||||
|
"minValue": 1,
|
||||||
|
"name": "Metadata change timeout",
|
||||||
|
"type": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x14",
|
||||||
|
"name": "HDR10+ Distribution Device Tests"
|
||||||
|
}
|
||||||
@@ -0,0 +1,116 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x11B0000",
|
||||||
|
"defaultValue": "5000",
|
||||||
|
"description": "Defines test timeout in milliseconds, default value is 5000ms.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_LTTPR_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout in milliseconds.",
|
||||||
|
"reportFormat": "Test timeout = %2ms<br>",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x11B0001",
|
||||||
|
"defaultValue": "4",
|
||||||
|
"description": "Defines the maximum number of lanes supported by the DUT. Typical settings are 1, 2 and 4. Default value is 4. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready.\n",
|
||||||
|
"enumerationVariants": "1\n2\n4",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_LTTPR_MAX_LANES",
|
||||||
|
"maxValue": 2147480000,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Maximum number of lanes supported by the DUT.",
|
||||||
|
"visible": false,
|
||||||
|
"reportFormat": "DUT capability settings and flags:<br>- Max lanes = %1<br>",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x11B0002",
|
||||||
|
"defaultValue": "30",
|
||||||
|
"description": "Defines the maximum link rate as multiplier for 0.27Gbps. Typical settings are 6 (RBR), 10 (HBR), 20 (HBR2) and 30 (HBR3). Notice that HBR3 link rate is usable only with UCD-400. The default setting is 30 (HBR3). Important: This CI is still potential subject for changes due to the CTS specification not being officially ready.",
|
||||||
|
"enumerationVariants": "6 # RBR (1.62 Gbps)\n10 # HBR (2.7 Gbps)\n20 # HBR2 (5.4 Gbps)\n30 # HBR3 (8.10 Gbps)",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_LTTPR_MAX_LINK_RATE",
|
||||||
|
"maxValue": 30,
|
||||||
|
"minValue": 6,
|
||||||
|
"name": "Maximum link rate supported by the DUT as multiplier for 0.27Gbps.",
|
||||||
|
"visible": false,
|
||||||
|
"reportFormat": "- Max link rate = %1<br>",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x11B0003",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "Defines the DUT capabilities as flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000100", "description": "DUT is Type-C device", "reportFormat": "- DUT is Type-C device<br>"}
|
||||||
|
],
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_LTTPR_DUT_CAPS",
|
||||||
|
"name": "DUT Capability flags.",
|
||||||
|
"reportFormat": "Test DUT capabilities flags:<br>",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x11B0004",
|
||||||
|
"defaultValue": "0x0000001A",
|
||||||
|
"description": "Defines the DUT Test automation capabilities as flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "TEST_LINK_TRAINING", "reportFormat": "- TEST_LINK_TRAINING<br>"},
|
||||||
|
{"mask": "0x00000002", "description": "TEST_EDID_READ", "reportFormat": "- TEST_EDID_READ<br>"},
|
||||||
|
{"mask": "0x00000004", "description": "TEST_VIDEO_PATTERN", "reportFormat": "- TEST_VIDEO_PATTERN<br>"},
|
||||||
|
{"mask": "0x00000020", "description": "TEST_AUDIO_PATTERN", "reportFormat": "- TEST_AUDIO_PATTERN<br>"},
|
||||||
|
{"mask": "0x00000018", "description": "Event indicating DUT ready", "enumerationVariants": "0 # Always ready\n1 # EDID read\n2 # Link Training end\n3 # Active Video", "reportFormat": "- Event indicating DUT ready: %1<br>"}
|
||||||
|
],
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_LTTPR_DUT_TA",
|
||||||
|
"name": "DUT Test automation flags.",
|
||||||
|
"visible": false,
|
||||||
|
"reportFormat": "<br>Test automation flags and settings:<br>",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x11B0005",
|
||||||
|
"defaultValue": "1000",
|
||||||
|
"description": "Defines the duration of long HPD pulses generated by the tests. The duration is defined in millieconds. Default setting is 1000ms. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_LTTPR_LONG_HPD_PULSE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Long HPD pulse duration, in milliseconds.",
|
||||||
|
"reportFormat": "Long HPD Duration = %1ms<br>",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x11B0006",
|
||||||
|
"defaultValue": "100",
|
||||||
|
"description": "Defines the delay of CR iteration. The duration is defined in microseconds. Default setting is 100us. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_LTTPR_DEBUG_CR_ITERATION_DELAY",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "CR iteration delay, in microseconds.",
|
||||||
|
"reportFormat": "CR Iteration Delay = %1us<br><br>",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x11B0007",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": " Defines the Debug mode configuration.\n",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Force video check enabled"}
|
||||||
|
],
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_LTTPR_SINKCTS_DEBUG_CONF",
|
||||||
|
"name": "Debug mode configuration.",
|
||||||
|
"type": 12
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x15",
|
||||||
|
"name": "DP 2.1 LTTPR CTS"
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
],
|
||||||
|
"id": "0x16",
|
||||||
|
"name": "HDR10+ SSTM Tests for Source"
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x11C0000",
|
||||||
|
"defaultValue": "5000",
|
||||||
|
"description": "Defines test timeout in milliseconds, default value is 5000ms.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EPR_POWER_SINK_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout in milliseconds.",
|
||||||
|
"reportFormat": "Test timeout = %2ms<br>",
|
||||||
|
"type": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x17",
|
||||||
|
"name": "EPR Power Sink Tests"
|
||||||
|
}
|
||||||
@@ -0,0 +1,727 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x011A0000",
|
||||||
|
"defaultValue": "10000",
|
||||||
|
"description": "Defines a test timeout, in milliseconds. Default setting is 10000ms. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0001",
|
||||||
|
"defaultValue": "2",
|
||||||
|
"description": "Defines a DSC video mode: 1920x1080 @ 30Hz. Default and only ID: 2.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_DSC_VM_0",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DSC video mode: 1920x1080 @ 30Hz.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0002",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "DUT Capability flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines the CTA resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines the RB1 resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines the RB2 resolution support. Default value: 0."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP20_SINKCTS_DSC_VM_T_0",
|
||||||
|
"name": "DUT Capability flags.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0003",
|
||||||
|
"defaultValue": "3",
|
||||||
|
"description": "Defines a DSC video mode: 1920x1080 @ 60Hz. Default and only ID: 3.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_DSC_VM_1",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DSC video mode: 1920x1080 @ 60Hz.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0004",
|
||||||
|
"defaultValue": "0x00000001",
|
||||||
|
"description": "DUT Capability flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines the CTA resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines the RB1 resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines the RB2 resolution support. Default value: 0."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP20_SINKCTS_DSC_VM_T_1",
|
||||||
|
"name": "DUT Capability flags.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0005",
|
||||||
|
"defaultValue": "4",
|
||||||
|
"description": "Defines a DSC video mode: 1920x1080 @ 120Hz. Default and only ID: 4.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_DSC_VM_2",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DSC video mode: 1920x1080 @ 120Hz.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0006",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "DUT Capability flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines the CTA resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines the RB1 resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines the RB2 resolution support. Default value: 0."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP20_SINKCTS_DSC_VM_T_2",
|
||||||
|
"name": "DUT Capability flags.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0007",
|
||||||
|
"defaultValue": "5",
|
||||||
|
"description": "Defines a DSC video mode: 3840x2160 @ 30Hz. Default and only ID: 5.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_DSC_VM_3",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DSC video mode: 3840x2160 @ 30Hz.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0008",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "DUT Capability flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines the CTA resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines the RB1 resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines the RB2 resolution support. Default value: 0."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP20_SINKCTS_DSC_VM_T_3",
|
||||||
|
"name": "DUT Capability flags.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0009",
|
||||||
|
"defaultValue": "6",
|
||||||
|
"description": "Defines a DSC video mode: 3840x2160 @ 60Hz. Default and only ID: 6.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_DSC_VM_4",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DSC video mode: 3840x2160 @ 60Hz.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A000A",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "DUT Capability flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines the CTA resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines the RB1 resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines the RB2 resolution support. Default value: 0."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP20_SINKCTS_DSC_VM_T_4",
|
||||||
|
"name": "DUT Capability flags.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A000B",
|
||||||
|
"defaultValue": "7",
|
||||||
|
"description": "Defines a DSC video mode: 3840x2160 @ 120Hz. Default and only ID: 7.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_DSC_VM_5",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DSC video mode: 3840x2160 @ 120Hz.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A000C",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "DUT Capability flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines the CTA resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines the RB1 resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines the RB2 resolution support. Default value: 0."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP20_SINKCTS_DSC_VM_T_5",
|
||||||
|
"name": "DUT Capability flags.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A000D",
|
||||||
|
"defaultValue": "8",
|
||||||
|
"description": "Defines a DSC video mode: 5120x2160 @ 30Hz. Default and only ID: 8.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_DSC_VM_6",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DSC video mode: 5120x2160 @ 30Hz.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A000E",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "DUT Capability flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines the CTA resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines the RB1 resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines the RB2 resolution support. Default value: 0."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP20_SINKCTS_DSC_VM_T_6",
|
||||||
|
"name": "DUT Capability flags.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A000F",
|
||||||
|
"defaultValue": "9",
|
||||||
|
"description": "Defines a DSC video mode: 5120x2160 @ 60Hz. Default and only ID: 9.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_DSC_VM_7",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DSC video mode: 5120x2160 @ 60Hz.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0010",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "DUT Capability flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines the CTA resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines the RB1 resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines the RB2 resolution support. Default value: 0."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP20_SINKCTS_DSC_VM_T_7",
|
||||||
|
"name": "DUT Capability flags.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0011",
|
||||||
|
"defaultValue": "10",
|
||||||
|
"description": "Defines a DSC video mode: 5120x2160 @ 120Hz. Default and only ID: 10.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_DSC_VM_8",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DSC video mode: 5120x2160 @ 120Hz.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0012",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "DUT Capability flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines the CTA resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines the RB1 resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines the RB2 resolution support. Default value: 0."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP20_SINKCTS_DSC_VM_T_8",
|
||||||
|
"name": "DUT Capability flags.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0013",
|
||||||
|
"defaultValue": "11",
|
||||||
|
"description": "Defines a DSC video mode: 7680x4320 @ 30Hz. Default and only ID: 11.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_DSC_VM_9",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DSC video mode: 7680x4320 @ 30Hz.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0014",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "DUT Capability flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines the CTA resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines the RB1 resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines the RB2 resolution support. Default value: 0."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP20_SINKCTS_DSC_VM_T_9",
|
||||||
|
"name": "DUT Capability flags.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0015",
|
||||||
|
"defaultValue": "12",
|
||||||
|
"description": "Defines a DSC video mode: 7680x4320 @ 60Hz. Default and only ID: 12.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_DSC_VM_10",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DSC video mode: 7680x4320 @ 60Hz.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0016",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "DUT Capability flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines the CTA resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines the RB1 resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines the RB2 resolution support. Default value: 0."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP20_SINKCTS_DSC_VM_T_10",
|
||||||
|
"name": "DUT Capability flags.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0017",
|
||||||
|
"defaultValue": "13",
|
||||||
|
"description": "Defines a DSC video mode: 7680x4320 @ 100Hz. Default and only ID: 13.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_DSC_VM_11",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DSC video mode: 7680x4320 @ 100Hz.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0018",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "DUT Capability flags.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines the CTA resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines the RB1 resolution support. Default value: 0."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines the RB2 resolution support. Default value: 0."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP20_SINKCTS_DSC_VM_T_11",
|
||||||
|
"name": "DUT Capability flags.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0019",
|
||||||
|
"defaultValue": "1",
|
||||||
|
"description": "Defines the DSC video mode source. Default value is 0. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready.\n",
|
||||||
|
"enumerationVariants": "0 # Use test configuration (below)\n1 # Use sink DUT EDID",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_DSC_SOURCE",
|
||||||
|
"maxValue": 2147480000,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Source of the most packet video modes table",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A001A",
|
||||||
|
"defaultValue": "1",
|
||||||
|
"description": "Defines the Sink DUT support 444 CRC for Simple 422 bitstream. Default value is 1. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready.\n",
|
||||||
|
"enumerationVariants": "0 # YCbCr 422 bitstream\n1 # YCbCr 444 bitstream",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_SUPPORT_444CRC",
|
||||||
|
"maxValue": 2147480000,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Sink DUT support 444 CRC for Simple 422 bitstream.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A001B",
|
||||||
|
"defaultValue": "1",
|
||||||
|
"description": "Defines the Source of the most packet video modes table. Default value is 1. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready.\n",
|
||||||
|
"enumerationVariants": "0 # Use test configuration (below)\n1 # Use sink DUT EDID",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_PACKET_SOURCE",
|
||||||
|
"maxValue": 2147480000,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Source of the most packet video modes table.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A001C",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: CVT 1280 x 800 @ 60p [RB1] 18bpp 99%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_VIDEO_MODE_0",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: CVT 1280 x 800 @ 60p [RB1] 18bpp 99%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A001D",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: DMT 1280 x 768 @ 60p [RB1] 18bpp 95%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_VIDEO_MODE_1",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: DMT 1280 x 768 @ 60p [RB1] 18bpp 95%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A001E",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: DMT 800 x 600 @ 60.317p 30bpp 93%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_VIDEO_MODE_2",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: DMT 800 x 600 @ 60.317p 30bpp 93%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A001F",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: DMT 1024 x 768 @ 60p 18bpp 90%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_VIDEO_MODE_3",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: DMT 1024 x 768 @ 60p 18bpp 90%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0020",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: DMT 1280 x 1024 @ 60p 24bpp 100%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_VIDEO_MODE_4",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: DMT 1280 x 1024 @ 60p 24bpp 100%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0021",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: DMT 1280 x 960 @ 60p 24bpp 100%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_VIDEO_MODE_5",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: DMT 1280 x 960 @ 60p 24bpp 100%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0022",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: DMT 1360 x 768 @ 60p 30bpp 99%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_VIDEO_MODE_6",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: DMT 1360 x 768 @ 60p 30bpp 99%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0023",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: CVT 1280 x 800 @ 60p 30bpp 97%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_VIDEO_MODE_7",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: CVT 1280 x 800 @ 60p 30bpp 97%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0024",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: DMT 1400 x 1050 @ 60p [RB1] 24bpp 94%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_VIDEO_MODE_8",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: DMT 1400 x 1050 @ 60p [RB1] 24bpp 94%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0025",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: DMT 1280 x 768 @ 60p 30bpp 92%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_VIDEO_MODE_9",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: DMT 1280 x 768 @ 60p 30bpp 92%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0026",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: CVT 1600 x 1200 @ 60p [RB1] 18bpp 90%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_VIDEO_MODE_10",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: CVT 1600 x 1200 @ 60p [RB1] 18bpp 90%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0027",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: CVT 2048 x 1536 @ 60p [RB1] 24bpp 97%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_VIDEO_MODE_11",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: CVT 2048 x 1536 @ 60p [RB1] 24bpp 97%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0028",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: DMT 1792 x 1344 @ 60p 24bpp 95%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_VIDEO_MODE_12",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: DMT 1792 x 1344 @ 60p 24bpp 95%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0029",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: DMT 1600 x 1200 @ 60p 30bpp 94%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_VIDEO_MODE_13",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: DMT 1600 x 1200 @ 60p 30bpp 94%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A002A",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: CTA 1440 x 480 @ 59.94p 24bpp 100%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_VIDEO_MODE_14",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: CTA 1440 x 480 @ 59.94p 24bpp 100%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A002B",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: CTA 1440 x 576 @ 50p 24bpp 100%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_VIDEO_MODE_15",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: CTA 1440 x 576 @ 50p 24bpp 100%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A002C",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines support for video mode: CTA 1920 x 1080 @ 60p 30bpp 86%.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_VIDEO_MODE_16",
|
||||||
|
"mask": 1,
|
||||||
|
"name": "Support for video mode: CTA 1920 x 1080 @ 60p 30bpp 86%.",
|
||||||
|
"type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A002D",
|
||||||
|
"defaultValue": "1",
|
||||||
|
"description": "Defines the Skip visual video check during DisplayID CTS tests. Default value is 0. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready.\n",
|
||||||
|
"enumerationVariants": "0 # Never skip\n1 # Skip if CRC matches",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_VISUAL_TEST_CHECK",
|
||||||
|
"maxValue": 2147480000,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Skip visual video check during DisplayID CTS tests.",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A002E",
|
||||||
|
"defaultValue": "0x00000010",
|
||||||
|
"description": "Resolution 1920x1080",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines 1920x1080 @ 30Hz CTA timing support."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines 1920x1080 @ 30Hz RBv1 timing support."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines 1920x1080 @ 30Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00000010", "description": "Defines 1920x1080 @ 60Hz CTA timing support."},
|
||||||
|
{"mask": "0x00000020", "description": "Defines 1920x1080 @ 60Hz RBv1 timing support."},
|
||||||
|
{"mask": "0x00000040", "description": "Defines 1920x1080 @ 60Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00000100", "description": "Defines 1920x1080 @ 120Hz CTA timing support."},
|
||||||
|
{"mask": "0x00000200", "description": "Defines 1920x1080 @ 120Hz RBv1 timing support."},
|
||||||
|
{"mask": "0x00000400", "description": "Defines 1920x1080 @ 120Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00002000", "description": "Defines 1920x1080 @ 144Hz RBv1 timing support.."},
|
||||||
|
{"mask": "0x00004000", "description": "Defines 1920x1080 @ 144Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00008000", "description": "Defines 1920x1080 @ 144Hz OVT timing support."},
|
||||||
|
{"mask": "0x00020000", "description": "Defines 1920x1080 @ 240Hz RBv1 timing support."},
|
||||||
|
{"mask": "0x00040000", "description": "Defines 1920x1080 @ 240Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00080000", "description": "Defines 1920x1080 @ 240Hz OVT timing support."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP20_SINKCTS_VMT_1920_1080",
|
||||||
|
"name": "Resolution supported by Sink DUT",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A002F",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "Resolution 3840x2160",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines 3840x2160 @ 30Hz CTA timing support."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines 3840x2160 @ 30Hz RBv1 timing support."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines 3840x2160 @ 30Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00000010", "description": "Defines 3840x2160 @ 60Hz CTA timing support."},
|
||||||
|
{"mask": "0x00000020", "description": "Defines 3840x2160 @ 60Hz RBv1 timing support."},
|
||||||
|
{"mask": "0x00000040", "description": "Defines 3840x2160 @ 60Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00000100", "description": "Defines 3840x2160 @ 120Hz CTA timing support."},
|
||||||
|
{"mask": "0x00000200", "description": "Defines 3840x2160 @ 120Hz RBv1 timing support."},
|
||||||
|
{"mask": "0x00000400", "description": "Defines 3840x2160 @ 120Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00002000", "description": "Defines 3840x2160 @ 144Hz RBv1 timing support.."},
|
||||||
|
{"mask": "0x00004000", "description": "Defines 3840x2160 @ 144Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00008000", "description": "Defines 3840x2160 @ 144Hz OVT timing support."},
|
||||||
|
{"mask": "0x00020000", "description": "Defines 3840x2160 @ 240Hz RBv1 timing support."},
|
||||||
|
{"mask": "0x00040000", "description": "Defines 3840x2160 @ 240Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00080000", "description": "Defines 3840x2160 @ 240Hz OVT timing support."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP20_SINKCTS_VMT_3840_2160",
|
||||||
|
"name": "Resolution supported by Sink DUT",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0030",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "Resolution 5120x2160",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines 5120x2160 @ 30Hz CTA timing support."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines 5120x2160 @ 30Hz RBv1 timing support."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines 5120x2160 @ 30Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00000010", "description": "Defines 5120x2160 @ 60Hz CTA timing support."},
|
||||||
|
{"mask": "0x00000020", "description": "Defines 5120x2160 @ 60Hz RBv1 timing support."},
|
||||||
|
{"mask": "0x00000040", "description": "Defines 5120x2160 @ 60Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00000100", "description": "Defines 5120x2160 @ 120Hz CTA timing support."},
|
||||||
|
{"mask": "0x00000200", "description": "Defines 5120x2160 @ 120Hz RBv1 timing support."},
|
||||||
|
{"mask": "0x00000400", "description": "Defines 5120x2160 @ 120Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00002000", "description": "Defines 5120x2160 @ 144Hz RBv1 timing support.."},
|
||||||
|
{"mask": "0x00004000", "description": "Defines 5120x2160 @ 144Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00008000", "description": "Defines 5120x2160 @ 144Hz OVT timing support."},
|
||||||
|
{"mask": "0x00020000", "description": "Defines 5120x2160 @ 240Hz RBv1 timing support."},
|
||||||
|
{"mask": "0x00040000", "description": "Defines 5120x2160 @ 240Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00080000", "description": "Defines 5120x2160 @ 240Hz OVT timing support."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP20_SINKCTS_VMT_5120_2160",
|
||||||
|
"name": "Resolution supported by Sink DUT",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0031",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "Resolution 7680x4320",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines 7680x4320 @ 30Hz CTA timing support."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines 7680x4320 @ 30Hz RBv1 timing support."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines 7680x4320 @ 30Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00000010", "description": "Defines 7680x4320 @ 60Hz CTA timing support."},
|
||||||
|
{"mask": "0x00000020", "description": "Defines 7680x4320 @ 60Hz RBv1 timing support."},
|
||||||
|
{"mask": "0x00000040", "description": "Defines 7680x4320 @ 60Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00000100", "description": "Defines 7680x4320 @ 120Hz CTA timing support."},
|
||||||
|
{"mask": "0x00000200", "description": "Defines 7680x4320 @ 120Hz RBv1 timing support."},
|
||||||
|
{"mask": "0x00000400", "description": "Defines 7680x4320 @ 120Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00002000", "description": "Defines 7680x4320 @ 144Hz RBv1 timing support.."},
|
||||||
|
{"mask": "0x00004000", "description": "Defines 7680x4320 @ 144Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00008000", "description": "Defines 7680x4320 @ 144Hz OVT timing support."},
|
||||||
|
{"mask": "0x00020000", "description": "Defines 7680x4320 @ 240Hz RBv1 timing support."},
|
||||||
|
{"mask": "0x00040000", "description": "Defines 7680x4320 @ 240Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00080000", "description": "Defines 7680x4320 @ 240Hz OVT timing support."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP20_SINKCTS_VMT_7680_4320",
|
||||||
|
"name": "Resolution supported by Sink DUT",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0032",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "Resolution 10240x4320",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines 10240x4320 @ 30Hz CTA timing support."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines 10240x4320 @ 30Hz RBv1 timing support."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines 10240x4320 @ 30Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00000010", "description": "Defines 10240x4320 @ 60Hz CTA timing support."},
|
||||||
|
{"mask": "0x00000020", "description": "Defines 10240x4320 @ 60Hz RBv1 timing support."},
|
||||||
|
{"mask": "0x00000040", "description": "Defines 10240x4320 @ 60Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00000100", "description": "Defines 10240x4320 @ 120Hz CTA timing support."},
|
||||||
|
{"mask": "0x00000200", "description": "Defines 10240x4320 @ 120Hz RBv1 timing support."},
|
||||||
|
{"mask": "0x00000400", "description": "Defines 10240x4320 @ 120Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00002000", "description": "Defines 10240x4320 @ 144Hz RBv1 timing support.."},
|
||||||
|
{"mask": "0x00004000", "description": "Defines 10240x4320 @ 144Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00008000", "description": "Defines 10240x4320 @ 144Hz OVT timing support."},
|
||||||
|
{"mask": "0x00020000", "description": "Defines 10240x4320 @ 240Hz RBv1 timing support."},
|
||||||
|
{"mask": "0x00040000", "description": "Defines 10240x4320 @ 240Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00080000", "description": "Defines 10240x4320 @ 240Hz OVT timing support."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP20_SINKCTS_VMT_10240_4320",
|
||||||
|
"name": "Resolution supported by Sink DUT",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0033",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "Resolution 15360x8640",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Defines 15360x8640 @ 30Hz CTA timing support."},
|
||||||
|
{"mask": "0x00000002", "description": "Defines 15360x8640 @ 30Hz RBv1 timing support."},
|
||||||
|
{"mask": "0x00000004", "description": "Defines 15360x8640 @ 30Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00000010", "description": "Defines 15360x8640 @ 60Hz CTA timing support."},
|
||||||
|
{"mask": "0x00000020", "description": "Defines 15360x8640 @ 60Hz RBv1 timing support."},
|
||||||
|
{"mask": "0x00000040", "description": "Defines 15360x8640 @ 60Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00000100", "description": "Defines 15360x8640 @ 120Hz CTA timing support."},
|
||||||
|
{"mask": "0x00000200", "description": "Defines 15360x8640 @ 120Hz RBv1 timing support."},
|
||||||
|
{"mask": "0x00000400", "description": "Defines 15360x8640 @ 120Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00002000", "description": "Defines 15360x8640 @ 144Hz RBv1 timing support.."},
|
||||||
|
{"mask": "0x00004000", "description": "Defines 15360x8640 @ 144Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00008000", "description": "Defines 15360x8640 @ 144Hz OVT timing support."},
|
||||||
|
{"mask": "0x00020000", "description": "Defines 15360x8640 @ 240Hz RBv1 timing support."},
|
||||||
|
{"mask": "0x00040000", "description": "Defines 15360x8640 @ 240Hz RBv2 timing support."},
|
||||||
|
{"mask": "0x00080000", "description": "Defines 15360x8640 @ 240Hz OVT timing support."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_DP20_SINKCTS_VMT_15360_8640",
|
||||||
|
"name": "Resolution supported by Sink DUT",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011A0034",
|
||||||
|
"defaultValue": "0x00000000",
|
||||||
|
"description": "Defines the Debug mode configuration.",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Force video check enabled"}
|
||||||
|
],
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_DP20_SINKCTS_DEBUG_CONF",
|
||||||
|
"name": "Debug mode configuration.",
|
||||||
|
"type": 12
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x18",
|
||||||
|
"name": "DP 2.1 LL CTS",
|
||||||
|
"old_names": [
|
||||||
|
"DP 2.1 LL CTS",
|
||||||
|
"DP 2.0 Link Layer Sink DUT CTS",
|
||||||
|
"DP 2.1 Link Layer Sink DUT CTS"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x11D0000",
|
||||||
|
"defaultValue": "5000",
|
||||||
|
"description": "Defines test timeout in milliseconds, default value is 5000ms.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_USBC_EPR_POWER_SOURCE_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout in milliseconds.",
|
||||||
|
"reportFormat": "Test timeout = %2ms<br>",
|
||||||
|
"type": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x19",
|
||||||
|
"name": "EPR Power Source Tests"
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x11C0000",
|
||||||
|
"defaultValue": "10000",
|
||||||
|
"description": "Defines a test timeout, in milliseconds. Default setting is 10000ms. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_SRCCTS_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x20",
|
||||||
|
"name": "HDMI RX DSC LL CTS",
|
||||||
|
"old_names": [
|
||||||
|
"HDMI LL CTS",
|
||||||
|
"HDMI 2.1 Source DUT DSC Tests"
|
||||||
|
]
|
||||||
|
}
|
||||||
210
UniTAP/dev/modules/dut_tests/cfg/[0x21]snk_dut_hdmi_dsc_cts.json
Normal file
210
UniTAP/dev/modules/dut_tests/cfg/[0x21]snk_dut_hdmi_dsc_cts.json
Normal file
@@ -0,0 +1,210 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x11D0000",
|
||||||
|
"defaultValue": "1",
|
||||||
|
"description": "Defines the Test mode. Default value is 0. Available variants: 0 - Test with CDF and EDID, 1 - Test only with EDID, 2 - Test with VIC selection",
|
||||||
|
"enumerationVariants": "0 # Force VIC output\n1 # CTS test",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_SNKCTS_TEST_MODE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test Mode",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x11D0001",
|
||||||
|
"defaultValue": "10000",
|
||||||
|
"description": "Defines a test timeout, in milliseconds. Default setting is 10000ms. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_SNKCTS_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x11D0002",
|
||||||
|
"defaultValue": "6",
|
||||||
|
"description": "Defines a MAX FRL Rate. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready",
|
||||||
|
"enumerationVariants": "0 # None\n1 # 3G 3 Lane\n2 # 6G 3 Lane\n3 # 6G 4 Lane\n4 # 8G 4 Lane\n5 # 10G 4 Lane\n6 # 12G 4 Lane",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_SNKCTS_MAX_FRL_RATE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Maximum FRL rate",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x11D0003",
|
||||||
|
"defaultValue": "600",
|
||||||
|
"description": "Defines a Sink Max TMDS Clock in MHz. Default setting is 600. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_SNKCTS_MAX_TMDS_CLOCK",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Max TMDS Clock in MHz",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x11D0004",
|
||||||
|
"defaultValue": "0x70",
|
||||||
|
"description": "Defines a DUT capabilies. Default setting is 0x70. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Is Sink DC 30bit. Default value: 0."},
|
||||||
|
{"mask": "0x00000002", "description": "Is Sink DC 36bit. Default value: 0."},
|
||||||
|
{"mask": "0x00000004", "description": "Is Sink DC 48bit. Default value: 0."},
|
||||||
|
{"mask": "0x00000008", "description": "Is Sink DC Y444. Default value: 0."},
|
||||||
|
{"mask": "0x00000010", "description": "Is Sink Supports DSC. Default value: 1."},
|
||||||
|
{"mask": "0x00000020", "description": "Is Sink DSC 10bpc. Default value: 1."},
|
||||||
|
{"mask": "0x00000040", "description": "Is Sink DSC 12bpc. Default value: 1."},
|
||||||
|
{"mask": "0x00000080", "description": "Is Sink DSC Native 420. Default value: 0."},
|
||||||
|
{"mask": "0x00000100", "description": "Is Sink DSC 16bpc. Default value: 0."},
|
||||||
|
{"mask": "0x00000200", "description": "Is Sink Support DSC all bpp. Default value: 0."}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_HDMI_SNKCTS_DUT_CAPS",
|
||||||
|
"name": "DUT Capability flags.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x11D0005",
|
||||||
|
"defaultValue": "6",
|
||||||
|
"description": "Defines a DSC MAX FRL Rate. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready",
|
||||||
|
"enumerationVariants": "0 # None\n1 # 3G 3 Lane\n2 # 6G 3 Lane\n3 # 6G 4 Lane\n4 # 8G 4 Lane\n5 # 10G 4 Lane\n6 # 12G 4 Lane",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_SNKCTS_DSC_MAX_FRL_RATE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Maximum DSC FRL rate",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x11D0006",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines a Sink HF EEODB Support. Default setting is 0. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_SNKCTS_HF_EEODB_SUPPORT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "HF EEODB Support",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x11D0007",
|
||||||
|
"defaultValue": "0x8FF8C600",
|
||||||
|
"description": "Defines a support of DSC Video formats. Default setting is 0x8FF8C600. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000004", "description": "VIC 63 1920x1080 120Hz (16:9)"},
|
||||||
|
{"mask": "0x00000008", "description": "VIC 64 1920x1080 100Hz (16:9)"},
|
||||||
|
{"mask": "0x00000010", "description": "VIC 77 1920x1080 100Hz (64:27)"},
|
||||||
|
{"mask": "0x00000020", "description": "VIC 78 1920x1080 120Hz (64:27)"},
|
||||||
|
{"mask": "0x00000001", "description": "VIC 91 2560x1080 100Hz (64:27)"},
|
||||||
|
{"mask": "0x00000002", "description": "VIC 92 2560x1080 120Hz (64:27)"},
|
||||||
|
{"mask": "0x00000040", "description": "VIC 93 3840x2160 24Hz (16:9)"},
|
||||||
|
{"mask": "0x00000080", "description": "VIC 94 3840x2160 25Hz (16:9)"},
|
||||||
|
{"mask": "0x00000100", "description": "VIC 95 3840x2160 30Hz (16:9)"},
|
||||||
|
{"mask": "0x00000200", "description": "VIC 96 3840x2160 50Hz (16:9)"},
|
||||||
|
{"mask": "0x00000400", "description": "VIC 97 3840x2160 60Hz (16:9)"},
|
||||||
|
{"mask": "0x00000800", "description": "VIC 98 4096x2160 24Hz (256:135)"},
|
||||||
|
{"mask": "0x00001000", "description": "VIC 99 4096x2160 25Hz (256:135)"},
|
||||||
|
{"mask": "0x00002000", "description": "VIC 100 4096x2160 30Hz (256:135)"},
|
||||||
|
{"mask": "0x00004000", "description": "VIC 101 4096x2160 50Hz (256:135)"},
|
||||||
|
{"mask": "0x00008000", "description": "VIC 102 4096x2160 60Hz (256:135)"},
|
||||||
|
{"mask": "0x00010000", "description": "VIC 103 3840x2160 24Hz (64:27)"},
|
||||||
|
{"mask": "0x00020000", "description": "VIC 104 3840x2160 25Hz (64:27)"},
|
||||||
|
{"mask": "0x00040000", "description": "VIC 105 3840x2160 30Hz (64:27)"},
|
||||||
|
{"mask": "0x00080000", "description": "VIC 106 3840x2160 50Hz (64:27)"},
|
||||||
|
{"mask": "0x00100000", "description": "VIC 107 3840x2160 60Hz (64:27)"},
|
||||||
|
{"mask": "0x00200000", "description": "VIC 114 3840x2160 48Hz (16:9)"},
|
||||||
|
{"mask": "0x00400000", "description": "VIC 115 4096x2160 48Hz (256:135)"},
|
||||||
|
{"mask": "0x00800000", "description": "VIC 116 3840x2160 48Hz (64:27)"},
|
||||||
|
{"mask": "0x01000000", "description": "VIC 117 3840x2160 100Hz (64:27)"},
|
||||||
|
{"mask": "0x02000000", "description": "VIC 118 3840x2160 120Hz (64:27)"},
|
||||||
|
{"mask": "0x04000000", "description": "VIC 119 3840x2160 100Hz (64:27)"},
|
||||||
|
{"mask": "0x08000000", "description": "VIC 120 3840x2160 120Hz (64:27)"},
|
||||||
|
{"mask": "0x10000000", "description": "VIC 121 5120x2160 24Hz (64:27)"},
|
||||||
|
{"mask": "0x20000000", "description": "VIC 122 5120x2160 25Hz (64:27)"},
|
||||||
|
{"mask": "0x40000000", "description": "VIC 123 5120x2160 30Hz (64:27)"},
|
||||||
|
{"mask": "0x80000000", "description": "VIC 124 5120x2160 48Hz (64:27)"}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_HDMI_SNKCTS_DSC_VIDEO_FORMAT",
|
||||||
|
"name": "DSC Video formats 1.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x11D0008",
|
||||||
|
"defaultValue": "0x3000000F",
|
||||||
|
"description": "Defines a support of DSC Video formats 2. Default setting is 0x3000000F. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "VIC 125 5120x2160 50Hz (64:27)"},
|
||||||
|
{"mask": "0x00000002", "description": "VIC 126 5120x2160 60Hz (64:27)"},
|
||||||
|
{"mask": "0x00000004", "description": "VIC 127 5120x2160 100Hz (64:27)"},
|
||||||
|
{"mask": "0x00000008", "description": "VIC 193 5120x2160 120Hz (64:27)"},
|
||||||
|
{"mask": "0x00000010", "description": "VIC 194 7680x4320 24Hz (16:9)"},
|
||||||
|
{"mask": "0x00000020", "description": "VIC 195 7680x4320 25Hz (16:9)"},
|
||||||
|
{"mask": "0x00000040", "description": "VIC 196 7680x4320 30Hz (16:9)"},
|
||||||
|
{"mask": "0x00000080", "description": "VIC 197 7680x4320 48Hz (16:9)"},
|
||||||
|
{"mask": "0x00000100", "description": "VIC 198 7680x4320 50Hz (16:9)"},
|
||||||
|
{"mask": "0x00000200", "description": "VIC 199 7680x4320 60Hz (16:9)"},
|
||||||
|
{"mask": "0x00000400", "description": "VIC 200 7680x4320 100Hz (16:9)"},
|
||||||
|
{"mask": "0x00000800", "description": "VIC 201 7680x4320 120Hz (16:9)"},
|
||||||
|
{"mask": "0x00001000", "description": "VIC 202 7680x4320 24Hz (64:27)"},
|
||||||
|
{"mask": "0x00002000", "description": "VIC 203 7680x4320 25Hz (64:27)"},
|
||||||
|
{"mask": "0x00004000", "description": "VIC 204 7680x4320 30Hz (64:27)"},
|
||||||
|
{"mask": "0x00008000", "description": "VIC 205 7680x4320 48Hz (64:27)"},
|
||||||
|
{"mask": "0x00010000", "description": "VIC 206 7680x4320 50Hz (64:27)"},
|
||||||
|
{"mask": "0x00020000", "description": "VIC 207 7680x4320 60Hz (64:27)"},
|
||||||
|
{"mask": "0x00040000", "description": "VIC 208 7680x4320 100Hz (64:27)"},
|
||||||
|
{"mask": "0x00080000", "description": "VIC 209 7680x4320 120Hz (64:27)"},
|
||||||
|
{"mask": "0x00100000", "description": "VIC 210 10240x4320 24Hz (64:27)"},
|
||||||
|
{"mask": "0x00200000", "description": "VIC 211 10240x4320 25Hz (64:27)"},
|
||||||
|
{"mask": "0x00400000", "description": "VIC 212 10240x4320 30Hz (64:27)"},
|
||||||
|
{"mask": "0x00800000", "description": "VIC 213 10240x4320 48Hz (64:27)"},
|
||||||
|
{"mask": "0x01000000", "description": "VIC 214 10240x4320 50Hz (64:27)"},
|
||||||
|
{"mask": "0x02000000", "description": "VIC 215 10240x4320 60Hz (64:27)"},
|
||||||
|
{"mask": "0x04000000", "description": "VIC 216 10240x4320 100Hz (64:27)"},
|
||||||
|
{"mask": "0x08000000", "description": "VIC 217 10240x4320 120Hz (64:27)"},
|
||||||
|
{"mask": "0x10000000", "description": "VIC 218 4096x2160 100Hz (256:135)"},
|
||||||
|
{"mask": "0x20000000", "description": "VIC 219 4096x2160 120Hz (256:135)"}
|
||||||
|
],
|
||||||
|
"flag": 1,
|
||||||
|
"id": "TSI_HDMI_SNKCTS_DSC_VIDEO_FORMAT_2",
|
||||||
|
"name": "DSC Video formats 2.",
|
||||||
|
"type": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x11D0009",
|
||||||
|
"defaultValue": "4",
|
||||||
|
"description": "Defines a maxumim DSC slice number. Default setting is 4. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready",
|
||||||
|
"enumerationVariants": "0 # 0 (DSC 1.2a is not supported)\n1 # 1 (up to 1 slice and 340MHz per slice)\n2 # 2 (up to 2 slices and 340MHz per slice)\n3 # 3 (up to 4 slices and 340MHz per slice)\n4 # 4 (up to 8 slices and 340MHz per slice)\n5 # 5 (up to 8 slices and 400MHz per slice)\n6 # 6 (up to 12 slices and 400MHz per slice)\n7 # 7 (up to 16 slices and 600MHz per slice)",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_SNKCTS_DSC_MAX_SLICES",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DSC Max Slices",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x11D000A",
|
||||||
|
"defaultValue": "11",
|
||||||
|
"description": "Defines a total DSC chunk size in KBytes. Default setting is 11. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_SNKCTS_DSC_TOTAL_CHUNK_BYTES",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "DSC Max Slices",
|
||||||
|
"type": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x21",
|
||||||
|
"name": "HDMI TX DSC LL CTS",
|
||||||
|
"old_names": [
|
||||||
|
"HDMI LL CTS",
|
||||||
|
"HDMI 2.1 Sink DUT DSC Tests"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x011E0000",
|
||||||
|
"defaultValue": "60",
|
||||||
|
"description": "Total test time in seconds. Default value is 60s.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_SNKCTS_TEST_TIME",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Total test time, in seconds",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011E0001",
|
||||||
|
"defaultValue": "1",
|
||||||
|
"description": "Check status period in seconds. Default value is 1s.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_SNKCTS_STATUS_PERIOD",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Period, in seconds",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011E0002",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Stop testing when status fail",
|
||||||
|
"flag": 3,
|
||||||
|
"enumerationVariants": "0 # False\n1 # True",
|
||||||
|
"id": "TSI_HDMI_SNKCTS_STOP_TESTING",
|
||||||
|
"name": "Stop testing when status fail",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011E0003",
|
||||||
|
"defaultValue": "1",
|
||||||
|
"description": "Enable to check SCDC version",
|
||||||
|
"flag": 3,
|
||||||
|
"enumerationVariants": "0 # False\n1 # True",
|
||||||
|
"id": "TSI_HDMI_SNKCTS_SCDC_VERSION",
|
||||||
|
"name": "Enable to check SCDC version",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011E0004",
|
||||||
|
"defaultValue": "1",
|
||||||
|
"description": "Enable to check SCDC status flag",
|
||||||
|
"flag": 3,
|
||||||
|
"enumerationVariants": "0 # False\n1 # True",
|
||||||
|
"id": "TSI_HDMI_SNKCTS_SCDC_STATUS",
|
||||||
|
"name": "Enable to check SCDC status flag ",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011E0005",
|
||||||
|
"defaultValue": "1",
|
||||||
|
"description": "Enable to check SCDC error counters",
|
||||||
|
"flag": 3,
|
||||||
|
"enumerationVariants": "0 # False\n1 # True",
|
||||||
|
"id": "TSI_HDMI_SNKCTS_SCDC_ERROR",
|
||||||
|
"name": "Enable to check SCDC error counters",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x011E0006",
|
||||||
|
"defaultValue": "10",
|
||||||
|
"description": "SDCD error counter fail threshold. Default value is 10.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_SNKCTS_SCDC_ERROR_COUNTER",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "SDCD error counter fail threshold",
|
||||||
|
"type": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x22",
|
||||||
|
"name": "Connection Test"
|
||||||
|
}
|
||||||
172
UniTAP/dev/modules/dut_tests/cfg/[0x23]snk_dut_hdmi_gaming.json
Normal file
172
UniTAP/dev/modules/dut_tests/cfg/[0x23]snk_dut_hdmi_gaming.json
Normal file
@@ -0,0 +1,172 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x2100",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Does the Sink support Fast Vactive (FVA), also known as Quick Frame Transport (QFT)?",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_GAMING_FVA",
|
||||||
|
"maxValue": 1,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Sink_Supports_FVA",
|
||||||
|
"type": 3,
|
||||||
|
"enumerationVariants": "0 # NO\n1 # YES"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x2101",
|
||||||
|
"defaultValue": "1",
|
||||||
|
"description": "Does the Sink support Variable Refresh Rate (VRR)",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_GAMING_VRR",
|
||||||
|
"maxValue": 1,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Sink_Supports_VRR",
|
||||||
|
"type": 3,
|
||||||
|
"enumerationVariants": "0 # NO\n1 # YES"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x2102",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Does the Sink support Negative Mvrr values?",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_GAMING_NMVRR",
|
||||||
|
"maxValue": 1,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Sink_Supports_Negative_MVRR",
|
||||||
|
"type": 3,
|
||||||
|
"enumerationVariants": "0 # NO\n1 # YES"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x2103",
|
||||||
|
"defaultValue": "40",
|
||||||
|
"description": "What is the Sink’s supported VRR Range? Minimum value.\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_GAMING_RANGE_MIN",
|
||||||
|
"maxValue": 480,
|
||||||
|
"minValue": 20,
|
||||||
|
"name": "Sink_Supported_VRR_Range VRRMIN",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x2104",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "What is the Sink’s supported VRR Range? Maximum value or BRR\n",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_GAMING_RANGE_MAX",
|
||||||
|
"maxValue": 480,
|
||||||
|
"minValue": 20,
|
||||||
|
"name": "Sink_Supported_VRR_Range VRRMAX or 0 for BRR",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x2105",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Does the Sink implement Auto Low-Latency Mode (ALLM)?",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_GAMING_ALLM",
|
||||||
|
"maxValue": 1,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Sink_Supports_ALLM",
|
||||||
|
"type": 3,
|
||||||
|
"enumerationVariants": "0 # NO\n1 # YES"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x2106",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Which display processing mode is the preferred mode with normal latency?",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_GAMING_NLM",
|
||||||
|
"maxValue": 2,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Sink_Preferred_NLM",
|
||||||
|
"type": 4,
|
||||||
|
"enumerationVariants": "0 # Cinema\n1 # Vivid\n2 # Normal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x2107",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Which display processing mode is the preferred mode to minimize latency?",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_GAMING_LLM",
|
||||||
|
"maxValue": 1,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Sink_Preferred_LLM",
|
||||||
|
"type": 4,
|
||||||
|
"enumerationVariants": "0 # Game\n1 # PC"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x2108",
|
||||||
|
"defaultValue": "1",
|
||||||
|
"description": "Does the Sink DUT support QMS-VRR?",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_GAMING_QMS",
|
||||||
|
"maxValue": 1,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Sink_QMS_VRR_Supported",
|
||||||
|
"type": 3,
|
||||||
|
"enumerationVariants": "0 # NO\n1 # YES"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x2109",
|
||||||
|
"defaultValue": "97",
|
||||||
|
"description": "What is the highest resolution (i.e., width x height) and base refresh rate (BRR) for which all TFRs up to Sink_QMS_Max_TFR_TMDS are supported by the Sink using TMDS?",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_GAMING_VIDEO_TMDS",
|
||||||
|
"maxValue": 255,
|
||||||
|
"minValue": 16,
|
||||||
|
"name": "Sink_QMS_Video_Format_TMDS",
|
||||||
|
"type": 4,
|
||||||
|
"enumerationVariants": "78 # VIC=78; 1920x1080@120\n97 # VIC=97; 3840x2160@60"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x210A",
|
||||||
|
"defaultValue": "118",
|
||||||
|
"description": "What is the highest resolution (i.e., width x height) and base refresh rate (BRR) for which all TFRs up to Sink_QMS_Max_TFR_FRL are supported by the Sink using FRL?",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_GAMING_VIDEO_FRL",
|
||||||
|
"maxValue": 255,
|
||||||
|
"minValue": 16,
|
||||||
|
"name": "Sink_QMS_Video_Format_FRL",
|
||||||
|
"type": 4,
|
||||||
|
"enumerationVariants": "0 # N/A\n78 # VIC=78; 1920x1080@120\n97 # VIC=97; 3840x2160@60\n118 # VIC=118; 3840x2160@120"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x210B",
|
||||||
|
"defaultValue": "1",
|
||||||
|
"description": "If the Sink DUT supports QMS-VRR, what is the minimum Next_TFR value supported? (Refer to the Next_TFR field definition in HDMI 2.1a Table 10-37.)",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_GAMING_MIN_TFR",
|
||||||
|
"maxValue": 13,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Sink_QMS_Min_TFR",
|
||||||
|
"type": 4,
|
||||||
|
"enumerationVariants": "0 # N/A\n1 # TFR=1; 24/1.001\n2 # TFR=2; 24\n3 # TFR=3; 25\n4 # TFR=4; 30/1.001\n5 # TFR=5; 30\n6 # TFR=6; 48/1.001\n7 # TFR=7; 48\n8 # TFR=8; 50\n9 # TFR=9; 60/1.001\n10 # TFR=10; 60\n11 # TFR=11; 100\n12 # TFR=12; 120/1.001\n13 # TFR=13; 120"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x210C",
|
||||||
|
"defaultValue": "10",
|
||||||
|
"description": "If the Sink DUT supports QMS-VRR, what is the maximum Next_TFR value supported using TMDS? (Refer to the Next_TFR field definition in HDMI 2.1a Table 10-37.)",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_GAMING_MAX_TFR_TMDS",
|
||||||
|
"maxValue": 13,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Sink_QMS_Max_TFR_TMDS",
|
||||||
|
"type": 4,
|
||||||
|
"enumerationVariants": "0 # N/A\n1 # TFR=1; 24/1.001\n2 # TFR=2; 24\n3 # TFR=3; 25\n4 # TFR=4; 30/1.001\n5 # TFR=5; 30\n6 # TFR=6; 48/1.001\n7 # TFR=7; 48\n8 # TFR=8; 50\n9 # TFR=9; 60/1.001\n10 # TFR=10; 60\n11 # TFR=11; 100\n12 # TFR=12; 120/1.001\n13 # TFR=13; 120"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x210D",
|
||||||
|
"defaultValue": "13",
|
||||||
|
"description": "If the Sink DUT supports QMS-VRR, what is the maximum Next_TFR value supported using FRL? (Refer to the Next_TFR field definition in HDMI 2.1a Table 10-37.)",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_GAMING_MAX_TFR_FRL",
|
||||||
|
"maxValue": 13,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Sink_QMS_Max_TFR_FRL",
|
||||||
|
"type": 4,
|
||||||
|
"enumerationVariants": "0 # N/A\n1 # TFR=1; 24/1.001\n2 # TFR=2; 24\n3 # TFR=3; 25\n4 # TFR=4; 30/1.001\n5 # TFR=5; 30\n6 # TFR=6; 48/1.001\n7 # TFR=7; 48\n8 # TFR=8; 50\n9 # TFR=9; 60/1.001\n10 # TFR=10; 60\n11 # TFR=11; 100\n12 # TFR=12; 120/1.001\n13 # TFR=13; 120"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x23",
|
||||||
|
"name": "HDMI CTS MOI (VRR-QMS)"
|
||||||
|
}
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x11F0000",
|
||||||
|
"defaultValue": "120",
|
||||||
|
"description": "Defines a test timeout, in seconds. Default setting is 120s. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_SNKCTS_CABLE_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout, in seconds",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x11F0001",
|
||||||
|
"defaultValue": "2",
|
||||||
|
"description": "Defines a Cable test mode. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready",
|
||||||
|
"enumerationVariants": "0 # High speed\n1 # Low speed\n2 # All",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_SNKCTS_CABLE_TEST_MODE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Cable test mode",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x11F0002",
|
||||||
|
"defaultValue": "1",
|
||||||
|
"description": "Defines a MIN FRL Rate. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready",
|
||||||
|
"enumerationVariants": "0 # None\n1 # 3G 3 Lane\n2 # 6G 3 Lane\n3 # 6G 4 Lane\n4 # 8G 4 Lane\n5 # 10G 4 Lane\n6 # 12G 4 Lane",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_SNKCTS_CABLE_MIN_FRL_RATE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Minimum FRL rate",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x11F0003",
|
||||||
|
"defaultValue": "6",
|
||||||
|
"description": "Defines a MAX FRL Rate. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready",
|
||||||
|
"enumerationVariants": "0 # None\n1 # 3G 3 Lane\n2 # 6G 3 Lane\n3 # 6G 4 Lane\n4 # 8G 4 Lane\n5 # 10G 4 Lane\n6 # 12G 4 Lane",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_SNKCTS_CABLE_MAX_FRL_RATE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Maximum FRL rate",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x11F0004",
|
||||||
|
"defaultValue": "10",
|
||||||
|
"description": "Threshold of allowed errors per lane. Default setting is 10. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_SNKCTS_CABLE_ERROR_PER_LANE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Threshold of allowed errors per lane",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x11F0005",
|
||||||
|
"defaultValue": "5",
|
||||||
|
"description": "Defines a timeout for capturing errors, in seconds. Default setting is 5s. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_SNKCTS_CABLE_CAPTURE_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Timeout for capturing errors, in seconds",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x11F0006",
|
||||||
|
"defaultValue": "0x1F",
|
||||||
|
"description": "Defines a Low Speed Line selection. Default setting is 0x1F. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready",
|
||||||
|
"bitList":
|
||||||
|
[
|
||||||
|
{"mask": "0x00000001", "description": "Enable HPD line test."},
|
||||||
|
{"mask": "0x00000002", "description": "Enable I2C line test."},
|
||||||
|
{"mask": "0x00000004", "description": "Enable CEC line test."},
|
||||||
|
{"mask": "0x00000008", "description": "Enable 5V line test."},
|
||||||
|
{"mask": "0x00000010", "description": "Enable utility line test."}
|
||||||
|
],
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_SNKCTS_CABLE_LOW_SPEED_LINE",
|
||||||
|
"name": "Low Speed Line Select",
|
||||||
|
"type": 12
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x24",
|
||||||
|
"name": "Cable Test",
|
||||||
|
"old_names": [
|
||||||
|
"HDMI LL CTS",
|
||||||
|
"HDMI Sink Cable Tests"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x1200000",
|
||||||
|
"defaultValue": "30000",
|
||||||
|
"description": "Defines test timeout in milliseconds, default value is 30000ms.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_HDCP_1A_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x25",
|
||||||
|
"name": "HDMI HDCP 2.3 CTS 1A",
|
||||||
|
"old_names": [
|
||||||
|
"HDMI HDCP 2.3 CTS 1A Test Set"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x1210000",
|
||||||
|
"defaultValue": "30000",
|
||||||
|
"description": "Defines test timeout in milliseconds, default value is 30000ms.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_HDCP_1B_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x26",
|
||||||
|
"name": "HDMI HDCP 2.3 CTS 1B",
|
||||||
|
"old_names": [
|
||||||
|
"HDMI HDCP 2.3 CTS 1B Test Set"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x1220000",
|
||||||
|
"defaultValue": "30000",
|
||||||
|
"description": "Defines test timeout in milliseconds, default value is 30000ms.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_HDCP_2C_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1220001",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines a flag to do or not link training before starting test, default value is 0.",
|
||||||
|
"enumerationVariants": "0 # NO\n1 # YES",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_HDCP_2C_LT_BEFORE_TEST",
|
||||||
|
"name": "Link training before starting test",
|
||||||
|
"type": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"configId": "0x1220002",
|
||||||
|
"defaultValue": "0",
|
||||||
|
"description": "Defines a Link rate for link training. Important: This CI is still potential subject for changes due to the CTS specification not being officially ready",
|
||||||
|
"enumerationVariants": "0 # TMDS mode\n1 # 3G 3 Lane\n2 # 6G 3 Lane\n3 # 6G 4 Lane\n4 # 8G 4 Lane\n5 # 10G 4 Lane\n6 # 12G 4 Lane",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_HDCP_2C_LINK_RATE",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Link rate for link training",
|
||||||
|
"type": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x27",
|
||||||
|
"name": "HDMI HDCP 2.3 CTS 2C",
|
||||||
|
"old_names": [
|
||||||
|
"HDMI HDCP 2.3 CTS 2C Test Set"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x1230000",
|
||||||
|
"defaultValue": "30000",
|
||||||
|
"description": "Defines test timeout in milliseconds, default value is 30000ms.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_HDCP_3A_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x28",
|
||||||
|
"name": "HDMI HDCP 2.3 CTS 3A",
|
||||||
|
"old_names": [
|
||||||
|
"HDMI HDCP 2.3 CTS 3A Test Set"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x1240000",
|
||||||
|
"defaultValue": "30000",
|
||||||
|
"description": "Defines test timeout in milliseconds, default value is 30000ms.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_HDCP_3B_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x29",
|
||||||
|
"name": "HDMI HDCP 2.3 CTS 3B",
|
||||||
|
"old_names": [
|
||||||
|
"HDMI HDCP 2.3 CTS 3B Test Set"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"descriptions": [
|
||||||
|
{
|
||||||
|
"configId": "0x1250000",
|
||||||
|
"defaultValue": "30000",
|
||||||
|
"description": "Defines test timeout in milliseconds, default value is 30000ms.",
|
||||||
|
"flag": 3,
|
||||||
|
"id": "TSI_HDMI_HDCP_3C_TIMEOUT",
|
||||||
|
"maxValue": 2147483647,
|
||||||
|
"minValue": 0,
|
||||||
|
"name": "Test timeout, in milliseconds",
|
||||||
|
"type": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"id": "0x2A",
|
||||||
|
"name": "HDMI HDCP 2.3 CTS 3C",
|
||||||
|
"old_names": [
|
||||||
|
"HDMI HDCP 2.3 CTS 3C Test Set"
|
||||||
|
]
|
||||||
|
}
|
||||||
BIN
UniTAP/dev/modules/dut_tests/cfg/hdr10/hdr10_edid.bin
Normal file
BIN
UniTAP/dev/modules/dut_tests/cfg/hdr10/hdr10_edid.bin
Normal file
Binary file not shown.
BIN
UniTAP/dev/modules/dut_tests/cfg/hdr10/sstm_edid.bin
Normal file
BIN
UniTAP/dev/modules/dut_tests/cfg/hdr10/sstm_edid.bin
Normal file
Binary file not shown.
BIN
UniTAP/dev/modules/dut_tests/cfg/hdr10/sstm_edid1_0.bin
Normal file
BIN
UniTAP/dev/modules/dut_tests/cfg/hdr10/sstm_edid1_0.bin
Normal file
Binary file not shown.
BIN
UniTAP/dev/modules/dut_tests/cfg/hdr10/sstm_edid5_1.bin
Normal file
BIN
UniTAP/dev/modules/dut_tests/cfg/hdr10/sstm_edid5_1.bin
Normal file
Binary file not shown.
BIN
UniTAP/dev/modules/dut_tests/cfg/hdr10/sstm_edid7_2.bin
Normal file
BIN
UniTAP/dev/modules/dut_tests/cfg/hdr10/sstm_edid7_2.bin
Normal file
Binary file not shown.
BIN
UniTAP/dev/modules/dut_tests/cfg/hdr10/sstm_edid9_3.bin
Normal file
BIN
UniTAP/dev/modules/dut_tests/cfg/hdr10/sstm_edid9_3.bin
Normal file
Binary file not shown.
BIN
UniTAP/dev/modules/dut_tests/cfg/hdr10/vsif1.bin
Normal file
BIN
UniTAP/dev/modules/dut_tests/cfg/hdr10/vsif1.bin
Normal file
Binary file not shown.
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
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user