Source code for rsmxo.Implementations.Histogram.Window.Vertical.Mode

from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import enums
from ..... import repcap


# 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, mode: enums.AbsRel, histogram=repcap.Histogram.Default) -> None: """ ``HISTogram<*>:WINDow:VERTical:MODE`` \n Snippet: ``driver.histogram.window.vertical.mode.set(mode = enums.AbsRel.ABS, histogram = repcap.Histogram.Default)`` \n The commands define whether the window limits are entered as absolute or relative values, in horizontal and vertical direction. :param mode: ABS | REL :param histogram: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Histogram') """ param = Conversions.enum_scalar_to_str(mode, enums.AbsRel) histogram_cmd_val = self._cmd_group.get_repcap_cmd_value(histogram, repcap.Histogram) self._core.io.write(f'HISTogram{histogram_cmd_val}:WINDow:VERTical:MODE {param}')
# noinspection PyTypeChecker
[docs] def get(self, histogram=repcap.Histogram.Default) -> enums.AbsRel: """ ``HISTogram<*>:WINDow:VERTical:MODE`` \n Snippet: ``value: enums.AbsRel = driver.histogram.window.vertical.mode.get(histogram = repcap.Histogram.Default)`` \n The commands define whether the window limits are entered as absolute or relative values, in horizontal and vertical direction. :param histogram: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Histogram') :return: mode: ABS | REL """ histogram_cmd_val = self._cmd_group.get_repcap_cmd_value(histogram, repcap.Histogram) response = self._core.io.query_str(f'HISTogram{histogram_cmd_val}:WINDow:VERTical:MODE?') return Conversions.str_to_scalar_enum(response, enums.AbsRel)