from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class SetupCls:
"""
| Commands in total: 10
| Subgroups: 4
| Direct child commands: 3
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("setup", core, parent)
@property
def add(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_add'):
from .Add import AddCls
self._add = AddCls(self._core, self._cmd_group)
return self._add
@property
def srEstimation(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_srEstimation'):
from .SrEstimation import SrEstimationCls
self._srEstimation = SrEstimationCls(self._core, self._cmd_group)
return self._srEstimation
@property
def propagate(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_propagate'):
from .Propagate import PropagateCls
self._propagate = PropagateCls(self._core, self._cmd_group)
return self._propagate
@property
def setting(self):
"""
| Commands in total: 4
| Subgroups: 4
| Direct child commands: 0
"""
if not hasattr(self, '_setting'):
from .Setting import SettingCls
self._setting = SettingCls(self._core, self._cmd_group)
return self._setting
[docs]
def set_remove(self, index: int) -> None:
"""
``SIGNalconfig:SETup:REMove`` \n
Snippet: ``driver.signalConfig.setup.set_remove(index = 1)`` \n
Removes the signal with the corresponding index.
"""
param = Conversions.decimal_value_to_str(index)
self._core.io.write_with_opc(f'SIGNalconfig:SETup:REMove {param}')
# noinspection PyTypeChecker
[docs]
def get_source(self) -> enums.SignalSource:
"""
``SIGNalconfig:SETup:SOURce`` \n
Snippet: ``value: enums.SignalSource = driver.signalConfig.setup.get_source()`` \n
Selects the source that is used for the symbol rate estimation. You can only select sources that has been enabled You can
start the estimation of the symbol rate with method ``RsRtx.signalConfig.setup.srEstimation.set()``
:return: source: NONE | C1W1 | C1W2 | C1W3 | C2W1 | C2W2 | C2W3 | C3W1 | C3W2 | C3W3 | C4W1 | C4W2 | C4W3 | C1W4 | C2W4 | C3W4 | C4W4 | M1 | M2 | M3 | M4 | M5 | M6 | M7 | M8 | R1 | R2 | R3 | R4 | DIFF1 | DIFF2 | COMMON1 | COMMON2
"""
response = self._core.io.query_str_with_opc('SIGNalconfig:SETup:SOURce?')
return Conversions.str_to_scalar_enum(response, enums.SignalSource)
[docs]
def set_source(self, source: enums.SignalSource) -> None:
"""
``SIGNalconfig:SETup:SOURce`` \n
Snippet: ``driver.signalConfig.setup.set_source(source = enums.SignalSource.AJ1)`` \n
Selects the source that is used for the symbol rate estimation. You can only select sources that has been enabled You can
start the estimation of the symbol rate with method ``RsRtx.signalConfig.setup.srEstimation.set()``
:param source: NONE | C1W1 | C1W2 | C1W3 | C2W1 | C2W2 | C2W3 | C3W1 | C3W2 | C3W3 | C4W1 | C4W2 | C4W3 | C1W4 | C2W4 | C3W4 | C4W4 | M1 | M2 | M3 | M4 | M5 | M6 | M7 | M8 | R1 | R2 | R3 | R4 | DIFF1 | DIFF2 | COMMON1 | COMMON2
"""
param = Conversions.enum_scalar_to_str(source, enums.SignalSource)
self._core.io.write_with_opc(f'SIGNalconfig:SETup:SOURce {param}')
[docs]
def get_count(self) -> int:
"""
``SIGNalconfig:SETup:COUNt`` \n
Snippet: ``value: int = driver.signalConfig.setup.get_count()`` \n
Returns the number of lines defined in the signal configuration dialog.
"""
response = self._core.io.query_str_with_opc('SIGNalconfig:SETup:COUNt?')
return Conversions.str_to_int(response)
def clone(self) -> 'SetupCls':
"""
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 = SetupCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group