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 RconditionCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("rcondition", core, parent)
[docs]
def set(self, search: str, rta_operator: enums.ConditionOperator) -> None:
"""
``SEARch:TRIGger:MILStd:CMD:RCONdition`` \n
Snippet: ``driver.search.trigger.milstd.cmd.rcondition.set(search = 'abc', rta_operator = enums.ConditionOperator.EQUal)`` \n
Set the operator to define a remote terminal address:
Sets the end value of a pattern range for the corresponding search: \n
- DATA: for data words
- CMD: for command words
- CDST: for status words
:param search: String parameter
:param rta_operator: EQUal | NEQual | LTHan | LETHan | GTHan | GETHan | INRange | OORange \n
- EQUal | NEQual | LTHan | LETHan | GTHan | GETHan: Equal, Not equal, Less than, Less or equal than, Greater Than, Greater or equal than. These conditions require one pattern to be set with SEARch:TRIGger:MILStd:CDST:RMIN.
- INRange | OORange: In range/Out of range: set the minimum and maximum value of the range with SEARch:TRIGger:MILStd:CDST:RMIN and SEARch:TRIGger:MILStd:CDST:RMAX.
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('rta_operator', rta_operator, DataType.Enum, enums.ConditionOperator))
self._core.io.write(f'SEARch:TRIGger:MILStd:CMD:RCONdition {param}'.rstrip())
# noinspection PyTypeChecker
[docs]
def get(self, search: str) -> enums.ConditionOperator:
"""
``SEARch:TRIGger:MILStd:CMD:RCONdition`` \n
Snippet: ``value: enums.ConditionOperator = driver.search.trigger.milstd.cmd.rcondition.get(search = 'abc')`` \n
Set the operator to define a remote terminal address:
Sets the end value of a pattern range for the corresponding search: \n
- DATA: for data words
- CMD: for command words
- CDST: for status words
:param search: String parameter
:return: rta_operator: EQUal | NEQual | LTHan | LETHan | GTHan | GETHan | INRange | OORange \n
- EQUal | NEQual | LTHan | LETHan | GTHan | GETHan: Equal, Not equal, Less than, Less or equal than, Greater Than, Greater or equal than. These conditions require one pattern to be set with SEARch:TRIGger:MILStd:CDST:RMIN.
- INRange | OORange: In range/Out of range: set the minimum and maximum value of the range with SEARch:TRIGger:MILStd:CDST:RMIN and SEARch:TRIGger:MILStd:CDST:RMAX.
"""
param = Conversions.value_to_quoted_str(search)
response = self._core.io.query_str(f'SEARch:TRIGger:MILStd:CMD:RCONdition? {param}')
return Conversions.str_to_scalar_enum(response, enums.ConditionOperator)