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 DlcCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("dlc", core, parent)
[docs]
def set(self, search: str, error_dlc: bool) -> None:
"""
``SEARch:TRIGger:CXPI:ERRor:DLC`` \n
Snippet: ``driver.search.trigger.cxpi.error.dlc.set(search = 'abc', error_dlc = False)`` \n
Searches for a data length code error, if method ``RsRtx.search.trigger.cxpi.typePy.set()`` is set to ERRor.
:param error_dlc: OFF | ON
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('error_dlc', error_dlc, DataType.Boolean))
self._core.io.write(f'SEARch:TRIGger:CXPI:ERRor:DLC {param}'.rstrip())
[docs]
def get(self, search: str) -> bool:
"""
``SEARch:TRIGger:CXPI:ERRor:DLC`` \n
Snippet: ``value: bool = driver.search.trigger.cxpi.error.dlc.get(search = 'abc')`` \n
Searches for a data length code error, if method ``RsRtx.search.trigger.cxpi.typePy.set()`` is set to ERRor.
:return: error_dlc: OFF | ON
"""
param = Conversions.value_to_quoted_str(search)
response = self._core.io.query_str(f'SEARch:TRIGger:CXPI:ERRor:DLC? {param}')
return Conversions.str_to_bool(response)