from .......Internal.Core import Core
from .......Internal.CommandsGroup import CommandsGroup
from .......Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class DwellCls:
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("dwell", core, parent)
[docs]
def get_time(self) -> float:
"""
``[SOURce<HW>]:BB:PRAMp:RAMP:STAir:DWELl:TIME`` \n
Snippet: ``value: float = driver.source.bb.pramp.ramp.stair.dwell.get_time()`` \n
Sets the dwell time for a power step. To activate the dwell time, use command .method
``RsSmw.source.bb.pramp.ramp.stair.dwell.state()`` .
:return: dwell_time: float Range: 5E-9 to 20, Unit: s
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:PRAMp:RAMP:STAir:DWELl:TIME?')
return Conversions.str_to_float(response)
[docs]
def set_time(self, dwell_time: float) -> None:
"""
``[SOURce<HW>]:BB:PRAMp:RAMP:STAir:DWELl:TIME`` \n
Snippet: ``driver.source.bb.pramp.ramp.stair.dwell.set_time(dwell_time = 1.0)`` \n
Sets the dwell time for a power step. To activate the dwell time, use command .method
``RsSmw.source.bb.pramp.ramp.stair.dwell.state()`` .
:param dwell_time: float Range: 5E-9 to 20, Unit: s
"""
param = Conversions.decimal_value_to_str(dwell_time)
self._core.io.write(f'SOURce<HwInstance>:BB:PRAMp:RAMP:STAir:DWELl:TIME {param}')
[docs]
def get_state(self) -> bool:
"""
``[SOURce<HW>]:BB:PRAMp:RAMP:STAir:DWELl:[STATe]`` \n
Snippet: ``value: bool = driver.source.bb.pramp.ramp.stair.dwell.get_state()`` \n
Activates the edit mode to set the dwell time. To determine the dwell time,
use method ``RsSmw.source.bb.pramp.ramp.stair.dwell.time()`` .
:return: enable_dwell: 1 | ON | 0| OFF
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:PRAMp:RAMP:STAir:DWELl:STATe?')
return Conversions.str_to_bool(response)
[docs]
def set_state(self, enable_dwell: bool) -> None:
"""
``[SOURce<HW>]:BB:PRAMp:RAMP:STAir:DWELl:[STATe]`` \n
Snippet: ``driver.source.bb.pramp.ramp.stair.dwell.set_state(enable_dwell = False)`` \n
Activates the edit mode to set the dwell time. To determine the dwell time,
use method ``RsSmw.source.bb.pramp.ramp.stair.dwell.time()`` .
:param enable_dwell: 1 | ON | 0| OFF
"""
param = Conversions.bool_to_str(enable_dwell)
self._core.io.write(f'SOURce<HwInstance>:BB:PRAMp:RAMP:STAir:DWELl:STATe {param}')