Source code for rsrtx.Implementations.Wgenerator.ArbGen.MultiChannel.ImportPy

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

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

[docs] def set(self, saved_wfm_src: enums.WgenSavedWfmSrc, wgenerator=repcap.Wgenerator.Default) -> None: """ ``WGENerator<*>:ARBGen:MULTichannel:IMPort`` \n Snippet: ``driver.wgenerator.arbGen.multiChannel.importPy.set(saved_wfm_src = enums.WgenSavedWfmSrc.WFM1, wgenerator = repcap.Wgenerator.Default)`` \n Assigns a waveform from the multichannel file to the arbitrary waveform generator. :param saved_wfm_src: WFM1 | WFM2 | WFM3 | WFM4 :param wgenerator: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Wgenerator') """ param = Conversions.enum_scalar_to_str(saved_wfm_src, enums.WgenSavedWfmSrc) wgenerator_cmd_val = self._cmd_group.get_repcap_cmd_value(wgenerator, repcap.Wgenerator) self._core.io.write(f'WGENerator{wgenerator_cmd_val}:ARBGen:MULTichannel:IMPort {param}')
# noinspection PyTypeChecker
[docs] def get(self, wgenerator=repcap.Wgenerator.Default) -> enums.WgenSavedWfmSrc: """ ``WGENerator<*>:ARBGen:MULTichannel:IMPort`` \n Snippet: ``value: enums.WgenSavedWfmSrc = driver.wgenerator.arbGen.multiChannel.importPy.get(wgenerator = repcap.Wgenerator.Default)`` \n Assigns a waveform from the multichannel file to the arbitrary waveform generator. :param wgenerator: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Wgenerator') :return: saved_wfm_src: WFM1 | WFM2 | WFM3 | WFM4 """ wgenerator_cmd_val = self._cmd_group.get_repcap_cmd_value(wgenerator, repcap.Wgenerator) response = self._core.io.query_str(f'WGENerator{wgenerator_cmd_val}:ARBGen:MULTichannel:IMPort?') return Conversions.str_to_scalar_enum(response, enums.WgenSavedWfmSrc)