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 CrcCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("crc", core, parent)
[docs]
def set(self, search: str, error_bad_crc_16: bool) -> None:
"""
``SEARch:TRIGger:PCIE:ERRC:CRC`` \n
Snippet: ``driver.search.trigger.pcie.errc.crc.set(search = 'abc', error_bad_crc_16 = False)`` \n
Enables searching for 16-bit cyclic redundancy check (CRC) errors.
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('error_bad_crc_16', error_bad_crc_16, DataType.Boolean))
self._core.io.write(f'SEARch:TRIGger:PCIE:ERRC:CRC {param}'.rstrip())
[docs]
def get(self, search: str) -> bool:
"""
``SEARch:TRIGger:PCIE:ERRC:CRC`` \n
Snippet: ``value: bool = driver.search.trigger.pcie.errc.crc.get(search = 'abc')`` \n
Enables searching for 16-bit cyclic redundancy check (CRC) errors.
:param search: OFF | ON
"""
param = Conversions.value_to_quoted_str(search)
response = self._core.io.query_str(f'SEARch:TRIGger:PCIE:ERRC:CRC? {param}')
return Conversions.str_to_bool(response)