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, mlt_ch_impt_wfm_sel: enums.RefCurveMultichImpWform, refCurve=repcap.RefCurve.Default) -> None:
"""
``REFCurve<*>:MULTichannel:IMPort`` \n
Snippet: ``driver.refCurve.multiChannel.importPy.set(mlt_ch_impt_wfm_sel = enums.RefCurveMultichImpWform.NONE, refCurve = repcap.RefCurve.Default)`` \n
Assigns a waveform from the multichannel file to a reference waveform. To import all waveforms that are in the file, you
must assign each waveform to another reference waveform.
:param mlt_ch_impt_wfm_sel: WF1 = WAVeform1, WF2 = WAVeform2, WF3 = WAVeform3, WF4 = WAVeform4 Selects the waveform in the export file.
:param refCurve: optional repeated capability selector. Default value: Nr1 (settable in the interface 'RefCurve')
"""
param = Conversions.enum_scalar_to_str(mlt_ch_impt_wfm_sel, enums.RefCurveMultichImpWform)
refCurve_cmd_val = self._cmd_group.get_repcap_cmd_value(refCurve, repcap.RefCurve)
self._core.io.write_with_opc(f'REFCurve{refCurve_cmd_val}:MULTichannel:IMPort {param}')
# noinspection PyTypeChecker
[docs]
def get(self, refCurve=repcap.RefCurve.Default) -> enums.RefCurveMultichImpWform:
"""
``REFCurve<*>:MULTichannel:IMPort`` \n
Snippet: ``value: enums.RefCurveMultichImpWform = driver.refCurve.multiChannel.importPy.get(refCurve = repcap.RefCurve.Default)`` \n
Assigns a waveform from the multichannel file to a reference waveform. To import all waveforms that are in the file, you
must assign each waveform to another reference waveform.
:param refCurve: optional repeated capability selector. Default value: Nr1 (settable in the interface 'RefCurve')
:return: mlt_ch_impt_wfm_sel: WF1 = WAVeform1, WF2 = WAVeform2, WF3 = WAVeform3, WF4 = WAVeform4 Selects the waveform in the export file.
"""
refCurve_cmd_val = self._cmd_group.get_repcap_cmd_value(refCurve, repcap.RefCurve)
response = self._core.io.query_str_with_opc(f'REFCurve{refCurve_cmd_val}:MULTichannel:IMPort?')
return Conversions.str_to_scalar_enum(response, enums.RefCurveMultichImpWform)