Source code for rsrtx.Implementations.Search.Trigger.UsbPd.Frame.Fld.Ioperator

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


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

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

[docs] def set(self, search: str, index_operator: enums.DataIndexOperator, busFrameNull=repcap.BusFrameNull.Default, busFieldNull=repcap.BusFieldNull.Default) -> None: """ ``SEARch:TRIGger:USBPd:FRAMe<*>:FLD<*>:IOPerator`` \n Snippet: ``driver.search.trigger.usbPd.frame.fld.ioperator.set(search = 'abc', index_operator = enums.DataIndexOperator.ANY, busFrameNull = repcap.BusFrameNull.Default, busFieldNull = repcap.BusFieldNull.Default)`` \n Sets the operator for the index for searching in the selected field of the selected frame. :param search: String with the name of the search. :param index_operator: EQUal | INRange | RANGe \n - EQUal: This condition requires one endpoint value to be set using SEARch:TRIGger:USBPd:FRAMefr:FLDfl:IMIN. - INRange | RANGe: This condition requires a range of endpoint values to be set using SEARch:TRIGger:USBPd:FRAMefr:FLDfl:IMIN and SEARch:TRIGger:USBPd:FRAMefr:FLDfl:IMAX. :param busFrameNull: optional repeated capability selector. Default value: Nr0 (settable in the interface 'Frame') :param busFieldNull: optional repeated capability selector. Default value: Nr0 (settable in the interface 'Fld') """ param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('index_operator', index_operator, DataType.Enum, enums.DataIndexOperator)) busFrameNull_cmd_val = self._cmd_group.get_repcap_cmd_value(busFrameNull, repcap.BusFrameNull) busFieldNull_cmd_val = self._cmd_group.get_repcap_cmd_value(busFieldNull, repcap.BusFieldNull) self._core.io.write(f'SEARch:TRIGger:USBPd:FRAMe{busFrameNull_cmd_val}:FLD{busFieldNull_cmd_val}:IOPerator {param}'.rstrip())
# noinspection PyTypeChecker
[docs] def get(self, search: str, busFrameNull=repcap.BusFrameNull.Default, busFieldNull=repcap.BusFieldNull.Default) -> enums.DataIndexOperator: """ ``SEARch:TRIGger:USBPd:FRAMe<*>:FLD<*>:IOPerator`` \n Snippet: ``value: enums.DataIndexOperator = driver.search.trigger.usbPd.frame.fld.ioperator.get(search = 'abc', busFrameNull = repcap.BusFrameNull.Default, busFieldNull = repcap.BusFieldNull.Default)`` \n Sets the operator for the index for searching in the selected field of the selected frame. :param search: String with the name of the search. :param busFrameNull: optional repeated capability selector. Default value: Nr0 (settable in the interface 'Frame') :param busFieldNull: optional repeated capability selector. Default value: Nr0 (settable in the interface 'Fld') :return: index_operator: EQUal | INRange | RANGe \n - EQUal: This condition requires one endpoint value to be set using SEARch:TRIGger:USBPd:FRAMefr:FLDfl:IMIN. - INRange | RANGe: This condition requires a range of endpoint values to be set using SEARch:TRIGger:USBPd:FRAMefr:FLDfl:IMIN and SEARch:TRIGger:USBPd:FRAMefr:FLDfl:IMAX. """ param = Conversions.value_to_quoted_str(search) busFrameNull_cmd_val = self._cmd_group.get_repcap_cmd_value(busFrameNull, repcap.BusFrameNull) busFieldNull_cmd_val = self._cmd_group.get_repcap_cmd_value(busFieldNull, repcap.BusFieldNull) response = self._core.io.query_str(f'SEARch:TRIGger:USBPd:FRAMe{busFrameNull_cmd_val}:FLD{busFieldNull_cmd_val}:IOPerator? {param}') return Conversions.str_to_scalar_enum(response, enums.DataIndexOperator)