from .......Internal.Core import Core
from .......Internal.CommandsGroup import CommandsGroup
from .......Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class AutoCls:
"""
| Commands in total: 6
| Subgroups: 3
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("auto", core, parent)
@property
def calibration(self):
"""
| Commands in total: 3
| Subgroups: 2
| Direct child commands: 0
"""
if not hasattr(self, '_calibration'):
from .Calibration import CalibrationCls
self._calibration = CalibrationCls(self._core, self._cmd_group)
return self._calibration
@property
def oevm(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_oevm'):
from .Oevm import OevmCls
self._oevm = OevmCls(self._core, self._cmd_group)
return self._oevm
@property
def sweep(self):
"""
| Commands in total: 1
| Subgroups: 1
| Direct child commands: 0
"""
if not hasattr(self, '_sweep'):
from .Sweep import SweepCls
self._sweep = SweepCls(self._core, self._cmd_group)
return self._sweep
[docs]
def set(self, mode: bool) -> None:
"""
``CONFigure:POWer:AUTO`` \n
Snippet: ``driver.applications.k91Wlan.configure.power.auto.set(mode = False)`` \n
Is used to switch on or off automatic power level detection.
:param mode: ON Automatic power level detection is performed at the start of each measurement sweep, and the reference level is adapted accordingly. OFF The reference level must be defined manually (see method ``RsFsw.applications.k60Transient.display.window.trace.y.scale.refLevel.set()`` ) ONCE Automatic power level detection is performed once at the start of the next measurement sweep, and the reference level is adapted accordingly. The command with this parameter corresponds to method ``RsFsw.sense.adjust.level.set()`` .
"""
param = Conversions.bool_to_str(mode)
self._core.io.write(f'CONFigure:POWer:AUTO {param}')
[docs]
def get(self) -> bool:
"""
``CONFigure:POWer:AUTO`` \n
Snippet: ``value: bool = driver.applications.k91Wlan.configure.power.auto.get()`` \n
Is used to switch on or off automatic power level detection.
:return: mode: ON Automatic power level detection is performed at the start of each measurement sweep, and the reference level is adapted accordingly. OFF The reference level must be defined manually (see method ``RsFsw.applications.k60Transient.display.window.trace.y.scale.refLevel.set()`` ) ONCE Automatic power level detection is performed once at the start of the next measurement sweep, and the reference level is adapted accordingly. The command with this parameter corresponds to method ``RsFsw.sense.adjust.level.set()`` .
"""
response = self._core.io.query_str(f'CONFigure:POWer:AUTO?')
return Conversions.str_to_bool(response)
def clone(self) -> 'AutoCls':
"""
Clones the group by creating new object from it and its whole existing subgroups.
Also copies all the existing default Repeated Capabilities setting,
which you can change independently without affecting the original group.
"""
new_group = AutoCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group