Source code for rsrtx.Implementations.Search.Trigger.SetHold.Stime

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 StimeCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("stime", core, parent)

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