from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ...... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class StopCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("stop", core, parent)
[docs]
def set(self, t_2_position: float, power=repcap.Power.Default) -> None:
"""
``POWer<*>:SWITching:REGion:TON:STOP`` \n
Snippet: ``driver.power.switching.region.ton.stop.set(t_2_position = 1.0, power = repcap.Power.Default)`` \n
Sets the start time for the conduction area in relation to the trigger point. This value is also end time of the turn on
area.
:param t_2_position: -500 to 500
:param power: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Power')
"""
param = Conversions.decimal_value_to_str(t_2_position)
power_cmd_val = self._cmd_group.get_repcap_cmd_value(power, repcap.Power)
self._core.io.write(f'POWer{power_cmd_val}:SWITching:REGion:TON:STOP {param}')
[docs]
def get(self, power=repcap.Power.Default) -> float:
"""
``POWer<*>:SWITching:REGion:TON:STOP`` \n
Snippet: ``value: float = driver.power.switching.region.ton.stop.get(power = repcap.Power.Default)`` \n
Sets the start time for the conduction area in relation to the trigger point. This value is also end time of the turn on
area.
:param power: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Power')
:return: t_2_position: -500 to 500
"""
power_cmd_val = self._cmd_group.get_repcap_cmd_value(power, repcap.Power)
response = self._core.io.query_str(f'POWer{power_cmd_val}:SWITching:REGion:TON:STOP?')
return Conversions.str_to_float(response)