Source code for rsrtx.Implementations.Trigger.Sequence.Reset.Event

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


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

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

[docs] def set(self, enab_rst_evt: bool, trigger=repcap.Trigger.Default) -> None: """ ``TRIGger<*>:SEQuence:RESet:EVENt`` \n Snippet: ``driver.trigger.sequence.reset.event.set(enab_rst_evt = False, trigger = repcap.Trigger.Default)`` \n If set to ON, the trigger sequence is restarted by the R-event if the specified number of B-event does not occur. :param enab_rst_evt: OFF | ON :param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger') """ param = Conversions.bool_to_str(enab_rst_evt) trigger_cmd_val = self._cmd_group.get_repcap_cmd_value(trigger, repcap.Trigger) self._core.io.write_with_opc(f'TRIGger{trigger_cmd_val}:SEQuence:RESet:EVENt {param}')
[docs] def get(self, trigger=repcap.Trigger.Default) -> bool: """ ``TRIGger<*>:SEQuence:RESet:EVENt`` \n Snippet: ``value: bool = driver.trigger.sequence.reset.event.get(trigger = repcap.Trigger.Default)`` \n If set to ON, the trigger sequence is restarted by the R-event if the specified number of B-event does not occur. :param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger') :return: enab_rst_evt: OFF | ON """ trigger_cmd_val = self._cmd_group.get_repcap_cmd_value(trigger, repcap.Trigger) response = self._core.io.query_str_with_opc(f'TRIGger{trigger_cmd_val}:SEQuence:RESet:EVENt?') return Conversions.str_to_bool(response)