from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class RestartCls:
"""
| Commands in total: 7
| Subgroups: 3
| Direct child commands: 4
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("restart", core, parent)
@property
def arm(self):
"""
| Commands in total: 1
| Subgroups: 1
| Direct child commands: 0
"""
if not hasattr(self, '_arm'):
from .Arm import ArmCls
self._arm = ArmCls(self._core, self._cmd_group)
return self._arm
@property
def execute(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_execute'):
from .Execute import ExecuteCls
self._execute = ExecuteCls(self._core, self._cmd_group)
return self._execute
@property
def synchronize(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_synchronize'):
from .Synchronize import SynchronizeCls
self._synchronize = SynchronizeCls(self._core, self._cmd_group)
return self._synchronize
# noinspection PyTypeChecker
[docs]
def get_mode(self) -> enums.RegTrigMode:
"""
``[SOURce<HW>]:REGenerator:RESTart:MODE`` \n
Snippet: ``value: enums.RegTrigMode = driver.source.regenerator.restart.get_mode()`` \n
Selects the event which leads to a restart of the REG simulation.
:return: mode: AUTO | AAUTo AUTO The signal generation starts after the REG is enabled. The signal is generated continuously; all configured objects are simulated. AAUT Simulation starts upon trigger event (method ``RsSmw.source.regenerator.restart.execute.set()`` ) . Then the signal is generated continuously; all configured objects are simulated.
"""
response = self._core.io.query_str('SOURce<HwInstance>:REGenerator:RESTart:MODE?')
return Conversions.str_to_scalar_enum(response, enums.RegTrigMode)
[docs]
def set_mode(self, mode: enums.RegTrigMode) -> None:
"""
``[SOURce<HW>]:REGenerator:RESTart:MODE`` \n
Snippet: ``driver.source.regenerator.restart.set_mode(mode = enums.RegTrigMode.AAUTo)`` \n
Selects the event which leads to a restart of the REG simulation.
:param mode: AUTO | AAUTo AUTO The signal generation starts after the REG is enabled. The signal is generated continuously; all configured objects are simulated. AAUT Simulation starts upon trigger event (method ``RsSmw.source.regenerator.restart.execute.set()`` ) . Then the signal is generated continuously; all configured objects are simulated.
"""
param = Conversions.enum_scalar_to_str(mode, enums.RegTrigMode)
self._core.io.write(f'SOURce<HwInstance>:REGenerator:RESTart:MODE {param}')
# noinspection PyTypeChecker
[docs]
def get_rmode(self) -> enums.TrigRunMode:
"""
``[SOURce<HW>]:REGenerator:RESTart:RMODe`` \n
Snippet: ``value: enums.TrigRunMode = driver.source.regenerator.restart.get_rmode()`` \n
Queries the status of signal generation for all trigger modes.
:return: rmode: STOP | RUN
"""
response = self._core.io.query_str('SOURce<HwInstance>:REGenerator:RESTart:RMODe?')
return Conversions.str_to_scalar_enum(response, enums.TrigRunMode)
# noinspection PyTypeChecker
[docs]
def get_source(self) -> enums.TrigSourReg:
"""
``[SOURce<HW>]:REGenerator:RESTart:SOURce`` \n
Snippet: ``value: enums.TrigSourReg = driver.source.regenerator.restart.get_source()`` \n
Selects the trigger signal source and determines the way the triggering is executed.
:return: source: INTernal | ERRTA | ERRTB INTernal Internal triggering by the command method ``RsSmw.source.regenerator.restart.execute.set()`` . ERRTA | ERRTB External trigger signal via one of the external global trigger connectors. See method ``RsSmw.source.inputPy.user.signal.set()`` .
"""
response = self._core.io.query_str('SOURce<HwInstance>:REGenerator:RESTart:SOURce?')
return Conversions.str_to_scalar_enum(response, enums.TrigSourReg)
[docs]
def set_source(self, source: enums.TrigSourReg) -> None:
"""
``[SOURce<HW>]:REGenerator:RESTart:SOURce`` \n
Snippet: ``driver.source.regenerator.restart.set_source(source = enums.TrigSourReg.ERRTA)`` \n
Selects the trigger signal source and determines the way the triggering is executed.
:param source: INTernal | ERRTA | ERRTB INTernal Internal triggering by the command method ``RsSmw.source.regenerator.restart.execute.set()`` . ERRTA | ERRTB External trigger signal via one of the external global trigger connectors. See method ``RsSmw.source.inputPy.user.signal.set()`` .
"""
param = Conversions.enum_scalar_to_str(source, enums.TrigSourReg)
self._core.io.write(f'SOURce<HwInstance>:REGenerator:RESTart:SOURce {param}')
[docs]
def get_st_attenuation(self) -> float:
"""
``[SOURce<HW>]:REGenerator:RESTart:STATtenuation`` \n
Snippet: ``value: float = driver.source.regenerator.restart.get_st_attenuation()`` \n
If method ``RsSmw.source.regenerator.restart.mode()`` AAUT, sets the attenuation applied on the output signal during the
time the signal generation is stopped.
:return: stop_time_att: float Range: 0 to 60
"""
response = self._core.io.query_str('SOURce<HwInstance>:REGenerator:RESTart:STATtenuation?')
return Conversions.str_to_float(response)
[docs]
def set_st_attenuation(self, stop_time_att: float) -> None:
"""
``[SOURce<HW>]:REGenerator:RESTart:STATtenuation`` \n
Snippet: ``driver.source.regenerator.restart.set_st_attenuation(stop_time_att = 1.0)`` \n
If method ``RsSmw.source.regenerator.restart.mode()`` AAUT, sets the attenuation applied on the output signal during the
time the signal generation is stopped.
:param stop_time_att: float Range: 0 to 60
"""
param = Conversions.decimal_value_to_str(stop_time_att)
self._core.io.write(f'SOURce<HwInstance>:REGenerator:RESTart:STATtenuation {param}')
def clone(self) -> 'RestartCls':
"""
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 = RestartCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group