Source code for rsmxo.Implementations.Power.Soa.Mtest.OnViolation.WfmSave

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

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

[docs] def set(self, save_wfm: enums.TriggerAction, power=repcap.Power.Default, maskTest=repcap.MaskTest.Default) -> None: """ ``POWer<*>:SOA:MTESt<*>:ONViolation:WFMSave`` \n Snippet: ``driver.power.soa.mtest.onViolation.wfmSave.set(save_wfm = enums.TriggerAction.NOACtion, power = repcap.Power.Default, maskTest = repcap.MaskTest.Default)`` \n Saves the waveform data to file if the command is set to SUCCess or VIOLation. To define the path and file names, use the EXPort:WAVeform:AUTonaming:* commands: \n - method ``RsMxo.export.waveform.autoNaming.name()`` - method ``RsMxo.export.waveform.autoNaming.path()`` - method ``RsMxo.export.waveform.autoNaming.type_py()`` :param save_wfm: NOACtion | SUCCess | VIOLation :param power: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Power') :param maskTest: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Mtest') """ param = Conversions.enum_scalar_to_str(save_wfm, enums.TriggerAction) power_cmd_val = self._cmd_group.get_repcap_cmd_value(power, repcap.Power) maskTest_cmd_val = self._cmd_group.get_repcap_cmd_value(maskTest, repcap.MaskTest) self._core.io.write(f'POWer{power_cmd_val}:SOA:MTESt{maskTest_cmd_val}:ONViolation:WFMSave {param}')
# noinspection PyTypeChecker
[docs] def get(self, power=repcap.Power.Default, maskTest=repcap.MaskTest.Default) -> enums.TriggerAction: """ ``POWer<*>:SOA:MTESt<*>:ONViolation:WFMSave`` \n Snippet: ``value: enums.TriggerAction = driver.power.soa.mtest.onViolation.wfmSave.get(power = repcap.Power.Default, maskTest = repcap.MaskTest.Default)`` \n Saves the waveform data to file if the command is set to SUCCess or VIOLation. To define the path and file names, use the EXPort:WAVeform:AUTonaming:* commands: \n - method ``RsMxo.export.waveform.autoNaming.name()`` - method ``RsMxo.export.waveform.autoNaming.path()`` - method ``RsMxo.export.waveform.autoNaming.type_py()`` :param power: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Power') :param maskTest: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Mtest') :return: save_wfm: NOACtion | SUCCess | VIOLation """ power_cmd_val = self._cmd_group.get_repcap_cmd_value(power, repcap.Power) maskTest_cmd_val = self._cmd_group.get_repcap_cmd_value(maskTest, repcap.MaskTest) response = self._core.io.query_str(f'POWer{power_cmd_val}:SOA:MTESt{maskTest_cmd_val}:ONViolation:WFMSave?') return Conversions.str_to_scalar_enum(response, enums.TriggerAction)