Source code for rsrtx.Implementations.Search.Trigger.Pattern.Width.Delta

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

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

[docs] def set(self, search: str, width_delta: float) -> None: """ ``SEARch:TRIGger:PATTern:WIDTh:DELTa`` \n Snippet: ``driver.search.trigger.pattern.width.delta.set(search = 'abc', width_delta = 1.0)`` \n Defines a range around the width value specified using method ``RsRtx.search.trigger.pattern.width.width.set()`` . :param search: String with the name of the search :param width_delta: 0 to 432 """ param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('width_delta', width_delta, DataType.Float)) self._core.io.write_with_opc(f'SEARch:TRIGger:PATTern:WIDTh:DELTa {param}'.rstrip())
[docs] def get(self, search: str) -> float: """ ``SEARch:TRIGger:PATTern:WIDTh:DELTa`` \n Snippet: ``value: float = driver.search.trigger.pattern.width.delta.get(search = 'abc')`` \n Defines a range around the width value specified using method ``RsRtx.search.trigger.pattern.width.width.set()`` . :param search: String with the name of the search :return: width_delta: 0 to 432 """ param = Conversions.value_to_quoted_str(search) response = self._core.io.query_str_with_opc(f'SEARch:TRIGger:PATTern:WIDTh:DELTa? {param}') return Conversions.str_to_float(response)