from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class SearchCls:
"""
| Commands in total: 1207
| Subgroups: 6
| Direct child commands: 4
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("search", core, parent)
@property
def online(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_online'):
from .Online import OnlineCls
self._online = OnlineCls(self._core, self._cmd_group)
return self._online
@property
def source(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_source'):
from .Source import SourceCls
self._source = SourceCls(self._core, self._cmd_group)
return self._source
@property
def gate(self):
"""
| Commands in total: 9
| Subgroups: 7
| Direct child commands: 0
"""
if not hasattr(self, '_gate'):
from .Gate import GateCls
self._gate = GateCls(self._core, self._cmd_group)
return self._gate
@property
def resDiagram(self):
"""
| Commands in total: 11
| Subgroups: 3
| Direct child commands: 0
"""
if not hasattr(self, '_resDiagram'):
from .ResDiagram import ResDiagramCls
self._resDiagram = ResDiagramCls(self._core, self._cmd_group)
return self._resDiagram
@property
def result(self):
"""
| Commands in total: 401
| Subgroups: 31
| Direct child commands: 0
"""
if not hasattr(self, '_result'):
from .Result import ResultCls
self._result = ResultCls(self._core, self._cmd_group)
return self._result
@property
def trigger(self):
"""
| Commands in total: 780
| Subgroups: 40
| Direct child commands: 0
"""
if not hasattr(self, '_trigger'):
from .Trigger import TriggerCls
self._trigger = TriggerCls(self._core, self._cmd_group)
return self._trigger
[docs]
def set_add(self, key: str) -> None:
"""
``SEARch:ADD`` \n
Snippet: ``driver.search.set_add(key = 'abc')`` \n
Creates a new search definition with the specified name.
:param key: String with the name of the search
"""
param = Conversions.value_to_quoted_str(key)
self._core.io.write_with_opc(f'SEARch:ADD {param}')
[docs]
def set_all(self, search: str) -> None:
"""
``SEARch:ALL`` \n
Snippet: ``driver.search.set_all(search = 'abc')`` \n
Performs a search for all results on the existing data from the selected source. The command does not support serial bus
sources (method ``RsRtx.search.source.set()`` SBUS1 | SBUS2 | SBUS3 | SBUS4)
:param search: Search definition
"""
param = Conversions.value_to_quoted_str(search)
self._core.io.write_with_opc(f'SEARch:ALL {param}')
[docs]
def clear(self, search: str) -> None:
"""
``SEARch:CLEar`` \n
Snippet: ``driver.search.clear(search = 'abc')`` \n
Clears the search results once to start a new search.
:param search: Search definition
"""
param = Conversions.value_to_quoted_str(search)
self._core.io.write_with_opc(f'SEARch:CLEar {param}')
[docs]
def set_remove(self, key: str) -> None:
"""
``SEARch:REMove`` \n
Snippet: ``driver.search.set_remove(key = 'abc')`` \n
Deletes the specified search definition.
:param key: String with the name of the search
"""
param = Conversions.value_to_quoted_str(key)
self._core.io.write_with_opc(f'SEARch:REMove {param}')
def clone(self) -> 'SearchCls':
"""
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 = SearchCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group