Source code for rsrtx.Implementations.Search.ResDiagram.Horz.Absolute.Span

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 SpanCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("span", core, parent)

[docs] def set(self, search: str, span: float) -> None: """ ``SEARch:RESDiagram:HORZ:ABSolute:SPAN`` \n Snippet: ``driver.search.resDiagram.horz.absolute.span.set(search = 'abc', span = 1.0)`` \n Defines the width of the zoom area. :param search: Search definition :param span: 0 to 100E+24 """ param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('span', span, DataType.Float)) self._core.io.write_with_opc(f'SEARch:RESDiagram:HORZ:ABSolute:SPAN {param}'.rstrip())
[docs] def get(self, search: str) -> float: """ ``SEARch:RESDiagram:HORZ:ABSolute:SPAN`` \n Snippet: ``value: float = driver.search.resDiagram.horz.absolute.span.get(search = 'abc')`` \n Defines the width of the zoom area. :param search: Search definition :return: span: 0 to 100E+24 """ param = Conversions.value_to_quoted_str(search) response = self._core.io.query_str_with_opc(f'SEARch:RESDiagram:HORZ:ABSolute:SPAN? {param}') return Conversions.str_to_float(response)