Source code for rsrtx.Implementations.Channel.Iq.Cfrequency

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


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

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

[docs] def set(self, iq_carrier_freq_input: float, channel=repcap.Channel.Default) -> None: """ ``CHANnel<*>:IQ:CFRequency`` \n Snippet: ``driver.channel.iq.cfrequency.set(iq_carrier_freq_input = 1.0, channel = repcap.Channel.Default)`` \n Sets the carrier frequency of the modulated RF signal or of the complex signal in IF range. Prerequisites: \n - method ``RsRtx.channel.iq.inpType.set()`` is set to REAL or: - method ``RsRtx.channel.iq.inpType.set()`` is set to COMPlex and method ``RsRtx.channel.iq.inpMode.set()`` is set to RFIF :param iq_carrier_freq_input: 10E-3 to 10E+9 :param channel: optional repeated capability selector. Default value: Ch1 (settable in the interface 'Channel') """ param = Conversions.decimal_value_to_str(iq_carrier_freq_input) channel_cmd_val = self._cmd_group.get_repcap_cmd_value(channel, repcap.Channel) self._core.io.write_with_opc(f'CHANnel{channel_cmd_val}:IQ:CFRequency {param}')
[docs] def get(self, channel=repcap.Channel.Default) -> float: """ ``CHANnel<*>:IQ:CFRequency`` \n Snippet: ``value: float = driver.channel.iq.cfrequency.get(channel = repcap.Channel.Default)`` \n Sets the carrier frequency of the modulated RF signal or of the complex signal in IF range. Prerequisites: \n - method ``RsRtx.channel.iq.inpType.set()`` is set to REAL or: - method ``RsRtx.channel.iq.inpType.set()`` is set to COMPlex and method ``RsRtx.channel.iq.inpMode.set()`` is set to RFIF :param channel: optional repeated capability selector. Default value: Ch1 (settable in the interface 'Channel') :return: iq_carrier_freq_input: 10E-3 to 10E+9 """ channel_cmd_val = self._cmd_group.get_repcap_cmd_value(channel, repcap.Channel) response = self._core.io.query_str_with_opc(f'CHANnel{channel_cmd_val}:IQ:CFRequency?') return Conversions.str_to_float(response)