from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from .... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class SwapCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("swap", core, parent)
[docs]
def set(self, waveform=repcap.Waveform.Default, opc_timeout_ms: int = -1) -> None:
"""
``WAVeform<*>:XYCurve:SWAP`` \n
Snippet: ``driver.waveform.xyCurve.swap.set(waveform = repcap.Waveform.Default)`` \n
Replaces the source of the x-axis with the source of the y-axis and vice versa.
:param waveform: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Waveform')
:param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call.
"""
waveform_cmd_val = self._cmd_group.get_repcap_cmd_value(waveform, repcap.Waveform)
self._core.io.write_with_opc(f'WAVeform{waveform_cmd_val}:XYCurve:SWAP', opc_timeout_ms)