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 CrcErrorCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("crcError", core, parent)
[docs]
def set(self, search: str, crc_error: bool) -> None:
"""
``SEARch:TRIGger:SENT:CRCerror`` \n
Snippet: ``driver.search.trigger.sent.crcError.set(search = 'abc', crc_error = False)`` \n
Enables the search for errors in the Cyclic Redundancy Check. To initially enable the search for an error event, set
method ``RsRtx.search.trigger.sent.error.set()`` to ON.
:param crc_error: OFF | ON
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('crc_error', crc_error, DataType.Boolean))
self._core.io.write(f'SEARch:TRIGger:SENT:CRCerror {param}'.rstrip())
[docs]
def get(self, search: str) -> bool:
"""
``SEARch:TRIGger:SENT:CRCerror`` \n
Snippet: ``value: bool = driver.search.trigger.sent.crcError.get(search = 'abc')`` \n
Enables the search for errors in the Cyclic Redundancy Check. To initially enable the search for an error event, set
method ``RsRtx.search.trigger.sent.error.set()`` to ON.
:return: crc_error: OFF | ON
"""
param = Conversions.value_to_quoted_str(search)
response = self._core.io.query_str(f'SEARch:TRIGger:SENT:CRCerror? {param}')
return Conversions.str_to_bool(response)