Source code for RsSmw.Implementations.Source.Fsimulator.Frequency

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


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

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

	# noinspection PyTypeChecker
[docs] def get_detect(self) -> enums.TmastConn: """ ``[SOURce<HW>]:FSIMulator:FREQuency:DETect`` \n Snippet: ``value: enums.TmastConn = driver.source.fsimulator.frequency.get_detect()`` \n Queries the output interface the steam used to estimate the dedicated frequency is mapped to. :return: detect_primary: RFA | BBMM1 | RFB | BBMM2 | IQOUT1 | IQOUT2 | FAD1 | FAD2 | FAD4 | FAD3 | DEF """ response = self._core.io.query_str('SOURce<HwInstance>:FSIMulator:FREQuency:DETect?') return Conversions.str_to_scalar_enum(response, enums.TmastConn)
[docs] def get_value(self) -> float: """ ``[SOURce<HW>]:FSIMulator:FREQuency`` \n Snippet: ``value: float = driver.source.fsimulator.frequency.get_value()`` \n The effect depends on the selected mode: \n - If method ``RsSmw.source.fsimulator.sdestination()`` RF is selected, queries the estimated RF frequency. - If method ``RsSmw.source.fsimulator.sdestination()`` BB is selected, sets the frequency used for the calculation of the Doppler shift. :return: frequency: float Range: 1E5 to 100E9, Unit: Hz """ response = self._core.io.query_str('SOURce<HwInstance>:FSIMulator:FREQuency?') return Conversions.str_to_float(response)
[docs] def set_value(self, frequency: float) -> None: """ ``[SOURce<HW>]:FSIMulator:FREQuency`` \n Snippet: ``driver.source.fsimulator.frequency.set_value(frequency = 1.0)`` \n The effect depends on the selected mode: \n - If method ``RsSmw.source.fsimulator.sdestination()`` RF is selected, queries the estimated RF frequency. - If method ``RsSmw.source.fsimulator.sdestination()`` BB is selected, sets the frequency used for the calculation of the Doppler shift. :param frequency: float Range: 1E5 to 100E9, Unit: Hz """ param = Conversions.decimal_value_to_str(frequency) self._core.io.write(f'SOURce<HwInstance>:FSIMulator:FREQuency {param}')