Source code for RsSmw.Implementations.Test.Bb.Generator.Gain

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


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

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

[docs] def get_icomponent(self) -> float: """ ``TEST:BB:GENerator:GAIN:I`` \n Snippet: ``value: float = driver.test.bb.generator.gain.get_icomponent()`` \n No help available """ response = self._core.io.query_str('TEST:BB:GENerator:GAIN:I?') return Conversions.str_to_float(response)
[docs] def set_icomponent(self, test_gen_gain_i: float) -> None: """ ``TEST:BB:GENerator:GAIN:I`` \n Snippet: ``driver.test.bb.generator.gain.set_icomponent(test_gen_gain_i = 1.0)`` \n No help available """ param = Conversions.decimal_value_to_str(test_gen_gain_i) self._core.io.write(f'TEST:BB:GENerator:GAIN:I {param}')
[docs] def get_qcomponent(self) -> float: """ ``TEST:BB:GENerator:GAIN:Q`` \n Snippet: ``value: float = driver.test.bb.generator.gain.get_qcomponent()`` \n No help available """ response = self._core.io.query_str('TEST:BB:GENerator:GAIN:Q?') return Conversions.str_to_float(response)
[docs] def set_qcomponent(self, test_gen_gain_q: float) -> None: """ ``TEST:BB:GENerator:GAIN:Q`` \n Snippet: ``driver.test.bb.generator.gain.set_qcomponent(test_gen_gain_q = 1.0)`` \n No help available """ param = Conversions.decimal_value_to_str(test_gen_gain_q) self._core.io.write(f'TEST:BB:GENerator:GAIN:Q {param}')
[docs] def get_value(self) -> float: """ ``TEST:BB:GENerator:GAIN`` \n Snippet: ``value: float = driver.test.bb.generator.gain.get_value()`` \n Sets the gain for a sine or constant I/Q test signal. :return: gain: float Range: -1 to 1 """ response = self._core.io.query_str('TEST:BB:GENerator:GAIN?') return Conversions.str_to_float(response)
[docs] def set_value(self, gain: float) -> None: """ ``TEST:BB:GENerator:GAIN`` \n Snippet: ``driver.test.bb.generator.gain.set_value(gain = 1.0)`` \n Sets the gain for a sine or constant I/Q test signal. :param gain: float Range: -1 to 1 """ param = Conversions.decimal_value_to_str(gain) self._core.io.write(f'TEST:BB:GENerator:GAIN {param}')