from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ActionsCls:
"""
| Commands in total: 14
| Subgroups: 1
| Direct child commands: 4
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("actions", core, parent)
@property
def out(self):
"""
| Commands in total: 10
| Subgroups: 1
| Direct child commands: 5
"""
if not hasattr(self, '_out'):
from .Out import OutCls
self._out = OutCls(self._core, self._cmd_group)
return self._out
# noinspection PyTypeChecker
[docs]
def get_beep(self) -> enums.TriggerAction:
"""
``TRIGger:ACTions:BEEP`` \n
Snippet: ``value: enums.TriggerAction = driver.trigger.actions.get_beep()`` \n
Generates a beep sound if the command is set to TRIGger.
:return: beep: NOACtion | TRIGger
"""
response = self._core.io.query_str('TRIGger:ACTions:BEEP?')
return Conversions.str_to_scalar_enum(response, enums.TriggerAction)
[docs]
def set_beep(self, beep: enums.TriggerAction) -> None:
"""
``TRIGger:ACTions:BEEP`` \n
Snippet: ``driver.trigger.actions.set_beep(beep = enums.TriggerAction.NOACtion)`` \n
Generates a beep sound if the command is set to TRIGger.
:param beep: NOACtion | TRIGger
"""
param = Conversions.enum_scalar_to_str(beep, enums.TriggerAction)
self._core.io.write(f'TRIGger:ACTions:BEEP {param}')
# noinspection PyTypeChecker
[docs]
def get_screenshot(self) -> enums.TriggerAction:
"""
``TRIGger:ACTions:SCReenshot`` \n
Snippet: ``value: enums.TriggerAction = driver.trigger.actions.get_screenshot()`` \n
Saves a screenshot at each trigger if the command is set to TRIGger. To configure the screenshot settings, use the
commands described in 'Screenshots'.
:return: save_screenshot: NOACtion | TRIGger
"""
response = self._core.io.query_str('TRIGger:ACTions:SCReenshot?')
return Conversions.str_to_scalar_enum(response, enums.TriggerAction)
[docs]
def set_screenshot(self, save_screenshot: enums.TriggerAction) -> None:
"""
``TRIGger:ACTions:SCReenshot`` \n
Snippet: ``driver.trigger.actions.set_screenshot(save_screenshot = enums.TriggerAction.NOACtion)`` \n
Saves a screenshot at each trigger if the command is set to TRIGger. To configure the screenshot settings, use the
commands described in 'Screenshots'.
:param save_screenshot: NOACtion | TRIGger
"""
param = Conversions.enum_scalar_to_str(save_screenshot, enums.TriggerAction)
self._core.io.write(f'TRIGger:ACTions:SCReenshot {param}')
# noinspection PyTypeChecker
[docs]
def get_wfm_save(self) -> enums.TriggerAction:
"""
``TRIGger:ACTions:WFMSave`` \n
Snippet: ``value: enums.TriggerAction = driver.trigger.actions.get_wfm_save()`` \n
Saves the waveform data to file at each trigger if the command is set to TRIGger.
To define the path and file names, use the EXPort:WAVeform:AUTonaming:* commands: \n
- method ``RsMxo.export.waveform.autoNaming.name()``
- method ``RsMxo.export.waveform.autoNaming.path()``
- method ``RsMxo.export.waveform.autoNaming.type_py()``
:return: save_wfm: NOACtion | TRIGger
"""
response = self._core.io.query_str('TRIGger:ACTions:WFMSave?')
return Conversions.str_to_scalar_enum(response, enums.TriggerAction)
[docs]
def set_wfm_save(self, save_wfm: enums.TriggerAction) -> None:
"""
``TRIGger:ACTions:WFMSave`` \n
Snippet: ``driver.trigger.actions.set_wfm_save(save_wfm = enums.TriggerAction.NOACtion)`` \n
Saves the waveform data to file at each trigger if the command is set to TRIGger.
To define the path and file names, use the EXPort:WAVeform:AUTonaming:* commands: \n
- method ``RsMxo.export.waveform.autoNaming.name()``
- method ``RsMxo.export.waveform.autoNaming.path()``
- method ``RsMxo.export.waveform.autoNaming.type_py()``
:param save_wfm: NOACtion | TRIGger
"""
param = Conversions.enum_scalar_to_str(save_wfm, enums.TriggerAction)
self._core.io.write(f'TRIGger:ACTions:WFMSave {param}')
# noinspection PyTypeChecker
[docs]
def get_stop(self) -> enums.TriggerAction:
"""
``TRIGger:ACTions:STOP`` \n
Snippet: ``value: enums.TriggerAction = driver.trigger.actions.get_stop()`` \n
Stops the running acquisition if the command is set to TRIGger.
:return: stop_acq: NOACtion | TRIGger
"""
response = self._core.io.query_str('TRIGger:ACTions:STOP?')
return Conversions.str_to_scalar_enum(response, enums.TriggerAction)
[docs]
def set_stop(self, stop_acq: enums.TriggerAction) -> None:
"""
``TRIGger:ACTions:STOP`` \n
Snippet: ``driver.trigger.actions.set_stop(stop_acq = enums.TriggerAction.NOACtion)`` \n
Stops the running acquisition if the command is set to TRIGger.
:param stop_acq: NOACtion | TRIGger
"""
param = Conversions.enum_scalar_to_str(stop_acq, enums.TriggerAction)
self._core.io.write(f'TRIGger:ACTions:STOP {param}')
def clone(self) -> 'ActionsCls':
"""
Clones the group by creating new object from it and its whole existing subgroups.
Also copies all the existing default Repeated Capabilities setting,
which you can change independently without affecting the original group.
"""
new_group = ActionsCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group