Source code for rsmxo.Implementations.Trigger.Event.Width.Width

from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import repcap


# 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, width: float, evnt=repcap.Evnt.Default) -> None: """ ``TRIGger:EVENt<*>:WIDTh:WIDTh`` \n Snippet: ``driver.trigger.event.width.width.set(width = 1.0, evnt = repcap.Evnt.Default)`` \n Depending on the values of method ``RsMxo.trigger.event.width.range.set()`` the width sets: To define the path and file names, use the EXPort:WAVeform:AUTonaming:* commands: \n - For the ranges Within and Outside, the width defines the center of a time range which is defined by the limits ±Delta (see method ``RsMxo.trigger.event.width.delta.set()`` ) . - For the ranges Shorter and Longer, it defines the maximum and minimum time lapse, respectively. :param width: 1E-10 to 10000 :param evnt: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Event') """ param = Conversions.decimal_value_to_str(width) evnt_cmd_val = self._cmd_group.get_repcap_cmd_value(evnt, repcap.Evnt) self._core.io.write(f'TRIGger:EVENt{evnt_cmd_val}:WIDTh:WIDTh {param}')
[docs] def get(self, evnt=repcap.Evnt.Default) -> float: """ ``TRIGger:EVENt<*>:WIDTh:WIDTh`` \n Snippet: ``value: float = driver.trigger.event.width.width.get(evnt = repcap.Evnt.Default)`` \n Depending on the values of method ``RsMxo.trigger.event.width.range.set()`` the width sets: To define the path and file names, use the EXPort:WAVeform:AUTonaming:* commands: \n - For the ranges Within and Outside, the width defines the center of a time range which is defined by the limits ±Delta (see method ``RsMxo.trigger.event.width.delta.set()`` ) . - For the ranges Shorter and Longer, it defines the maximum and minimum time lapse, respectively. :param evnt: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Event') :return: width: 1E-10 to 10000 """ evnt_cmd_val = self._cmd_group.get_repcap_cmd_value(evnt, repcap.Evnt) response = self._core.io.query_str(f'TRIGger:EVENt{evnt_cmd_val}:WIDTh:WIDTh?') return Conversions.str_to_float(response)