from ........Internal.Core import Core
from ........Internal.CommandsGroup import CommandsGroup
from ........Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class AutoCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("auto", core, parent)
[docs]
def set(self, state: bool) -> None:
"""
``TRIGger[:SEQuence]:LEVel:POWer:AUTO`` \n
Snippet: ``driver.applications.k91Wlan.trigger.sequence.level.power.auto.set(state = False)`` \n
By default, the optimum trigger level for power triggers is automatically measured and determined at the start of each
sweep (for Modulation Accuracy, Flatness, Tolerance... measurements) . Is only considered for TRIG:SEQ:SOUR IFP and
TRIG:SEQ:SOUR RFP, see method ``RsFsw.applications.k91Wlan.trigger.sequence.source.set()`` To define the trigger level
manually, switch this function off and define the level using method
``RsFsw.applications.k17Mcgd.trigger.sequence.level.ifPower.set()`` or method
``RsFsw.applications.k17Mcgd.trigger.sequence.level.rfPower.set()`` .
:param state: OFF | 0 Switches the auto level detection function off ON | 1 Switches the auto level detection function on
"""
param = Conversions.bool_to_str(state)
self._core.io.write(f'TRIGger:SEQuence:LEVel:POWer:AUTO {param}')
[docs]
def get(self) -> bool:
"""
``TRIGger[:SEQuence]:LEVel:POWer:AUTO`` \n
Snippet: ``value: bool = driver.applications.k91Wlan.trigger.sequence.level.power.auto.get()`` \n
By default, the optimum trigger level for power triggers is automatically measured and determined at the start of each
sweep (for Modulation Accuracy, Flatness, Tolerance... measurements) . Is only considered for TRIG:SEQ:SOUR IFP and
TRIG:SEQ:SOUR RFP, see method ``RsFsw.applications.k91Wlan.trigger.sequence.source.set()`` To define the trigger level
manually, switch this function off and define the level using method
``RsFsw.applications.k17Mcgd.trigger.sequence.level.ifPower.set()`` or method
``RsFsw.applications.k17Mcgd.trigger.sequence.level.rfPower.set()`` .
:return: state: OFF | 0 Switches the auto level detection function off ON | 1 Switches the auto level detection function on
"""
response = self._core.io.query_str(f'TRIGger:SEQuence:LEVel:POWer:AUTO?')
return Conversions.str_to_bool(response)