Source code for rsmxo.Implementations.Xy.Xsource

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

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

[docs] def set(self, xsource: enums.SignalSource, xyAxis=repcap.XyAxis.Default) -> None: """ ``XY<*>:XSOurce`` \n Snippet: ``driver.xy.xsource.set(xsource = enums.SignalSource.C1, xyAxis = repcap.XyAxis.Default)`` \n Defines the signal source that supplies the x-values of the XY-diagram. :param xsource: NONE | C1 | C2 | ... | C8 | M1 | M2 | ... | M8 | R1 | R2 | ... | R8 | TRK1 | TRK2 | TRK3 | ... | TRK24 | OnC1 | OnC2 | ... | OnC8 (n = 2 to 11 :param xyAxis: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Xy') """ param = Conversions.enum_scalar_to_str(xsource, enums.SignalSource) xyAxis_cmd_val = self._cmd_group.get_repcap_cmd_value(xyAxis, repcap.XyAxis) self._core.io.write(f'XY{xyAxis_cmd_val}:XSOurce {param}')
# noinspection PyTypeChecker
[docs] def get(self, xyAxis=repcap.XyAxis.Default) -> enums.SignalSource: """ ``XY<*>:XSOurce`` \n Snippet: ``value: enums.SignalSource = driver.xy.xsource.get(xyAxis = repcap.XyAxis.Default)`` \n Defines the signal source that supplies the x-values of the XY-diagram. :param xyAxis: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Xy') :return: xsource: NONE | C1 | C2 | ... | C8 | M1 | M2 | ... | M8 | R1 | R2 | ... | R8 | TRK1 | TRK2 | TRK3 | ... | TRK24 | OnC1 | OnC2 | ... | OnC8 (n = 2 to 11 """ xyAxis_cmd_val = self._cmd_group.get_repcap_cmd_value(xyAxis, repcap.XyAxis) response = self._core.io.query_str(f'XY{xyAxis_cmd_val}:XSOurce?') return Conversions.str_to_scalar_enum(response, enums.SignalSource)