from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class AttenuatorCls:
"""
| Commands in total: 3
| Subgroups: 0
| Direct child commands: 3
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("attenuator", core, parent)
# noinspection PyTypeChecker
[docs]
def get_amplifier(self) -> enums.NumbersI:
"""
``CALibration<HW>:LEVel:ATTenuator:AMPLifier`` \n
Snippet: ``value: enums.NumbersI = driver.calibration.level.attenuator.get_amplifier()`` \n
No help available
"""
response = self._core.io.query_str('CALibration<HwInstance>:LEVel:ATTenuator:AMPLifier?')
return Conversions.str_to_scalar_enum(response, enums.NumbersI)
[docs]
def set_amplifier(self, att_amplifier: enums.NumbersI) -> None:
"""
``CALibration<HW>:LEVel:ATTenuator:AMPLifier`` \n
Snippet: ``driver.calibration.level.attenuator.set_amplifier(att_amplifier = enums.NumbersI._0)`` \n
No help available
"""
param = Conversions.enum_scalar_to_str(att_amplifier, enums.NumbersI)
self._core.io.write(f'CALibration<HwInstance>:LEVel:ATTenuator:AMPLifier {param}')
# noinspection PyTypeChecker
[docs]
def get_mode(self) -> enums.CalPowAttMode:
"""
``CALibration<HW>:LEVel:ATTenuator:MODE`` \n
Snippet: ``value: enums.CalPowAttMode = driver.calibration.level.attenuator.get_mode()`` \n
No help available
"""
response = self._core.io.query_str('CALibration<HwInstance>:LEVel:ATTenuator:MODE?')
return Conversions.str_to_scalar_enum(response, enums.CalPowAttMode)
[docs]
def get_stage(self) -> int:
"""
``CALibration<HW>:LEVel:ATTenuator:STAGe`` \n
Snippet: ``value: int = driver.calibration.level.attenuator.get_stage()`` \n
No help available
"""
response = self._core.io.query_str('CALibration<HwInstance>:LEVel:ATTenuator:STAGe?')
return Conversions.str_to_int(response)
[docs]
def set_stage(self, stage: int) -> None:
"""
``CALibration<HW>:LEVel:ATTenuator:STAGe`` \n
Snippet: ``driver.calibration.level.attenuator.set_stage(stage = 1)`` \n
No help available
"""
param = Conversions.decimal_value_to_str(stage)
self._core.io.write(f'CALibration<HwInstance>:LEVel:ATTenuator:STAGe {param}')