from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class InstrumentCls:
"""
| Commands in total: 32
| Subgroups: 8
| Direct child commands: 2
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("instrument", core, parent)
@property
def create(self):
"""
| Commands in total: 3
| Subgroups: 3
| Direct child commands: 0
"""
if not hasattr(self, '_create'):
from .Create import CreateCls
self._create = CreateCls(self._core, self._cmd_group)
return self._create
@property
def select(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_select'):
from .Select import SelectCls
self._select = SelectCls(self._core, self._cmd_group)
return self._select
@property
def selectName(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_selectName'):
from .SelectName import SelectNameCls
self._selectName = SelectNameCls(self._core, self._cmd_group)
return self._selectName
@property
def listPy(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_listPy'):
from .ListPy import ListPyCls
self._listPy = ListPyCls(self._core, self._cmd_group)
return self._listPy
@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 nselect(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_nselect'):
from .Nselect import NselectCls
self._nselect = NselectCls(self._core, self._cmd_group)
return self._nselect
@property
def rename(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_rename'):
from .Rename import RenameCls
self._rename = RenameCls(self._core, self._cmd_group)
return self._rename
@property
def couple(self):
"""
| Commands in total: 21
| Subgroups: 17
| Direct child commands: 0
"""
if not hasattr(self, '_couple'):
from .Couple import CoupleCls
self._couple = CoupleCls(self._core, self._cmd_group)
return self._couple
[docs]
def abort(self) -> None:
"""
``INSTrument:ABORt`` \n
Snippet: ``driver.instrument.abort()`` \n
No help available
"""
self._core.io.write(f'INSTrument:ABORt')
[docs]
def abort_with_opc(self, opc_timeout_ms: int = -1) -> None:
"""
``INSTrument:ABORt`` \n
Snippet: ``driver.instrument.abort_with_opc()`` \n
No help available
Same as abort, but waits for the operation to complete before continuing further. Use the RsFsw.utilities.opc_timeout_set() to set the timeout value.
:param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call.
"""
self._core.io.write_with_opc(f'INSTrument:ABORt', opc_timeout_ms)
[docs]
def delete(self, app_name: str) -> None:
"""
``INSTrument:DELete`` \n
Snippet: ``driver.instrument.delete(app_name = rawAbc)`` \n
Deletes a channel. If you delete the last channel, the default 'Spectrum' channel is activated.
:param app_name: String containing the name of the channel you want to delete. A channel must exist to delete it.
"""
param = Conversions.value_to_str(app_name)
self._core.io.write_with_opc(f'INSTrument:DELete {param}')
def clone(self) -> 'InstrumentCls':
"""
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 = InstrumentCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group