Source code for rsrtx.Implementations.Layout.Histogram.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, histogram: str, mode: enums.PositionMode) -> None: """ ``LAYout:HISTogram:VERTical:MODE`` \n Snippet: ``driver.layout.histogram.vertical.mode.set(histogram = 'abc', mode = enums.PositionMode.ABS)`` \n Defines or queries whether the value range limits are entered as absolute or relative values. :param mode: ABS | REL """ param = ArgSingleList().compose_cmd_string(ArgSingle('histogram', histogram, DataType.String), ArgSingle('mode', mode, DataType.Enum, enums.PositionMode)) self._core.io.write_with_opc(f'LAYout:HISTogram:VERTical:MODE {param}'.rstrip())
# noinspection PyTypeChecker
[docs] def get(self, histogram: str) -> enums.PositionMode: """ ``LAYout:HISTogram:VERTical:MODE`` \n Snippet: ``value: enums.PositionMode = driver.layout.histogram.vertical.mode.get(histogram = 'abc')`` \n Defines or queries whether the value range limits are entered as absolute or relative values. :return: mode: ABS | REL """ param = Conversions.value_to_quoted_str(histogram) response = self._core.io.query_str_with_opc(f'LAYout:HISTogram:VERTical:MODE? {param}') return Conversions.str_to_scalar_enum(response, enums.PositionMode)