Source code for rsrtx.Implementations.Search.Trigger.I2C.Dmin

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

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

[docs] def set(self, search: str, data: int) -> None: """ ``SEARch:TRIGger:I2C:DMIN`` \n Snippet: ``driver.search.trigger.i2C.dmin.set(search = 'abc', data = 1)`` \n Specifies the data bit pattern, or sets the start value of a data pattern range.. Enter the bytes in msb first bit order. The maximum pattern length is 64 bit. Waveform data is compared with the pattern byte-by-byte. :param data: Numeric or string pattern, see 'Bit pattern parameter'. """ param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('data', data, DataType.Integer)) self._core.io.write_with_opc(f'SEARch:TRIGger:I2C:DMIN {param}'.rstrip())
[docs] def get(self, search: str) -> int: """ ``SEARch:TRIGger:I2C:DMIN`` \n Snippet: ``value: int = driver.search.trigger.i2C.dmin.get(search = 'abc')`` \n Specifies the data bit pattern, or sets the start value of a data pattern range.. Enter the bytes in msb first bit order. The maximum pattern length is 64 bit. Waveform data is compared with the pattern byte-by-byte. :return: data: Numeric or string pattern, see 'Bit pattern parameter'. """ param = Conversions.value_to_quoted_str(search) response = self._core.io.query_str_with_opc(f'SEARch:TRIGger:I2C:DMIN? {param}') return Conversions.str_to_int(response)