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 MaxCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("max", core, parent)
[docs]
def set(self, search: str, dest_addr_patt_max: int) -> None:
"""
``SEARch:TRIGger:TBTO:DADDress:MAX`` \n
Snippet: ``driver.search.trigger.tbto.daddress.max.set(search = 'abc', dest_addr_patt_max = 1)`` \n
Sets the end value of the destination address range if method ``RsRtx.search.trigger.tbto.daddress.condition.set()`` is
set to INRange or OORange.
:param dest_addr_patt_max: Numeric or string pattern, see 'Bit pattern parameter'. The string parameter accepts the bit value X (do not care) .
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('dest_addr_patt_max', dest_addr_patt_max, DataType.Integer))
self._core.io.write(f'SEARch:TRIGger:TBTO:DADDress:MAX {param}'.rstrip())
[docs]
def get(self, search: str) -> int:
"""
``SEARch:TRIGger:TBTO:DADDress:MAX`` \n
Snippet: ``value: int = driver.search.trigger.tbto.daddress.max.get(search = 'abc')`` \n
Sets the end value of the destination address range if method ``RsRtx.search.trigger.tbto.daddress.condition.set()`` is
set to INRange or OORange.
:return: dest_addr_patt_max: Numeric or string pattern, see 'Bit pattern parameter'. The string parameter accepts the bit value X (do not care) .
"""
param = Conversions.value_to_quoted_str(search)
response = self._core.io.query_str(f'SEARch:TRIGger:TBTO:DADDress:MAX? {param}')
return Conversions.str_to_int(response)