from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import enums
# 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, window_name: enums.WindowName) -> None:
"""
``OUTPut:ADEMod[:ONLine]:SOURce`` \n
Snippet: ``driver.output.ademod.online.source.set(window_name = enums.WindowName.FOCus)`` \n
Selects the result display whose results are output. Only active time domain results can be selected.
:param window_name: (enum or string) string String containing the name of the window. By default, the name of a window is the same as its index. To determine the name and index of all active windows, use the method ``RsFsw.layout.catalog.window.get()`` query. FOCus Dynamically switches to the currently selected window. If a window is selected that does not contain a time-domain result display, the selection is ignored and the previous setting is maintained.
"""
param = Conversions.enum_ext_scalar_to_str(window_name, enums.WindowName)
self._core.io.write(f'OUTPut:ADEMod:ONLine:SOURce {param}')
# noinspection PyTypeChecker
[docs]
def get(self) -> enums.WindowName:
"""
``OUTPut:ADEMod[:ONLine]:SOURce`` \n
Snippet: ``value: enums.WindowName = driver.output.ademod.online.source.get()`` \n
Selects the result display whose results are output. Only active time domain results can be selected.
:return: window_name: (enum or string) string String containing the name of the window. By default, the name of a window is the same as its index. To determine the name and index of all active windows, use the method ``RsFsw.layout.catalog.window.get()`` query. FOCus Dynamically switches to the currently selected window. If a window is selected that does not contain a time-domain result display, the selection is ignored and the previous setting is maintained.
"""
response = self._core.io.query_str(f'OUTPut:ADEMod:ONLine:SOURce?')
return Conversions.str_to_scalar_enum_ext(response, enums.WindowName)