Source code for rsrtx.Implementations.Layout.Zoom.Vertical.Mode

from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from .....Internal.Types import DataType
from .....Internal.ArgSingleList import ArgSingleList
from .....Internal.ArgSingle import ArgSingle
from ..... import enums


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

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

[docs] def set(self, diagram_group: str, zoom_diagram: str, mode: enums.PositionMode) -> None: """ ``LAYout:ZOOM:VERTical:MODE`` \n Snippet: ``driver.layout.zoom.vertical.mode.set(diagram_group = 'abc', zoom_diagram = 'abc', mode = enums.PositionMode.ABS)`` \n Defines whether absolute or relative values are used to specify the y-axis values. Since the zoom area refers to the active signal, relative values ensure that the zoom area remains the same. :param diagram_group: Name of the diagram on which the zoom area is based. :param zoom_diagram: Name of the zoom diagram :param mode: Mode used to specify the y-axis values of the zoom area. """ param = ArgSingleList().compose_cmd_string(ArgSingle('diagram_group', diagram_group, DataType.String), ArgSingle('zoom_diagram', zoom_diagram, DataType.String), ArgSingle('mode', mode, DataType.Enum, enums.PositionMode)) self._core.io.write_with_opc(f'LAYout:ZOOM:VERTical:MODE {param}'.rstrip())
# noinspection PyTypeChecker
[docs] def get(self, diagram_group: str, zoom_diagram: str) -> enums.PositionMode: """ ``LAYout:ZOOM:VERTical:MODE`` \n Snippet: ``value: enums.PositionMode = driver.layout.zoom.vertical.mode.get(diagram_group = 'abc', zoom_diagram = 'abc')`` \n Defines whether absolute or relative values are used to specify the y-axis values. Since the zoom area refers to the active signal, relative values ensure that the zoom area remains the same. :param diagram_group: Name of the diagram on which the zoom area is based. :param zoom_diagram: Name of the zoom diagram :return: mode: Mode used to specify the y-axis values of the zoom area. """ param = ArgSingleList().compose_cmd_string(ArgSingle('diagram_group', diagram_group, DataType.String), ArgSingle('zoom_diagram', zoom_diagram, DataType.String)) response = self._core.io.query_str_with_opc(f'LAYout:ZOOM:VERTical:MODE? {param}'.rstrip()) return Conversions.str_to_scalar_enum(response, enums.PositionMode)