from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class RoscillatorCls:
"""
| Commands in total: 11
| Subgroups: 3
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("roscillator", core, parent)
@property
def external(self):
"""
| Commands in total: 6
| Subgroups: 2
| Direct child commands: 3
"""
if not hasattr(self, '_external'):
from .External import ExternalCls
self._external = ExternalCls(self._core, self._cmd_group)
return self._external
@property
def output(self):
"""
| Commands in total: 2
| Subgroups: 2
| Direct child commands: 0
"""
if not hasattr(self, '_output'):
from .Output import OutputCls
self._output = OutputCls(self._core, self._cmd_group)
return self._output
@property
def internal(self):
"""
| Commands in total: 2
| Subgroups: 1
| Direct child commands: 0
"""
if not hasattr(self, '_internal'):
from .Internal import InternalCls
self._internal = InternalCls(self._core, self._cmd_group)
return self._internal
# noinspection PyTypeChecker
[docs]
def get_source(self) -> enums.RoscSourSetup:
"""
``[SOURce]:ROSCillator:SOURce`` \n
Snippet: ``value: enums.RoscSourSetup = driver.source.roscillator.get_source()`` \n
Selects between internal or external reference frequency.
:return: source: INTernal | EXTernal
"""
response = self._core.io.query_str('SOURce:ROSCillator:SOURce?')
return Conversions.str_to_scalar_enum(response, enums.RoscSourSetup)
[docs]
def set_source(self, source: enums.RoscSourSetup) -> None:
"""
``[SOURce]:ROSCillator:SOURce`` \n
Snippet: ``driver.source.roscillator.set_source(source = enums.RoscSourSetup.ELOop)`` \n
Selects between internal or external reference frequency.
:param source: INTernal | EXTernal
"""
param = Conversions.enum_scalar_to_str(source, enums.RoscSourSetup)
self._core.io.write(f'SOURce:ROSCillator:SOURce {param}')
def clone(self) -> 'RoscillatorCls':
"""
Clones the group by creating new object from it and its whole existing subgroups.
Also copies all the existing default Repeated Capabilities setting,
which you can change independently without affecting the original group.
"""
new_group = RoscillatorCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group