Source code for rsrtx.Implementations.Search.ResDiagram.Show

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, shw_search_wind: bool) -> None: """ ``SEARch:RESDiagram:SHOW`` \n Snippet: ``driver.search.resDiagram.show.set(search = 'abc', shw_search_wind = False)`` \n If enabled, a zoom window is displayed for the currently selected search result. The zoom area is indicated in the diagram that displays the source waveform of the search. :param search: Search definition :param shw_search_wind: OFF | ON """ param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('shw_search_wind', shw_search_wind, DataType.Boolean)) self._core.io.write_with_opc(f'SEARch:RESDiagram:SHOW {param}'.rstrip())
[docs] def get(self, search: str) -> bool: """ ``SEARch:RESDiagram:SHOW`` \n Snippet: ``value: bool = driver.search.resDiagram.show.get(search = 'abc')`` \n If enabled, a zoom window is displayed for the currently selected search result. The zoom area is indicated in the diagram that displays the source waveform of the search. :param search: Search definition :return: shw_search_wind: OFF | ON """ param = Conversions.value_to_quoted_str(search) response = self._core.io.query_str_with_opc(f'SEARch:RESDiagram:SHOW? {param}') return Conversions.str_to_bool(response)