Source code for rsmxo.Implementations.Layout.Zoom.Horizontal.Relative.Start

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, relative_start: float, layout=repcap.Layout.Default, zoom=repcap.Zoom.Default) -> None: """ ``LAYout<*>:ZOOM<*>:HORizontal:RELative:STARt`` \n Snippet: ``driver.layout.zoom.horizontal.relative.start.set(relative_start = 1.0, layout = repcap.Layout.Default, zoom = repcap.Zoom.Default)`` \n Defines the lower limit of the zoom area on the x-axis in relative values. :param relative_start: 0 to 100 :param layout: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Layout') :param zoom: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Zoom') """ param = Conversions.decimal_value_to_str(relative_start) layout_cmd_val = self._cmd_group.get_repcap_cmd_value(layout, repcap.Layout) zoom_cmd_val = self._cmd_group.get_repcap_cmd_value(zoom, repcap.Zoom) self._core.io.write(f'LAYout{layout_cmd_val}:ZOOM{zoom_cmd_val}:HORizontal:RELative:STARt {param}')
[docs] def get(self, layout=repcap.Layout.Default, zoom=repcap.Zoom.Default) -> float: """ ``LAYout<*>:ZOOM<*>:HORizontal:RELative:STARt`` \n Snippet: ``value: float = driver.layout.zoom.horizontal.relative.start.get(layout = repcap.Layout.Default, zoom = repcap.Zoom.Default)`` \n Defines the lower limit of the zoom area on the x-axis in relative values. :param layout: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Layout') :param zoom: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Zoom') :return: relative_start: 0 to 100 """ layout_cmd_val = self._cmd_group.get_repcap_cmd_value(layout, repcap.Layout) zoom_cmd_val = self._cmd_group.get_repcap_cmd_value(zoom, repcap.Zoom) response = self._core.io.query_str(f'LAYout{layout_cmd_val}:ZOOM{zoom_cmd_val}:HORizontal:RELative:STARt?') return Conversions.str_to_float(response)