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
from ..... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class DpoperatorCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("dpoperator", core, parent)
[docs]
def set(self, search: str, optor_posi: enums.DataIndexOperator) -> None:
"""
``SEARch:TRIGger:USB:DPOPerator`` \n
Snippet: ``driver.search.trigger.usb.dpoperator.set(search = 'abc', optor_posi = enums.DataIndexOperator.ANY)`` \n
Sets the operator (any or equal) for the payload data index position.
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('optor_posi', optor_posi, DataType.Enum, enums.DataIndexOperator))
self._core.io.write(f'SEARch:TRIGger:USB:DPOPerator {param}'.rstrip())
# noinspection PyTypeChecker
[docs]
def get(self, search: str) -> enums.DataIndexOperator:
"""
``SEARch:TRIGger:USB:DPOPerator`` \n
Snippet: ``value: enums.DataIndexOperator = driver.search.trigger.usb.dpoperator.get(search = 'abc')`` \n
Sets the operator (any or equal) for the payload data index position.
:param search: ANY | OFF | EQUal \n
- ANY = OFF: The position of payload data is not relevant for the search condition.
"""
param = Conversions.value_to_quoted_str(search)
response = self._core.io.query_str(f'SEARch:TRIGger:USB:DPOPerator? {param}')
return Conversions.str_to_scalar_enum(response, enums.DataIndexOperator)