Source code for RsSmbv.Implementations.Calibration.Level.Attenuator

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: 2
	| Subgroups: 0
	| Direct child commands: 2
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("attenuator", core, parent)

	# 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}')