Source code for rsmxo.Implementations.Timebase.Roll

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.TimebaseRollMode: """ ``TIMebase:ROLL:ENABle`` \n Snippet: ``value: enums.TimebaseRollMode = driver.timebase.roll.get_enable()`` \n Selects, if the roll mode is started automatically by the instrument or if it is turned off. :return: mode: AUTO | OFF """ response = self._core.io.query_str('TIMebase:ROLL:ENABle?') return Conversions.str_to_scalar_enum(response, enums.TimebaseRollMode)
[docs] def set_enable(self, mode: enums.TimebaseRollMode) -> None: """ ``TIMebase:ROLL:ENABle`` \n Snippet: ``driver.timebase.roll.set_enable(mode = enums.TimebaseRollMode.AUTO)`` \n Selects, if the roll mode is started automatically by the instrument or if it is turned off. :param mode: AUTO | OFF """ param = Conversions.enum_scalar_to_str(mode, enums.TimebaseRollMode) self._core.io.write(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('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 Sets the minimum acquisition time for the automatic start of the roll mode. """ response = self._core.io.query_str('TIMebase:ROLL:MTIMe?') return Conversions.str_to_float(response)
[docs] def set_mtime(self, min_time_fr_roll_md: float) -> None: """ ``TIMebase:ROLL:MTIMe`` \n Snippet: ``driver.timebase.roll.set_mtime(min_time_fr_roll_md = 1.0)`` \n Sets the minimum acquisition time for the automatic start of the roll mode. :param min_time_fr_roll_md: 0.5 to 100000 """ param = Conversions.decimal_value_to_str(min_time_fr_roll_md) self._core.io.write(f'TIMebase:ROLL:MTIMe {param}')