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 SourceCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("source", core, parent)
[docs]
def set(self, source: enums.SourceInt, mimoAntenna=repcap.MimoAntenna.Default) -> None:
"""
``SOURce<si>:EXTernal:ROSCillator[:SOURce]`` \n
Snippet: ``driver.applications.k30NoiseFigure.source.external.roscillator.source.set(source = enums.SourceInt.EXTernal, mimoAntenna = repcap.MimoAntenna.Default)`` \n
Controls selection of the reference oscillator for the external generator. Is only valid if External Generator Control
(R&S FSW-B10) is installed. If the external reference oscillator is selected, the reference signal must be connected to
the rear panel of the instrument.
:param source: INTernal Uses the internal reference. EXTernal Uses the external reference; if none is available, an error flag is displayed in the status bar.
:param mimoAntenna: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Source')
"""
param = Conversions.enum_scalar_to_str(source, enums.SourceInt)
mimoAntenna_cmd_val = self._cmd_group.get_repcap_cmd_value(mimoAntenna, repcap.MimoAntenna)
self._core.io.write(f'SOURce{mimoAntenna_cmd_val}:EXTernal:ROSCillator:SOURce {param}')
# noinspection PyTypeChecker
[docs]
def get(self, mimoAntenna=repcap.MimoAntenna.Default) -> enums.SourceInt:
"""
``SOURce<si>:EXTernal:ROSCillator[:SOURce]`` \n
Snippet: ``value: enums.SourceInt = driver.applications.k30NoiseFigure.source.external.roscillator.source.get(mimoAntenna = repcap.MimoAntenna.Default)`` \n
Controls selection of the reference oscillator for the external generator. Is only valid if External Generator Control
(R&S FSW-B10) is installed. If the external reference oscillator is selected, the reference signal must be connected to
the rear panel of the instrument.
:param mimoAntenna: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Source')
:return: source: INTernal Uses the internal reference. EXTernal Uses the external reference; if none is available, an error flag is displayed in the status bar.
"""
mimoAntenna_cmd_val = self._cmd_group.get_repcap_cmd_value(mimoAntenna, repcap.MimoAntenna)
response = self._core.io.query_str(f'SOURce{mimoAntenna_cmd_val}:EXTernal:ROSCillator:SOURce?')
return Conversions.str_to_scalar_enum(response, enums.SourceInt)