Source code for rsrtx.Implementations.Power.DonRes.Gate.Start

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


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

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

[docs] def set(self, start: float, pwrGate=repcap.PwrGate.Default) -> None: """ ``POWer:DONRes:GATE<*>:STARt`` \n Snippet: ``driver.power.donRes.gate.start.set(start = 1.0, pwrGate = repcap.PwrGate.Default)`` \n Set the positions of the cursor lines, which define the measurement gate. :param pwrGate: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Gate') """ param = Conversions.decimal_value_to_str(start) pwrGate_cmd_val = self._cmd_group.get_repcap_cmd_value(pwrGate, repcap.PwrGate) self._core.io.write(f'POWer:DONRes:GATE{pwrGate_cmd_val}:STARt {param}')
[docs] def get(self, pwrGate=repcap.PwrGate.Default) -> float: """ ``POWer:DONRes:GATE<*>:STARt`` \n Snippet: ``value: float = driver.power.donRes.gate.start.get(pwrGate = repcap.PwrGate.Default)`` \n Set the positions of the cursor lines, which define the measurement gate. :param pwrGate: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Gate') """ pwrGate_cmd_val = self._cmd_group.get_repcap_cmd_value(pwrGate, repcap.PwrGate) response = self._core.io.query_str(f'POWer:DONRes:GATE{pwrGate_cmd_val}:STARt?') return Conversions.str_to_float(response)