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: 2
| Subgroups: 1
| 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: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_external'):
from .External import ExternalCls
self._external = ExternalCls(self._core, self._cmd_group)
return self._external
# noinspection PyTypeChecker
[docs]
def get_source(self) -> enums.SourceInt:
"""
``SENSe[:ROSCillator]:SOURce`` \n
Snippet: ``value: enums.SourceInt = driver.sense.roscillator.get_source()`` \n
Enables the use of the external reference signal instead of the internal OCXO reference.
"""
response = self._core.io.query_str_with_opc('SENSe:ROSCillator:SOURce?')
return Conversions.str_to_scalar_enum(response, enums.SourceInt)
[docs]
def set_source(self, ref_osc_source: enums.SourceInt) -> None:
"""
``SENSe[:ROSCillator]:SOURce`` \n
Snippet: ``driver.sense.roscillator.set_source(ref_osc_source = enums.SourceInt.EXTernal)`` \n
Enables the use of the external reference signal instead of the internal OCXO reference.
:param ref_osc_source: INTernal | EXTernal
"""
param = Conversions.enum_scalar_to_str(ref_osc_source, enums.SourceInt)
self._core.io.write_with_opc(f'SENSe: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