Source code for rsrtx.Implementations.Search.Trigger.Level.Transition.Upper

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
from ...... import enums


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class UpperCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

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

[docs] def set(self, key: str, signal_source: enums.SignalSource, value: float) -> None: """ ``SEARch:TRIGger:LEVel:TRANsition:UPPer`` \n Snippet: ``driver.search.trigger.level.transition.upper.set(key = 'abc', signal_source = enums.SignalSource.AJ1, value = 1.0)`` \n Set the lower and upper voltage thresholds, respectively. When the signal crosses this level, the slew rate measurement starts or stops depending on the selected slope. :param key: String with the name of the search :param signal_source: Source of the search, see 'Waveform parameter' :param value: Voltage value """ param = ArgSingleList().compose_cmd_string(ArgSingle('key', key, DataType.String), ArgSingle('signal_source', signal_source, DataType.Enum, enums.SignalSource), ArgSingle('value', value, DataType.Float)) self._core.io.write_with_opc(f'SEARch:TRIGger:LEVel:TRANsition:UPPer {param}'.rstrip())
[docs] def get(self, key: str, signal_source: enums.SignalSource) -> float: """ ``SEARch:TRIGger:LEVel:TRANsition:UPPer`` \n Snippet: ``value: float = driver.search.trigger.level.transition.upper.get(key = 'abc', signal_source = enums.SignalSource.AJ1)`` \n Set the lower and upper voltage thresholds, respectively. When the signal crosses this level, the slew rate measurement starts or stops depending on the selected slope. :param key: String with the name of the search :param signal_source: Source of the search, see 'Waveform parameter' :return: value: Voltage value """ param = ArgSingleList().compose_cmd_string(ArgSingle('key', key, DataType.String), ArgSingle('signal_source', signal_source, DataType.Enum, enums.SignalSource)) response = self._core.io.query_str_with_opc(f'SEARch:TRIGger:LEVel:TRANsition:UPPer? {param}'.rstrip()) return Conversions.str_to_float(response)