Source code for rsrtx.Implementations.Cursor.Ycoupling

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


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

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

[docs] def set(self, coupling: bool, cursor=repcap.Cursor.Default) -> None: """ ``CURSor<*>:YCOupling`` \n Snippet: ``driver.cursor.ycoupling.set(coupling = False, cursor = repcap.Cursor.Default)`` \n Defines the positioning mode of the horizontal cursor. If the horizontal cursor lines track the waveform, the y-coupling is irrelevant (CURSor<m>:MODE TRACk) . :param coupling: OFF | ON \n - ON: Moving one cursor line moves the other cursor line too. The cursor lines always remain a fixed distance. - OFF: Each cursor line is positioned independently. :param cursor: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Cursor') """ param = Conversions.bool_to_str(coupling) cursor_cmd_val = self._cmd_group.get_repcap_cmd_value(cursor, repcap.Cursor) self._core.io.write_with_opc(f'CURSor{cursor_cmd_val}:YCOupling {param}')
[docs] def get(self, cursor=repcap.Cursor.Default) -> bool: """ ``CURSor<*>:YCOupling`` \n Snippet: ``value: bool = driver.cursor.ycoupling.get(cursor = repcap.Cursor.Default)`` \n Defines the positioning mode of the horizontal cursor. If the horizontal cursor lines track the waveform, the y-coupling is irrelevant (CURSor<m>:MODE TRACk) . :param cursor: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Cursor') :return: coupling: OFF | ON \n - ON: Moving one cursor line moves the other cursor line too. The cursor lines always remain a fixed distance. - OFF: Each cursor line is positioned independently. """ cursor_cmd_val = self._cmd_group.get_repcap_cmd_value(cursor, repcap.Cursor) response = self._core.io.query_str_with_opc(f'CURSor{cursor_cmd_val}:YCOupling?') return Conversions.str_to_bool(response)