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

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

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

[docs] def set(self, search: str, chk_search_addr: bool) -> None: """ ``SEARch:TRIGger:I2C:SADDress`` \n Snippet: ``driver.search.trigger.i2C.saddress.set(search = 'abc', chk_search_addr = False)`` \n Enables the search for one specific address condition or for a combination of address conditions. To define the address condition, use the following commands: \n - method ``RsRtx.search.trigger.i2C.acondition.set()`` - method ``RsRtx.search.trigger.i2C.address.set()`` - method ``RsRtx.search.trigger.i2C.addTo.set()`` - method ``RsRtx.search.trigger.i2C.amode.set()`` - method ``RsRtx.search.trigger.i2C.access.set()`` """ param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('chk_search_addr', chk_search_addr, DataType.Boolean)) self._core.io.write(f'SEARch:TRIGger:I2C:SADDress {param}'.rstrip())
[docs] def get(self, search: str) -> bool: """ ``SEARch:TRIGger:I2C:SADDress`` \n Snippet: ``value: bool = driver.search.trigger.i2C.saddress.get(search = 'abc')`` \n Enables the search for one specific address condition or for a combination of address conditions. To define the address condition, use the following commands: \n - method ``RsRtx.search.trigger.i2C.acondition.set()`` - method ``RsRtx.search.trigger.i2C.address.set()`` - method ``RsRtx.search.trigger.i2C.addTo.set()`` - method ``RsRtx.search.trigger.i2C.amode.set()`` - method ``RsRtx.search.trigger.i2C.access.set()`` :param search: OFF | ON """ param = Conversions.value_to_quoted_str(search) response = self._core.io.query_str(f'SEARch:TRIGger:I2C:SADDress? {param}') return Conversions.str_to_bool(response)