Source code for rsmxo.Implementations.Sessions

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class SessionsCls:
	"""
	| Commands in total: 6
	| Subgroups: 2
	| Direct child commands: 1
	"""

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

	@property
	def save(self):
		"""
		| Commands in total: 4
		| Subgroups: 0
		| Direct child commands: 4
		"""
		if not hasattr(self, '_save'):
			from .Save import SaveCls
			self._save = SaveCls(self._core, self._cmd_group)
		return self._save

	@property
	def load(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_load'):
			from .Load import LoadCls
			self._load = LoadCls(self._core, self._cmd_group)
		return self._load

[docs] def get_user_pref(self) -> bool: """ ``SESSion:USERpref`` \n Snippet: ``value: bool = driver.sessions.get_user_pref()`` \n If ON, the user-specific display settings for the toolbar, waveform colors and diagram presentation are included in the session file. The setting affects the saving and the recall actions. """ response = self._core.io.query_str('SESSion:USERpref?') return Conversions.str_to_bool(response)
[docs] def set_user_pref(self, recall_include_user_setting: bool) -> None: """ ``SESSion:USERpref`` \n Snippet: ``driver.sessions.set_user_pref(recall_include_user_setting = False)`` \n If ON, the user-specific display settings for the toolbar, waveform colors and diagram presentation are included in the session file. The setting affects the saving and the recall actions. :param recall_include_user_setting: OFF | ON """ param = Conversions.bool_to_str(recall_include_user_setting) self._core.io.write(f'SESSion:USERpref {param}')
def clone(self) -> 'SessionsCls': """ Clones the group by creating new object from it and its whole existing subgroups. Also copies all the existing default Repeated Capabilities setting, which you can change independently without affecting the original group. """ new_group = SessionsCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group