Source code for RsFsw.Implementations.Calculate.Pmeter.Relative.Magnitude.Auto

from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ...... import enums
from ...... import repcap


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
[docs]class AutoCls: """Auto commands group definition. 1 total commands, 0 Subgroups, 1 group commands""" def __init__(self, core: Core, parent): self._core = core self._cmd_group = CommandsGroup("auto", core, parent)
[docs] def set(self, event: enums.EventOnce, window=repcap.Window.Default, powerMeter=repcap.PowerMeter.Default) -> None: """SCPI: CALCulate<n>:PMETer<p>:RELative[:MAGNitude]:AUTO \n Snippet: driver.calculate.pmeter.relative.magnitude.auto.set(event = enums.EventOnce.ONCE, window = repcap.Window.Default, powerMeter = repcap.PowerMeter.Default) \n Sets the current measurement result as the reference level for relative measurements. \n :param event: No help available :param window: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Calculate') :param powerMeter: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Pmeter') """ param = Conversions.enum_scalar_to_str(event, enums.EventOnce) window_cmd_val = self._cmd_group.get_repcap_cmd_value(window, repcap.Window) powerMeter_cmd_val = self._cmd_group.get_repcap_cmd_value(powerMeter, repcap.PowerMeter) self._core.io.write(f'CALCulate{window_cmd_val}:PMETer{powerMeter_cmd_val}:RELative:MAGNitude:AUTO {param}')