from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ...... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class EnableCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("enable", core, parent)
[docs]
def set(self, enab_rst_by_tout: bool, trigger=repcap.Trigger.Default) -> None:
"""
``TRIGger<*>:SEQuence:RESet:TIMeout[:ENABle]`` \n
Snippet: ``driver.trigger.sequence.reset.timeout.enable.set(enab_rst_by_tout = False, trigger = repcap.Trigger.Default)`` \n
If set to ON, the instrument waits for the time defined using method ``RsRtx.trigger.sequence.reset.timeout.time.set()``
for the specified number of B-events. If no trigger occurs during that time, the sequence is restarted with the A-event.
:param enab_rst_by_tout: OFF | ON
:param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger')
"""
param = Conversions.bool_to_str(enab_rst_by_tout)
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:TIMeout:ENABle {param}')
[docs]
def get(self, trigger=repcap.Trigger.Default) -> bool:
"""
``TRIGger<*>:SEQuence:RESet:TIMeout[:ENABle]`` \n
Snippet: ``value: bool = driver.trigger.sequence.reset.timeout.enable.get(trigger = repcap.Trigger.Default)`` \n
If set to ON, the instrument waits for the time defined using method ``RsRtx.trigger.sequence.reset.timeout.time.set()``
for the specified number of B-events. If no trigger occurs during that time, the sequence is restarted with the A-event.
:param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger')
"""
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:TIMeout:ENABle?')
return Conversions.str_to_bool(response)