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 SconditionCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("scondition", core, parent)
[docs]
def set(self, search: str, operator_seu: enums.ConditionOperator) -> None:
"""
``SEARch:TRIGger:USB:SCONdition`` \n
Snippet: ``driver.search.trigger.usb.scondition.set(search = 'abc', operator_seu = enums.ConditionOperator.EQUal)`` \n
Sets the operator to set a specific SEU or an SEU range. The SEU values are set with method
``RsRtx.search.trigger.usb.smin.set()`` and method ``RsRtx.search.trigger.usb.smax.set()`` . For SEU, see 'SEU'.
:param operator_seu: 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 SEU value to be set using SEARch:TRIGger:USB:SMIN.
- INRange | OORange: In range, out of range. These conditions require a range of SEU values to be set using SEARch:TRIGger:USB:SMIN and SEARch:TRIGger:USB:SMAX.
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('operator_seu', operator_seu, DataType.Enum, enums.ConditionOperator))
self._core.io.write(f'SEARch:TRIGger:USB:SCONdition {param}'.rstrip())
# noinspection PyTypeChecker
[docs]
def get(self, search: str) -> enums.ConditionOperator:
"""
``SEARch:TRIGger:USB:SCONdition`` \n
Snippet: ``value: enums.ConditionOperator = driver.search.trigger.usb.scondition.get(search = 'abc')`` \n
Sets the operator to set a specific SEU or an SEU range. The SEU values are set with method
``RsRtx.search.trigger.usb.smin.set()`` and method ``RsRtx.search.trigger.usb.smax.set()`` . For SEU, see 'SEU'.
:return: operator_seu: 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 SEU value to be set using SEARch:TRIGger:USB:SMIN.
- INRange | OORange: In range, out of range. These conditions require a range of SEU values to be set using SEARch:TRIGger:USB:SMIN and SEARch:TRIGger:USB:SMAX.
"""
param = Conversions.value_to_quoted_str(search)
response = self._core.io.query_str(f'SEARch:TRIGger:USB:SCONdition? {param}')
return Conversions.str_to_scalar_enum(response, enums.ConditionOperator)