from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from .....Internal.Types import DataType
from .....Internal.ArgSingleList import ArgSingleList
from .....Internal.ArgSingle import ArgSingle
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class DptoCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("dpto", core, parent)
[docs]
def set(self, search: str, data_position_to: int) -> None:
"""
``SEARch:TRIGger:FLXRay:DPTO`` \n
Snippet: ``driver.search.trigger.flxRay.dpto.set(search = 'abc', data_position_to = 1)`` \n
Defines the last byte of interest, if the position operator method ``RsRtx.search.trigger.flxRay.dpoperator.set()``
defines a range.
:param data_position_to: 0 to 255
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('data_position_to', data_position_to, DataType.Integer))
self._core.io.write(f'SEARch:TRIGger:FLXRay:DPTO {param}'.rstrip())
[docs]
def get(self, search: str) -> int:
"""
``SEARch:TRIGger:FLXRay:DPTO`` \n
Snippet: ``value: int = driver.search.trigger.flxRay.dpto.get(search = 'abc')`` \n
Defines the last byte of interest, if the position operator method ``RsRtx.search.trigger.flxRay.dpoperator.set()``
defines a range.
:return: data_position_to: 0 to 255
"""
param = Conversions.value_to_quoted_str(search)
response = self._core.io.query_str(f'SEARch:TRIGger:FLXRay:DPTO? {param}')
return Conversions.str_to_int(response)