Source code for rsrtx.Implementations.Eye.Qualify.Gate.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.PositionMode, eye=repcap.Eye.Default) -> None: """ ``EYE<*>:QUALify:GATE:MODE`` \n Snippet: ``driver.eye.qualify.gate.mode.set(mode = enums.PositionMode.ABS, eye = repcap.Eye.Default)`` \n Defines whether the gate limit is defined in absolute or relative values when no gate coupling is set. :param mode: ABS | REL :param eye: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Eye') """ param = Conversions.enum_scalar_to_str(mode, enums.PositionMode) eye_cmd_val = self._cmd_group.get_repcap_cmd_value(eye, repcap.Eye) self._core.io.write_with_opc(f'EYE{eye_cmd_val}:QUALify:GATE:MODE {param}')
# noinspection PyTypeChecker
[docs] def get(self, eye=repcap.Eye.Default) -> enums.PositionMode: """ ``EYE<*>:QUALify:GATE:MODE`` \n Snippet: ``value: enums.PositionMode = driver.eye.qualify.gate.mode.get(eye = repcap.Eye.Default)`` \n Defines whether the gate limit is defined in absolute or relative values when no gate coupling is set. :param eye: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Eye') :return: mode: ABS | REL """ eye_cmd_val = self._cmd_group.get_repcap_cmd_value(eye, repcap.Eye) response = self._core.io.query_str_with_opc(f'EYE{eye_cmd_val}:QUALify:GATE:MODE?') return Conversions.str_to_scalar_enum(response, enums.PositionMode)