Source code for RsSmw.Implementations.Source.Bb.Dm.Pramp

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class PrampCls:
	"""
	| Commands in total: 8
	| Subgroups: 1
	| Direct child commands: 7
	"""

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

	@property
	def bbOnly(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_bbOnly'):
			from .BbOnly import BbOnlyCls
			self._bbOnly = BbOnlyCls(self._core, self._cmd_group)
		return self._bbOnly

[docs] def get_attenuation(self) -> float: """ ``[SOURce<HW>]:BB:DM:PRAMp:ATTenuation`` \n Snippet: ``value: float = driver.source.bb.dm.pramp.get_attenuation()`` \n Sets the level attenuation for signal ranges that are flagged with the level attribute attenuated by the control signal. :return: attenuation: float Range: 0 to 50, Unit: dB """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DM:PRAMp:ATTenuation?') return Conversions.str_to_float(response)
[docs] def set_attenuation(self, attenuation: float) -> None: """ ``[SOURce<HW>]:BB:DM:PRAMp:ATTenuation`` \n Snippet: ``driver.source.bb.dm.pramp.set_attenuation(attenuation = 1.0)`` \n Sets the level attenuation for signal ranges that are flagged with the level attribute attenuated by the control signal. :param attenuation: float Range: 0 to 50, Unit: dB """ param = Conversions.decimal_value_to_str(attenuation) self._core.io.write(f'SOURce<HwInstance>:BB:DM:PRAMp:ATTenuation {param}')
[docs] def get_fdelay(self) -> float: """ ``[SOURce<HW>]:BB:DM:PRAMp:FDELay`` \n Snippet: ``value: float = driver.source.bb.dm.pramp.get_fdelay()`` \n Sets the delay in the rising edge. """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DM:PRAMp:FDELay?') return Conversions.str_to_float(response)
[docs] def set_fdelay(self, fdelay: float) -> None: """ ``[SOURce<HW>]:BB:DM:PRAMp:FDELay`` \n Snippet: ``driver.source.bb.dm.pramp.set_fdelay(fdelay = 1.0)`` \n Sets the delay in the rising edge. :param fdelay: float Range: 0 to 4, Unit: symbol """ param = Conversions.decimal_value_to_str(fdelay) self._core.io.write(f'SOURce<HwInstance>:BB:DM:PRAMp:FDELay {param}')
[docs] def get_rdelay(self) -> float: """ ``[SOURce<HW>]:BB:DM:PRAMp:RDELay`` \n Snippet: ``value: float = driver.source.bb.dm.pramp.get_rdelay()`` \n Sets the delay in the rising edge. :return: rdelay: float Range: 0 to 4, Unit: symbol """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DM:PRAMp:RDELay?') return Conversions.str_to_float(response)
[docs] def set_rdelay(self, rdelay: float) -> None: """ ``[SOURce<HW>]:BB:DM:PRAMp:RDELay`` \n Snippet: ``driver.source.bb.dm.pramp.set_rdelay(rdelay = 1.0)`` \n Sets the delay in the rising edge. :param rdelay: float Range: 0 to 4, Unit: symbol """ param = Conversions.decimal_value_to_str(rdelay) self._core.io.write(f'SOURce<HwInstance>:BB:DM:PRAMp:RDELay {param}')
# noinspection PyTypeChecker
[docs] def get_shape(self) -> enums.RampFunc: """ ``[SOURce<HW>]:BB:DM:PRAMp:SHAPe`` \n Snippet: ``value: enums.RampFunc = driver.source.bb.dm.pramp.get_shape()`` \n Sets the edge shape of the ramp envelope. :return: shape: LINear | COSine """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DM:PRAMp:SHAPe?') return Conversions.str_to_scalar_enum(response, enums.RampFunc)
[docs] def set_shape(self, shape: enums.RampFunc) -> None: """ ``[SOURce<HW>]:BB:DM:PRAMp:SHAPe`` \n Snippet: ``driver.source.bb.dm.pramp.set_shape(shape = enums.RampFunc.COSine)`` \n Sets the edge shape of the ramp envelope. :param shape: LINear | COSine """ param = Conversions.enum_scalar_to_str(shape, enums.RampFunc) self._core.io.write(f'SOURce<HwInstance>:BB:DM:PRAMp:SHAPe {param}')
# noinspection PyTypeChecker
[docs] def get_source(self) -> enums.ClockSourceA: """ ``[SOURce<HW>]:BB:DM:PRAMp:SOURce`` \n Snippet: ``value: enums.ClockSourceA = driver.source.bb.dm.pramp.get_source()`` \n Sets the source for the power ramp control signals. :return: source: INTernal """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DM:PRAMp:SOURce?') return Conversions.str_to_scalar_enum(response, enums.ClockSourceA)
[docs] def set_source(self, source: enums.ClockSourceA) -> None: """ ``[SOURce<HW>]:BB:DM:PRAMp:SOURce`` \n Snippet: ``driver.source.bb.dm.pramp.set_source(source = enums.ClockSourceA.INTernal)`` \n Sets the source for the power ramp control signals. :param source: INTernal """ param = Conversions.enum_scalar_to_str(source, enums.ClockSourceA) self._core.io.write(f'SOURce<HwInstance>:BB:DM:PRAMp:SOURce {param}')
[docs] def get_time(self) -> float: """ ``[SOURce<HW>]:BB:DM:PRAMp:TIME`` \n Snippet: ``value: float = driver.source.bb.dm.pramp.get_time()`` \n Sets the power ramping rise time and fall time for a burst. :return: time: float Range: 0.25 to 16, Unit: symbol """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DM:PRAMp:TIME?') return Conversions.str_to_float(response)
[docs] def set_time(self, time: float) -> None: """ ``[SOURce<HW>]:BB:DM:PRAMp:TIME`` \n Snippet: ``driver.source.bb.dm.pramp.set_time(time = 1.0)`` \n Sets the power ramping rise time and fall time for a burst. :param time: float Range: 0.25 to 16, Unit: symbol """ param = Conversions.decimal_value_to_str(time) self._core.io.write(f'SOURce<HwInstance>:BB:DM:PRAMp:TIME {param}')
[docs] def get_state(self) -> bool: """ ``[SOURce<HW>]:BB:DM:PRAMp:[STATe]`` \n Snippet: ``value: bool = driver.source.bb.dm.pramp.get_state()`` \n Enables power ramping. :return: state: 1 | ON | 0| OFF """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DM:PRAMp:STATe?') return Conversions.str_to_bool(response)
[docs] def set_state(self, state: bool) -> None: """ ``[SOURce<HW>]:BB:DM:PRAMp:[STATe]`` \n Snippet: ``driver.source.bb.dm.pramp.set_state(state = False)`` \n Enables power ramping. :param state: 1 | ON | 0| OFF """ param = Conversions.bool_to_str(state) self._core.io.write(f'SOURce<HwInstance>:BB:DM:PRAMp:STATe {param}')
def clone(self) -> 'PrampCls': """ 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 = PrampCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group