from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal import Conversions
from ... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class RollCls:
"""
| Commands in total: 3
| Subgroups: 0
| Direct child commands: 3
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("roll", core, parent)
# noinspection PyTypeChecker
[docs]
def get_enable(self) -> enums.TimebaseRollEnableMode:
"""
``TIMebase:ROLL:ENABle`` \n
Snippet: ``value: enums.TimebaseRollEnableMode = driver.timebase.roll.get_enable()`` \n
Activates the automatic roll mode.
:return: mode: AUTO: the instrument activates the roll mode under specific conditions.
"""
response = self._core.io.query_str_with_opc('TIMebase:ROLL:ENABle?')
return Conversions.str_to_scalar_enum(response, enums.TimebaseRollEnableMode)
[docs]
def set_enable(self, mode: enums.TimebaseRollEnableMode) -> None:
"""
``TIMebase:ROLL:ENABle`` \n
Snippet: ``driver.timebase.roll.set_enable(mode = enums.TimebaseRollEnableMode.AUTO)`` \n
Activates the automatic roll mode.
:param mode: AUTO: the instrument activates the roll mode under specific conditions.
"""
param = Conversions.enum_scalar_to_str(mode, enums.TimebaseRollEnableMode)
self._core.io.write_with_opc(f'TIMebase:ROLL:ENABle {param}')
[docs]
def get_state(self) -> bool:
"""
``TIMebase:ROLL:STATe`` \n
Snippet: ``value: bool = driver.timebase.roll.get_state()`` \n
Returns the status of the roll mode.
:return: state: OFF | ON
"""
response = self._core.io.query_str_with_opc('TIMebase:ROLL:STATe?')
return Conversions.str_to_bool(response)
[docs]
def get_mtime(self) -> float:
"""
``TIMebase:ROLL:MTIMe`` \n
Snippet: ``value: float = driver.timebase.roll.get_mtime()`` \n
The roll mode is enabled automatically if the acquisition time exceeds the given value, and if method
``RsRtx.timebase.roll.enable()`` is set to AUTO.
"""
response = self._core.io.query_str_with_opc('TIMebase:ROLL:MTIMe?')
return Conversions.str_to_float(response)
[docs]
def set_mtime(self, min_horiz_gn: float) -> None:
"""
``TIMebase:ROLL:MTIMe`` \n
Snippet: ``driver.timebase.roll.set_mtime(min_horiz_gn = 1.0)`` \n
The roll mode is enabled automatically if the acquisition time exceeds the given value, and if method
``RsRtx.timebase.roll.enable()`` is set to AUTO.
:param min_horiz_gn: Treshold value for roll mode enabling.
"""
param = Conversions.decimal_value_to_str(min_horiz_gn)
self._core.io.write_with_opc(f'TIMebase:ROLL:MTIMe {param}')