Source code for rsrtx.Implementations.Display.Persistence

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


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

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

[docs] def get_infinite(self) -> bool: """ ``DISPlay:PERSistence:INFinite`` \n Snippet: ``value: bool = driver.display.persistence.get_infinite()`` \n If persistence is enabled (method ``RsRtx.display.persistence.state()`` ) , each new data point in the diagram area remains on the screen infinitely until this command is set to OFF. """ response = self._core.io.query_str_with_opc('DISPlay:PERSistence:INFinite?') return Conversions.str_to_bool(response)
[docs] def set_infinite(self, inf_persist: bool) -> None: """ ``DISPlay:PERSistence:INFinite`` \n Snippet: ``driver.display.persistence.set_infinite(inf_persist = False)`` \n If persistence is enabled (method ``RsRtx.display.persistence.state()`` ) , each new data point in the diagram area remains on the screen infinitely until this command is set to OFF. :param inf_persist: OFF | ON """ param = Conversions.bool_to_str(inf_persist) self._core.io.write_with_opc(f'DISPlay:PERSistence:INFinite {param}')
[docs] def reset(self, opc_timeout_ms: int = -1) -> None: """ ``DISPlay:PERSistence:RESet`` \n Snippet: ``driver.display.persistence.reset()`` \n Resets the display, removing persistent values. :param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call. """ self._core.io.write_with_opc(f'DISPlay:PERSistence:RESet', opc_timeout_ms)
[docs] def get_time(self) -> float: """ ``DISPlay:PERSistence:TIME`` \n Snippet: ``value: float = driver.display.persistence.get_time()`` \n If persistence is enabled (method ``RsRtx.display.persistence.state()`` ) , each new data point in the diagram area remains on the screen for the duration defined here. :return: time: 0.05 to 50 """ response = self._core.io.query_str_with_opc('DISPlay:PERSistence:TIME?') return Conversions.str_to_float(response)
[docs] def set_time(self, time: float) -> None: """ ``DISPlay:PERSistence:TIME`` \n Snippet: ``driver.display.persistence.set_time(time = 1.0)`` \n If persistence is enabled (method ``RsRtx.display.persistence.state()`` ) , each new data point in the diagram area remains on the screen for the duration defined here. :param time: 0.05 to 50 """ param = Conversions.decimal_value_to_str(time) self._core.io.write_with_opc(f'DISPlay:PERSistence:TIME {param}')
[docs] def get_state(self) -> bool: """ ``DISPlay:PERSistence[:STATe]`` \n Snippet: ``value: bool = driver.display.persistence.get_state()`` \n If enabled, each new data point in the diagram area remains on the screen for the duration defined using method ``RsRtx.display.persistence.time()`` , or as long as method ``RsRtx.display.persistence.infinite()`` is enabled. If disabled, the signal value is only displayed as long as it actually occurs. :return: state: OFF | ON """ response = self._core.io.query_str_with_opc('DISPlay:PERSistence:STATe?') return Conversions.str_to_bool(response)
[docs] def set_state(self, state: bool) -> None: """ ``DISPlay:PERSistence[:STATe]`` \n Snippet: ``driver.display.persistence.set_state(state = False)`` \n If enabled, each new data point in the diagram area remains on the screen for the duration defined using method ``RsRtx.display.persistence.time()`` , or as long as method ``RsRtx.display.persistence.infinite()`` is enabled. If disabled, the signal value is only displayed as long as it actually occurs. :param state: OFF | ON """ param = Conversions.bool_to_str(state) self._core.io.write_with_opc(f'DISPlay:PERSistence:STATe {param}')