from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from ..... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class PresetConfigCls:
"""
| Commands in total: 8
| Subgroups: 7
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("presetConfig", core, parent)
@property
def mode(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_mode'):
from .Mode import ModeCls
self._mode = ModeCls(self._core, self._cmd_group)
return self._mode
@property
def measurement(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_measurement'):
from .Measurement import MeasurementCls
self._measurement = MeasurementCls(self._core, self._cmd_group)
return self._measurement
@property
def selMode(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_selMode'):
from .SelMode import SelModeCls
self._selMode = SelModeCls(self._core, self._cmd_group)
return self._selMode
@property
def lvlHeight(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_lvlHeight'):
from .LvlHeight import LvlHeightCls
self._lvlHeight = LvlHeightCls(self._core, self._cmd_group)
return self._lvlHeight
@property
def explicit(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_explicit'):
from .Explicit import ExplicitCls
self._explicit = ExplicitCls(self._core, self._cmd_group)
return self._explicit
@property
def base(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_base'):
from .Base import BaseCls
self._base = BaseCls(self._core, self._cmd_group)
return self._base
@property
def target(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_target'):
from .Target import TargetCls
self._target = TargetCls(self._core, self._cmd_group)
return self._target
[docs]
def preset(self, measurement=repcap.Measurement.Default) -> None:
"""
``MEASurement<*>:PAMResults:PRESetconfig:PRESet`` \n
Snippet: ``driver.measurement.pamResults.presetConfig.preset(measurement = repcap.Measurement.Default)`` \n
Adds a pre-defined preset configuration for the selected component to the active measurements.
:param measurement: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement')
"""
measurement_cmd_val = self._cmd_group.get_repcap_cmd_value(measurement, repcap.Measurement)
self._core.io.write(f'MEASurement{measurement_cmd_val}:PAMResults:PRESetconfig:PRESet')
[docs]
def preset_and_wait(self, measurement=repcap.Measurement.Default, opc_timeout_ms: int = -1) -> None:
measurement_cmd_val = self._cmd_group.get_repcap_cmd_value(measurement, repcap.Measurement)
"""
``MEASurement<*>:PAMResults:PRESetconfig:PRESet`` \n
Snippet: ``driver.measurement.pamResults.presetConfig.preset_and_wait(measurement = repcap.Measurement.Default)`` \n
Adds a pre-defined preset configuration for the selected component to the active measurements.
Same as preset, but waits for the operation to complete before continuing further. Use the RsRtx.utilities.opc_timeout_set() to set the timeout value.
:param measurement: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement')
:param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call.
"""
self._core.io.write_with_opc(f'MEASurement{measurement_cmd_val}:PAMResults:PRESetconfig:PRESet', opc_timeout_ms)
def clone(self) -> 'PresetConfigCls':
"""
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 = PresetConfigCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group