Source code for rsrtx.Implementations.Eye.Zcoupling

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


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

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

[docs] def set(self, zoom_coupling: bool, eye=repcap.Eye.Default) -> None: """ ``EYE<*>:ZCOupling`` \n Snippet: ``driver.eye.zcoupling.set(zoom_coupling = False, eye = repcap.Eye.Default)`` \n If enabled, the mask eye area is set to the limits of a zoom area. The zoom diagram is selected using method ``RsRtx.eye.zdiagram.set()`` . :param zoom_coupling: OFF | ON :param eye: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Eye') """ param = Conversions.bool_to_str(zoom_coupling) eye_cmd_val = self._cmd_group.get_repcap_cmd_value(eye, repcap.Eye) self._core.io.write_with_opc(f'EYE{eye_cmd_val}:ZCOupling {param}')
[docs] def get(self, eye=repcap.Eye.Default) -> bool: """ ``EYE<*>:ZCOupling`` \n Snippet: ``value: bool = driver.eye.zcoupling.get(eye = repcap.Eye.Default)`` \n If enabled, the mask eye area is set to the limits of a zoom area. The zoom diagram is selected using method ``RsRtx.eye.zdiagram.set()`` . :param eye: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Eye') :return: zoom_coupling: OFF | ON """ 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}:ZCOupling?') return Conversions.str_to_bool(response)