from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ...... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ClockCls:
"""
| Commands in total: 6
| Subgroups: 1
| Direct child commands: 4
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("clock", core, parent)
@property
def synchronization(self):
"""
| Commands in total: 2
| Subgroups: 1
| Direct child commands: 1
"""
if not hasattr(self, '_synchronization'):
from .Synchronization import SynchronizationCls
self._synchronization = SynchronizationCls(self._core, self._cmd_group)
return self._synchronization
# noinspection PyTypeChecker
[docs]
def get_mode(self) -> enums.ClocModeB:
"""
``[SOURce<HW>]:BB:MCCW:CLOCk:MODE`` \n
Snippet: ``value: enums.ClocModeB = driver.source.bb.mccw.clock.get_mode()`` \n
Sets the type of externally supplied clock.
:return: mode: SAMPle
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:MCCW:CLOCk:MODE?')
return Conversions.str_to_scalar_enum(response, enums.ClocModeB)
[docs]
def get_multiplier(self) -> int:
"""
``[SOURce<HW>]:BB:MCCW:CLOCk:MULTiplier`` \n
Snippet: ``value: int = driver.source.bb.mccw.clock.get_multiplier()`` \n
No help available
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:MCCW:CLOCk:MULTiplier?')
return Conversions.str_to_int(response)
# noinspection PyTypeChecker
[docs]
def get_source(self) -> enums.ClockSourceC:
"""
``[SOURce<HW>]:BB:MCCW:CLOCk:SOURce`` \n
Snippet: ``value: enums.ClockSourceC = driver.source.bb.mccw.clock.get_source()`` \n
Selects the clock source: \n
- INTernal: Internal clock reference
- ELCLock: External local clock
- EXTernal = ELCLock: Setting only Provided for backward compatibility with other Rohde & Schwarz signal generators
:return: source: INTernal | ELCLock | EXTernal
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:MCCW:CLOCk:SOURce?')
return Conversions.str_to_scalar_enum(response, enums.ClockSourceC)
[docs]
def get_value(self) -> float:
"""
``[SOURce<HW>]:BB:MCCW:CLOCk`` \n
Snippet: ``value: float = driver.source.bb.mccw.clock.get_value()`` \n
Queries the output clock rate. The output clock rate depends on the number of carriers and on the selected carrier
spacing.
:return: clock: float Range: 0 to Max
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:MCCW:CLOCk?')
return Conversions.str_to_float(response)
def clone(self) -> 'ClockCls':
"""
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 = ClockCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group