Source code for rsmxo.Implementations.Timebase.Horizontal

from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal import Conversions


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class HorizontalCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("horizontal", core, parent)

[docs] def get_position(self) -> float: """ ``TIMebase:HORizontal:POSition`` \n Snippet: ``value: float = driver.timebase.horizontal.get_position()`` \n Defines the time distance between the reference point and the trigger point, which is the zero point of the diagram. The horizontal position is also known as trigger offset. :return: position: -9.95E+6 to 1E+26 """ response = self._core.io.query_str('TIMebase:HORizontal:POSition?') return Conversions.str_to_float(response)
[docs] def set_position(self, position: float) -> None: """ ``TIMebase:HORizontal:POSition`` \n Snippet: ``driver.timebase.horizontal.set_position(position = 1.0)`` \n Defines the time distance between the reference point and the trigger point, which is the zero point of the diagram. The horizontal position is also known as trigger offset. :param position: -9.95E+6 to 1E+26 """ param = Conversions.decimal_value_to_str(position) self._core.io.write(f'TIMebase:HORizontal:POSition {param}')