Source code for rsrtx.Implementations.Search.Trigger.Usb.Pcondition

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

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

[docs] def set(self, search: str, operator_port: enums.ConditionOperator) -> None: """ ``SEARch:TRIGger:USB:PCONdition`` \n Snippet: ``driver.search.trigger.usb.pcondition.set(search = 'abc', operator_port = enums.ConditionOperator.EQUal)`` \n Sets the operator to set a specific port number or a port number range. The port number values are set with method ``RsRtx.search.trigger.usb.pmin.set()`` and method ``RsRtx.search.trigger.usb.pmax.set()`` . :param operator_port: OFF | ANY | EQUal | NEQual | LTHan | LETHan | GTHan | GETHan | INRange | OORange \n - EQUal | NEQual | LTHan | LETHan | GTHan | GETHan: Equal, Not equal, Less than, Less than or equal, Greater than, Greater than or equal. These conditions require one port number to be set using SEARch:TRIGger:USB:PMIN. - INRange | OORange: In range, out of range. These conditions require a port number range to be set using SEARch:TRIGger:USB:PMIN and SEARch:TRIGger:USB:PMAX. """ param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('operator_port', operator_port, DataType.Enum, enums.ConditionOperator)) self._core.io.write(f'SEARch:TRIGger:USB:PCONdition {param}'.rstrip())
# noinspection PyTypeChecker
[docs] def get(self, search: str) -> enums.ConditionOperator: """ ``SEARch:TRIGger:USB:PCONdition`` \n Snippet: ``value: enums.ConditionOperator = driver.search.trigger.usb.pcondition.get(search = 'abc')`` \n Sets the operator to set a specific port number or a port number range. The port number values are set with method ``RsRtx.search.trigger.usb.pmin.set()`` and method ``RsRtx.search.trigger.usb.pmax.set()`` . :return: operator_port: OFF | ANY | EQUal | NEQual | LTHan | LETHan | GTHan | GETHan | INRange | OORange \n - EQUal | NEQual | LTHan | LETHan | GTHan | GETHan: Equal, Not equal, Less than, Less than or equal, Greater than, Greater than or equal. These conditions require one port number to be set using SEARch:TRIGger:USB:PMIN. - INRange | OORange: In range, out of range. These conditions require a port number range to be set using SEARch:TRIGger:USB:PMIN and SEARch:TRIGger:USB:PMAX. """ param = Conversions.value_to_quoted_str(search) response = self._core.io.query_str(f'SEARch:TRIGger:USB:PCONdition? {param}') return Conversions.str_to_scalar_enum(response, enums.ConditionOperator)