from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import enums
from .... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class SbifCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("sbif", core, parent)
[docs]
def set(self, iq_sideband_if: enums.IqSidebandIf, channel=repcap.Channel.Default) -> None:
"""
``CHANnel<*>:IQ:SBIF`` \n
Snippet: ``driver.channel.iq.sbif.set(iq_sideband_if = enums.IqSidebandIf.ILOWer, channel = repcap.Channel.Default)`` \n
Defines the sideband and the frequency position of complex modulated input signal in IF range. Prerequisites: method
``RsRtx.channel.iq.inpType.set()`` is set to COMPlex and method ``RsRtx.channel.iq.inpMode.set()`` is set to RFIF
:param iq_sideband_if: NUPPer: Upper sideband in normal position NLOWer: Lower sideband in normal position IUPPer: Upper sideband in inverse position ILOWer: Lower sideband in inverse position
:param channel: optional repeated capability selector. Default value: Ch1 (settable in the interface 'Channel')
"""
param = Conversions.enum_scalar_to_str(iq_sideband_if, enums.IqSidebandIf)
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:SBIF {param}')
# noinspection PyTypeChecker
[docs]
def get(self, channel=repcap.Channel.Default) -> enums.IqSidebandIf:
"""
``CHANnel<*>:IQ:SBIF`` \n
Snippet: ``value: enums.IqSidebandIf = driver.channel.iq.sbif.get(channel = repcap.Channel.Default)`` \n
Defines the sideband and the frequency position of complex modulated input signal in IF range. Prerequisites: 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_sideband_if: NUPPer: Upper sideband in normal position NLOWer: Lower sideband in normal position IUPPer: Upper sideband in inverse position ILOWer: Lower sideband in inverse position
"""
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:SBIF?')
return Conversions.str_to_scalar_enum(response, enums.IqSidebandIf)