Source code for rsrtx.Implementations.Eye.Qualify.Gate.Coupling

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 CouplingCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

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

[docs] def set(self, coupling_mode: enums.GateCouplingMode, eye=repcap.Eye.Default) -> None: """ ``EYE<*>:QUALify:GATE:COUPling`` \n Snippet: ``driver.eye.qualify.gate.coupling.set(coupling_mode = enums.GateCouplingMode.CURSor, eye = repcap.Eye.Default)`` \n Sets the gate coupling. To use cursor lines or zoom areas as gate limits, the cursor or zoom must be defined before. :param coupling_mode: NONE | CURSor | ZOOM :param eye: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Eye') """ param = Conversions.enum_scalar_to_str(coupling_mode, enums.GateCouplingMode) 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:COUPling {param}')
# noinspection PyTypeChecker
[docs] def get(self, eye=repcap.Eye.Default) -> enums.GateCouplingMode: """ ``EYE<*>:QUALify:GATE:COUPling`` \n Snippet: ``value: enums.GateCouplingMode = driver.eye.qualify.gate.coupling.get(eye = repcap.Eye.Default)`` \n Sets the gate coupling. To use cursor lines or zoom areas as gate limits, the cursor or zoom must be defined before. :param eye: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Eye') :return: coupling_mode: NONE | CURSor | ZOOM """ 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:COUPling?') return Conversions.str_to_scalar_enum(response, enums.GateCouplingMode)