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 HtimeCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("htime", core, parent)
[docs]
def set(self, search: str, hold_time: float) -> None:
"""
``SEARch:TRIGger:SETHold:HTIMe`` \n
Snippet: ``driver.search.trigger.setHold.htime.set(search = 'abc', hold_time = 1.0)`` \n
Sets the minimum time after the clock edge while the data signal must stay steady above or below the data level. The hold
time can be negative. In this case, the setup time is always positive. The setup/hold interval starts before the clock
edge (setup time) and ends before the clock edge (hold time) . If you change the negative hold time, the setup time is
adjusted by the intrument.
:param search: Search definition
:param hold_time: -99.999E-9 to 0.1
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('hold_time', hold_time, DataType.Float))
self._core.io.write_with_opc(f'SEARch:TRIGger:SETHold:HTIMe {param}'.rstrip())
[docs]
def get(self, search: str) -> float:
"""
``SEARch:TRIGger:SETHold:HTIMe`` \n
Snippet: ``value: float = driver.search.trigger.setHold.htime.get(search = 'abc')`` \n
Sets the minimum time after the clock edge while the data signal must stay steady above or below the data level. The hold
time can be negative. In this case, the setup time is always positive. The setup/hold interval starts before the clock
edge (setup time) and ends before the clock edge (hold time) . If you change the negative hold time, the setup time is
adjusted by the intrument.
:param search: Search definition
:return: hold_time: -99.999E-9 to 0.1
"""
param = Conversions.value_to_quoted_str(search)
response = self._core.io.query_str_with_opc(f'SEARch:TRIGger:SETHold:HTIMe? {param}')
return Conversions.str_to_float(response)