Source code for rsrtx.Implementations.Search.Trigger.Window.Width

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

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

[docs] def set(self, search: str, width: float) -> None: """ ``SEARch:TRIGger:WINDow:WIDTh`` \n Snippet: ``driver.search.trigger.window.width.set(search = 'abc', width = 1.0)`` \n For the ranges Within and Outside, the width defines the center of a time range which is defined by the limits ±Delta. For the ranges Shorter and Longer, it defines the maximum and minimum time lapse, respectively. The range is defined using method ``RsRtx.search.trigger.window.range.set()`` . :param search: Search definition :param width: 100E-12 to 864 """ param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('width', width, DataType.Float)) self._core.io.write_with_opc(f'SEARch:TRIGger:WINDow:WIDTh {param}'.rstrip())
[docs] def get(self, search: str) -> float: """ ``SEARch:TRIGger:WINDow:WIDTh`` \n Snippet: ``value: float = driver.search.trigger.window.width.get(search = 'abc')`` \n For the ranges Within and Outside, the width defines the center of a time range which is defined by the limits ±Delta. For the ranges Shorter and Longer, it defines the maximum and minimum time lapse, respectively. The range is defined using method ``RsRtx.search.trigger.window.range.set()`` . :param search: Search definition :return: width: 100E-12 to 864 """ param = Conversions.value_to_quoted_str(search) response = self._core.io.query_str_with_opc(f'SEARch:TRIGger:WINDow:WIDTh? {param}') return Conversions.str_to_float(response)