Source code for rsrtx.Implementations.RefCurve.Rescale.Horizontal.State

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


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

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

[docs] def set(self, state: bool, refCurve=repcap.RefCurve.Default) -> None: """ ``REFCurve<*>:RESCale:HORizontal:STATe`` \n Snippet: ``driver.refCurve.rescale.horizontal.state.set(state = False, refCurve = repcap.RefCurve.Default)`` \n Enables and disables the horizontal stretching. Stretching changes the display of the waveform independent of the horizontal settings of the source waveform and of the horizontal diagram settings. :param state: OFF | ON :param refCurve: optional repeated capability selector. Default value: Nr1 (settable in the interface 'RefCurve') """ param = Conversions.bool_to_str(state) refCurve_cmd_val = self._cmd_group.get_repcap_cmd_value(refCurve, repcap.RefCurve) self._core.io.write_with_opc(f'REFCurve{refCurve_cmd_val}:RESCale:HORizontal:STATe {param}')
[docs] def get(self, refCurve=repcap.RefCurve.Default) -> bool: """ ``REFCurve<*>:RESCale:HORizontal:STATe`` \n Snippet: ``value: bool = driver.refCurve.rescale.horizontal.state.get(refCurve = repcap.RefCurve.Default)`` \n Enables and disables the horizontal stretching. Stretching changes the display of the waveform independent of the horizontal settings of the source waveform and of the horizontal diagram settings. :param refCurve: optional repeated capability selector. Default value: Nr1 (settable in the interface 'RefCurve') :return: state: OFF | ON """ refCurve_cmd_val = self._cmd_group.get_repcap_cmd_value(refCurve, repcap.RefCurve) response = self._core.io.query_str_with_opc(f'REFCurve{refCurve_cmd_val}:RESCale:HORizontal:STATe?') return Conversions.str_to_bool(response)