from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class LevelCls:
"""
| Commands in total: 10
| Subgroups: 4
| Direct child commands: 2
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("level", core, parent)
@property
def amplifier(self):
"""
| Commands in total: 4
| Subgroups: 1
| Direct child commands: 0
"""
if not hasattr(self, '_amplifier'):
from .Amplifier import AmplifierCls
self._amplifier = AmplifierCls(self._core, self._cmd_group)
return self._amplifier
@property
def attenuator(self):
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
if not hasattr(self, '_attenuator'):
from .Attenuator import AttenuatorCls
self._attenuator = AttenuatorCls(self._core, self._cmd_group)
return self._attenuator
@property
def detAtt(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_detAtt'):
from .DetAtt import DetAttCls
self._detAtt = DetAttCls(self._core, self._cmd_group)
return self._detAtt
@property
def measure(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_measure'):
from .Measure import MeasureCls
self._measure = MeasureCls(self._core, self._cmd_group)
return self._measure
# noinspection PyTypeChecker
[docs]
def get_bandwidth(self) -> enums.CalPowBandwidth:
"""
``CALibration:LEVel:BWIDth`` \n
Snippet: ``value: enums.CalPowBandwidth = driver.calibration.level.get_bandwidth()`` \n
No help available
"""
response = self._core.io.query_str('CALibration:LEVel:BWIDth?')
return Conversions.str_to_scalar_enum(response, enums.CalPowBandwidth)
[docs]
def set_bandwidth(self, bandwidth: enums.CalPowBandwidth) -> None:
"""
``CALibration:LEVel:BWIDth`` \n
Snippet: ``driver.calibration.level.set_bandwidth(bandwidth = enums.CalPowBandwidth.AUTO)`` \n
No help available
"""
param = Conversions.enum_scalar_to_str(bandwidth, enums.CalPowBandwidth)
self._core.io.write(f'CALibration:LEVel:BWIDth {param}')
# noinspection PyTypeChecker
[docs]
def get_state(self) -> enums.StateExtended:
"""
``CALibration<HW>:LEVel:STATe`` \n
Snippet: ``value: enums.StateExtended = driver.calibration.level.get_state()`` \n
No help available
"""
response = self._core.io.query_str('CALibration<HwInstance>:LEVel:STATe?')
return Conversions.str_to_scalar_enum(response, enums.StateExtended)
[docs]
def set_state(self, state: enums.StateExtended) -> None:
"""
``CALibration<HW>:LEVel:STATe`` \n
Snippet: ``driver.calibration.level.set_state(state = enums.StateExtended._0)`` \n
No help available
"""
param = Conversions.enum_scalar_to_str(state, enums.StateExtended)
self._core.io.write(f'CALibration<HwInstance>:LEVel:STATe {param}')
def clone(self) -> 'LevelCls':
"""
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 = LevelCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group