from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from ....Internal.Types import DataType
from ....Internal.ArgSingleList import ArgSingleList
from ....Internal.ArgSingle import ArgSingle
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ShowCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("show", core, parent)
[docs]
def set(self, search: str, display_state: bool) -> None:
"""
``SEARch:GATE:SHOW`` \n
Snippet: ``driver.search.gate.show.set(search = 'abc', display_state = False)`` \n
If enabled, the gate area is indicated in the source diagram.
:param search: Search definition
:param display_state: OFF | ON
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('display_state', display_state, DataType.Boolean))
self._core.io.write_with_opc(f'SEARch:GATE:SHOW {param}'.rstrip())
[docs]
def get(self, search: str) -> bool:
"""
``SEARch:GATE:SHOW`` \n
Snippet: ``value: bool = driver.search.gate.show.get(search = 'abc')`` \n
If enabled, the gate area is indicated in the source diagram.
:param search: Search definition
:return: display_state: OFF | ON
"""
param = Conversions.value_to_quoted_str(search)
response = self._core.io.query_str_with_opc(f'SEARch:GATE:SHOW? {param}')
return Conversions.str_to_bool(response)