from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class StartCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("start", core, parent)
[docs]
def set(self, start_time: float, pwrGate=repcap.PwrGate.Default) -> None:
"""
``POWer:INRush:GATE<*>:STARt`` \n
Snippet: ``driver.power.inRush.gate.start.set(start_time = 1.0, pwrGate = repcap.PwrGate.Default)`` \n
Sets the measuring time for the selected gate.
:param start_time: 0 to 10
:param pwrGate: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Gate')
"""
param = Conversions.decimal_value_to_str(start_time)
pwrGate_cmd_val = self._cmd_group.get_repcap_cmd_value(pwrGate, repcap.PwrGate)
self._core.io.write(f'POWer:INRush:GATE{pwrGate_cmd_val}:STARt {param}')
[docs]
def get(self, pwrGate=repcap.PwrGate.Default) -> float:
"""
``POWer:INRush:GATE<*>:STARt`` \n
Snippet: ``value: float = driver.power.inRush.gate.start.get(pwrGate = repcap.PwrGate.Default)`` \n
Sets the measuring time for the selected gate.
:param pwrGate: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Gate')
"""
pwrGate_cmd_val = self._cmd_group.get_repcap_cmd_value(pwrGate, repcap.PwrGate)
response = self._core.io.query_str(f'POWer:INRush:GATE{pwrGate_cmd_val}:STARt?')
return Conversions.str_to_float(response)