Source code for rsmxo.Implementations.Trigger.Event.Timeout.Time

from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import repcap


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class TimeCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

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

[docs] def set(self, time: float, evnt=repcap.Evnt.Default) -> None: """ ``TRIGger:EVENt<*>:TIMeout:TIME`` \n Snippet: ``driver.trigger.event.timeout.time.set(time = 1.0, evnt = repcap.Evnt.Default)`` \n Sets the time limit for the timeout at which the instrument triggers. :param time: 1E-10 to 10000 :param evnt: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Event') """ param = Conversions.decimal_value_to_str(time) evnt_cmd_val = self._cmd_group.get_repcap_cmd_value(evnt, repcap.Evnt) self._core.io.write(f'TRIGger:EVENt{evnt_cmd_val}:TIMeout:TIME {param}')
[docs] def get(self, evnt=repcap.Evnt.Default) -> float: """ ``TRIGger:EVENt<*>:TIMeout:TIME`` \n Snippet: ``value: float = driver.trigger.event.timeout.time.get(evnt = repcap.Evnt.Default)`` \n Sets the time limit for the timeout at which the instrument triggers. :param evnt: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Event') :return: time: 1E-10 to 10000 """ evnt_cmd_val = self._cmd_group.get_repcap_cmd_value(evnt, repcap.Evnt) response = self._core.io.query_str(f'TRIGger:EVENt{evnt_cmd_val}:TIMeout:TIME?') return Conversions.str_to_float(response)