Source code for rsrtx.Implementations.Search.Trigger.Mphy.Rreq

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

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

[docs] def set(self, search: str, req: enums.BusBitCondition) -> None: """ ``SEARch:TRIGger:MPHY:RREQ`` \n Snippet: ``driver.search.trigger.mphy.rreq.set(search = 'abc', req = enums.BusBitCondition.DC)`` \n Specifies the RREQ bit pattern. :param req: ONE | ZERO | DC \n - ONE: Sets the trigger condition to binary 1. - ZERO: Sets the trigger condition to binary 0. - DC: Sets the trigger condition to any RREQ value (don't care) . """ param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('req', req, DataType.Enum, enums.BusBitCondition)) self._core.io.write(f'SEARch:TRIGger:MPHY:RREQ {param}'.rstrip())
# noinspection PyTypeChecker
[docs] def get(self, search: str) -> enums.BusBitCondition: """ ``SEARch:TRIGger:MPHY:RREQ`` \n Snippet: ``value: enums.BusBitCondition = driver.search.trigger.mphy.rreq.get(search = 'abc')`` \n Specifies the RREQ bit pattern. :return: req: ONE | ZERO | DC \n - ONE: Sets the trigger condition to binary 1. - ZERO: Sets the trigger condition to binary 0. - DC: Sets the trigger condition to any RREQ value (don't care) . """ param = Conversions.value_to_quoted_str(search) response = self._core.io.query_str(f'SEARch:TRIGger:MPHY:RREQ? {param}') return Conversions.str_to_scalar_enum(response, enums.BusBitCondition)