Source code for RsSmw.Implementations.Source.Bb.Pramp.Ramp.Stair.Step

from .......Internal.Core import Core
from .......Internal.CommandsGroup import CommandsGroup
from .......Internal import Conversions


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class StepCls:
	"""
	| Commands in total: 2
	| Subgroups: 0
	| Direct child commands: 2
	"""

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

[docs] def get_level(self) -> float: """ ``[SOURce<HW>]:BB:PRAMp:RAMP:STAir:STEP:LEVel`` \n Snippet: ``value: float = driver.source.bb.pramp.ramp.stair.step.get_level()`` \n Sets the power step size. :return: step: float Range: 0.01 to 10, Unit: dB """ response = self._core.io.query_str('SOURce<HwInstance>:BB:PRAMp:RAMP:STAir:STEP:LEVel?') return Conversions.str_to_float(response)
[docs] def set_level(self, step: float) -> None: """ ``[SOURce<HW>]:BB:PRAMp:RAMP:STAir:STEP:LEVel`` \n Snippet: ``driver.source.bb.pramp.ramp.stair.step.set_level(step = 1.0)`` \n Sets the power step size. :param step: float Range: 0.01 to 10, Unit: dB """ param = Conversions.decimal_value_to_str(step) self._core.io.write(f'SOURce<HwInstance>:BB:PRAMp:RAMP:STAir:STEP:LEVel {param}')
[docs] def get_state(self) -> bool: """ ``[SOURce<HW>]:BB:PRAMp:RAMP:STAir:STEP:[STATe]`` \n Snippet: ``value: bool = driver.source.bb.pramp.ramp.stair.step.get_state()`` \n Activates the edit mode to set the power step. To determine the power step size, use method ``RsSmw.source.bb.pramp.ramp.stair.step.level()`` . :return: enable_power_step: 1 | ON | 0| OFF """ response = self._core.io.query_str('SOURce<HwInstance>:BB:PRAMp:RAMP:STAir:STEP:STATe?') return Conversions.str_to_bool(response)
[docs] def set_state(self, enable_power_step: bool) -> None: """ ``[SOURce<HW>]:BB:PRAMp:RAMP:STAir:STEP:[STATe]`` \n Snippet: ``driver.source.bb.pramp.ramp.stair.step.set_state(enable_power_step = False)`` \n Activates the edit mode to set the power step. To determine the power step size, use method ``RsSmw.source.bb.pramp.ramp.stair.step.level()`` . :param enable_power_step: 1 | ON | 0| OFF """ param = Conversions.bool_to_str(enable_power_step) self._core.io.write(f'SOURce<HwInstance>:BB:PRAMp:RAMP:STAir:STEP:STATe {param}')