from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ......Internal.Utilities import trim_str_response
from ...... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class SelectCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("select", core, parent)
[docs]
def set(self, config: str, channel=repcap.Channel.Default) -> None:
"""
``CHANnel<*>:EFRontend:FREQuency:BCONfig:SELect`` \n
Snippet: ``driver.channel.efrontend.frequency.bconfig.select.set(config = 'abc', channel = repcap.Channel.Default)`` \n
Defines the intermediate frequency (output) range of the external frontend.
:param config: String. The following values are possible: \n
- 'IF LOW': A higher intermediate frequency is used on the external frontend, resulting in a higher input frequency at the R&S RTP.Only available for frontends R&S FE44S and R&S FE50DTR.
- 'IF HIGH': A lower intermediate frequency is used on the external frontend, resulting in a lower input frequency at the R&S RTP.Only available for frontends R&S FE44S and R&S FE50DTR.
- 'Spur Optimized': Avoids unwanted spurious effects on the IF output.Only available for frontends R&S FE110ST and R&S FE170SR.
- 'EVM Optimized': The IF output provides an optimal EVM result.Only available for frontends R&S FE170SR.
:param channel: optional repeated capability selector. Default value: Ch1 (settable in the interface 'Channel')
"""
param = Conversions.value_to_quoted_str(config)
channel_cmd_val = self._cmd_group.get_repcap_cmd_value(channel, repcap.Channel)
self._core.io.write_with_opc(f'CHANnel{channel_cmd_val}:EFRontend:FREQuency:BCONfig:SELect {param}')
[docs]
def get(self, channel=repcap.Channel.Default) -> str:
"""
``CHANnel<*>:EFRontend:FREQuency:BCONfig:SELect`` \n
Snippet: ``value: str = driver.channel.efrontend.frequency.bconfig.select.get(channel = repcap.Channel.Default)`` \n
Defines the intermediate frequency (output) range of the external frontend.
:param channel: optional repeated capability selector. Default value: Ch1 (settable in the interface 'Channel')
:return: config: String. The following values are possible: \n
- 'IF LOW': A higher intermediate frequency is used on the external frontend, resulting in a higher input frequency at the R&S RTP.Only available for frontends R&S FE44S and R&S FE50DTR.
- 'IF HIGH': A lower intermediate frequency is used on the external frontend, resulting in a lower input frequency at the R&S RTP.Only available for frontends R&S FE44S and R&S FE50DTR.
- 'Spur Optimized': Avoids unwanted spurious effects on the IF output.Only available for frontends R&S FE110ST and R&S FE170SR.
- 'EVM Optimized': The IF output provides an optimal EVM result.Only available for frontends R&S FE170SR.
"""
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}:EFRontend:FREQuency:BCONfig:SELect?')
return trim_str_response(response)