Source code for RsFsw.Implementations.Applications.K17_Mcgd.Output.Trigger.UserDefined.Pulse.Length

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


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

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

[docs] def set(self, length: float, triggerPort=repcap.TriggerPort.Default) -> None: """ ``OUTPut:TRIGger<tp>[:UDEFined]:PULSe:LENGth`` \n Snippet: ``driver.applications.k17Mcgd.output.trigger.userDefined.pulse.length.set(length = 1.0, triggerPort = repcap.TriggerPort.Default)`` \n Defines the length of the pulse generated at the trigger output. :param length: Pulse length in seconds. Unit: S :param triggerPort: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger') """ param = Conversions.decimal_value_to_str(length) triggerPort_cmd_val = self._cmd_group.get_repcap_cmd_value(triggerPort, repcap.TriggerPort) self._core.io.write(f'OUTPut:TRIGger{triggerPort_cmd_val}:UDEFined:PULSe:LENGth {param}')
[docs] def get(self, triggerPort=repcap.TriggerPort.Default) -> float: """ ``OUTPut:TRIGger<tp>[:UDEFined]:PULSe:LENGth`` \n Snippet: ``value: float = driver.applications.k17Mcgd.output.trigger.userDefined.pulse.length.get(triggerPort = repcap.TriggerPort.Default)`` \n Defines the length of the pulse generated at the trigger output. :param triggerPort: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger') :return: length: Pulse length in seconds. Unit: S """ triggerPort_cmd_val = self._cmd_group.get_repcap_cmd_value(triggerPort, repcap.TriggerPort) response = self._core.io.query_str(f'OUTPut:TRIGger{triggerPort_cmd_val}:UDEFined:PULSe:LENGth?') return Conversions.str_to_float(response)