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 SspeCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("sspe", core, parent)
[docs]
def set(self, search: str, chk_spcl_pkt: bool) -> None:
"""
``SEARch:TRIGger:USB:SSPE`` \n
Snippet: ``driver.search.trigger.usb.sspe.set(search = 'abc', chk_spcl_pkt = False)`` \n
Defines, whether the search for any special PID packet shall be activated or not.
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('chk_spcl_pkt', chk_spcl_pkt, DataType.Boolean))
self._core.io.write(f'SEARch:TRIGger:USB:SSPE {param}'.rstrip())
[docs]
def get(self, search: str) -> bool:
"""
``SEARch:TRIGger:USB:SSPE`` \n
Snippet: ``value: bool = driver.search.trigger.usb.sspe.get(search = 'abc')`` \n
Defines, whether the search for any special PID packet shall be activated or not.
:param search: OFF | ON
"""
param = Conversions.value_to_quoted_str(search)
response = self._core.io.query_str(f'SEARch:TRIGger:USB:SSPE? {param}')
return Conversions.str_to_bool(response)