Source code for rsrtx.Implementations.Search.Trigger.Lin.Dlength

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

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

[docs] def set(self, search: str, word_count: int) -> None: """ ``SEARch:TRIGger:LIN:DLENgth`` \n Snippet: ``driver.search.trigger.lin.dlength.set(search = 'abc', word_count = 1)`` \n Sets the length of the bit pattern to be found, in bytes. For complete definition, set the operator using method ``RsRtx.search.trigger.lin.dleCondition.set()`` , and the transfer direction with method ``RsRtx.search.trigger.lin.border.set()`` . :param word_count: 1 to 8 """ param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('word_count', word_count, DataType.Integer)) self._core.io.write(f'SEARch:TRIGger:LIN:DLENgth {param}'.rstrip())
[docs] def get(self, search: str) -> int: """ ``SEARch:TRIGger:LIN:DLENgth`` \n Snippet: ``value: int = driver.search.trigger.lin.dlength.get(search = 'abc')`` \n Sets the length of the bit pattern to be found, in bytes. For complete definition, set the operator using method ``RsRtx.search.trigger.lin.dleCondition.set()`` , and the transfer direction with method ``RsRtx.search.trigger.lin.border.set()`` . :return: word_count: 1 to 8 """ param = Conversions.value_to_quoted_str(search) response = self._core.io.query_str(f'SEARch:TRIGger:LIN:DLENgth? {param}') return Conversions.str_to_int(response)