Source code for rsrtx.Implementations.Cursor.X2Envelope

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

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

[docs] def set(self, envelope_curve_2: enums.EnvelopeCurve, cursor=repcap.Cursor.Default) -> None: """ ``CURSor<*>:X2ENvelope`` \n Snippet: ``driver.cursor.x2Envelope.set(envelope_curve_2 = enums.EnvelopeCurve.BOTH, cursor = repcap.Cursor.Default)`` \n If the waveform arithmetics are set to envelope curve (see method ``RsRtx.channel.waveform.arithmetics.set()`` ) and method ``RsRtx.cursor.tracking.state.set()`` is set to ON, this setting defines how the second horizontal cursor is positioned. :param envelope_curve_2: MIN | MAX \n - MIN: The horizontal cursor is set to the crossing point of the vertical cursor with the minimum waveform envelope. - MAX: The horizontal cursor is set to the crossing point of the vertical cursor with the maximum waveform envelope. :param cursor: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Cursor') """ param = Conversions.enum_scalar_to_str(envelope_curve_2, enums.EnvelopeCurve) cursor_cmd_val = self._cmd_group.get_repcap_cmd_value(cursor, repcap.Cursor) self._core.io.write_with_opc(f'CURSor{cursor_cmd_val}:X2ENvelope {param}')
# noinspection PyTypeChecker
[docs] def get(self, cursor=repcap.Cursor.Default) -> enums.EnvelopeCurve: """ ``CURSor<*>:X2ENvelope`` \n Snippet: ``value: enums.EnvelopeCurve = driver.cursor.x2Envelope.get(cursor = repcap.Cursor.Default)`` \n If the waveform arithmetics are set to envelope curve (see method ``RsRtx.channel.waveform.arithmetics.set()`` ) and method ``RsRtx.cursor.tracking.state.set()`` is set to ON, this setting defines how the second horizontal cursor is positioned. :param cursor: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Cursor') :return: envelope_curve_2: MIN | MAX \n - MIN: The horizontal cursor is set to the crossing point of the vertical cursor with the minimum waveform envelope. - MAX: The horizontal cursor is set to the crossing point of the vertical cursor with the maximum waveform envelope. """ 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}:X2ENvelope?') return Conversions.str_to_scalar_enum(response, enums.EnvelopeCurve)