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

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
from ..... import enums


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class AccessCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

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

[docs] def set(self, search: str, rwb_it_address: enums.BusI2cRwbit) -> None: """ ``SEARch:TRIGger:I2C:ACCess`` \n Snippet: ``driver.search.trigger.i2C.access.set(search = 'abc', rwb_it_address = enums.BusI2cRwbit.EITHer)`` \n Sets the transfer direction of the data. :param rwb_it_address: READ | WRITe | EITHer """ param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('rwb_it_address', rwb_it_address, DataType.Enum, enums.BusI2cRwbit)) self._core.io.write_with_opc(f'SEARch:TRIGger:I2C:ACCess {param}'.rstrip())
# noinspection PyTypeChecker
[docs] def get(self, search: str) -> enums.BusI2cRwbit: """ ``SEARch:TRIGger:I2C:ACCess`` \n Snippet: ``value: enums.BusI2cRwbit = driver.search.trigger.i2C.access.get(search = 'abc')`` \n Sets the transfer direction of the data. :return: rwb_it_address: READ | WRITe | EITHer """ param = Conversions.value_to_quoted_str(search) response = self._core.io.query_str_with_opc(f'SEARch:TRIGger:I2C:ACCess? {param}') return Conversions.str_to_scalar_enum(response, enums.BusI2cRwbit)