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
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class RmaxCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("rmax", core, parent)
[docs]
def set(self, search: str, rta_pattern_max: int) -> None:
"""
``SEARch:TRIGger:MILStd:DATA:RMAX`` \n
Snippet: ``driver.search.trigger.milstd.data.rmax.set(search = 'abc', rta_pattern_max = 1)`` \n
Set the end value of a data range if method ``RsRtx.search.trigger.milstd.cdst.rcondition.set()`` is set to INRange or
OORange:
To define the address condition, use the following commands: \n
- DATA: for data words
- CMD: for command words
- CDST: for status words
:param rta_pattern_max: Numeric or string pattern, see 'Bit pattern parameter'. The string parameter accepts the bit value X (don't care) .
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('rta_pattern_max', rta_pattern_max, DataType.Integer))
self._core.io.write(f'SEARch:TRIGger:MILStd:DATA:RMAX {param}'.rstrip())
[docs]
def get(self, search: str) -> int:
"""
``SEARch:TRIGger:MILStd:DATA:RMAX`` \n
Snippet: ``value: int = driver.search.trigger.milstd.data.rmax.get(search = 'abc')`` \n
Set the end value of a data range if method ``RsRtx.search.trigger.milstd.cdst.rcondition.set()`` is set to INRange or
OORange:
To define the address condition, use the following commands: \n
- DATA: for data words
- CMD: for command words
- CDST: for status words
:return: rta_pattern_max: Numeric or string pattern, see 'Bit pattern parameter'. The string parameter accepts the bit value X (don't care) .
"""
param = Conversions.value_to_quoted_str(search)
response = self._core.io.query_str(f'SEARch:TRIGger:MILStd:DATA:RMAX? {param}')
return Conversions.str_to_int(response)