Source code for rsrtx.Implementations.Search.Trigger.Sent.Error

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 ErrorCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("error", core, parent)

[docs] def set(self, search: str, chk_err_cond: bool) -> None: """ ``SEARch:TRIGger:SENT:ERRor`` \n Snippet: ``driver.search.trigger.sent.error.set(search = 'abc', chk_err_cond = False)`` \n Enables the search for specified errors. Define the error types with method ``RsRtx.search.trigger.sent.pulseError.set()`` , method ``RsRtx.search.trigger.sent.pperiodError.set()`` , method ``RsRtx.search.trigger.sent.formError.set()`` and method ``RsRtx.search.trigger.sent.crcError.set()`` . """ param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('chk_err_cond', chk_err_cond, DataType.Boolean)) self._core.io.write(f'SEARch:TRIGger:SENT:ERRor {param}'.rstrip())
[docs] def get(self, search: str) -> bool: """ ``SEARch:TRIGger:SENT:ERRor`` \n Snippet: ``value: bool = driver.search.trigger.sent.error.get(search = 'abc')`` \n Enables the search for specified errors. Define the error types with method ``RsRtx.search.trigger.sent.pulseError.set()`` , method ``RsRtx.search.trigger.sent.pperiodError.set()`` , method ``RsRtx.search.trigger.sent.formError.set()`` and method ``RsRtx.search.trigger.sent.crcError.set()`` . :param search: OFF | ON """ param = Conversions.value_to_quoted_str(search) response = self._core.io.query_str(f'SEARch:TRIGger:SENT:ERRor? {param}') return Conversions.str_to_bool(response)