Source code for rsmxo.Implementations.MassMemory.AutoNaming

from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from ....Internal.Utilities import trim_str_response


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

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

	@property
	def resPath(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_resPath'):
			from .ResPath import ResPathCls
			self._resPath = ResPathCls(self._core, self._cmd_group)
		return self._resPath

	@property
	def resAll(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_resAll'):
			from .ResAll import ResAllCls
			self._resAll = ResAllCls(self._core, self._cmd_group)
		return self._resAll

[docs] def get_time(self) -> bool: """ ``MMEMory:AUTonaming:TIME`` \n Snippet: ``value: bool = driver.massMemory.autoNaming.get_time()`` \n Includes or excludes the prefix/ date/time /index in the filename pattern for automatic filename generation. This name is used as the default filename. The prefix indicates the type of data that is saved, for example, RefCurve, Settings. """ response = self._core.io.query_str('MMEMory:AUTonaming:TIME?') return Conversions.str_to_bool(response)
[docs] def set_time(self, name_date_time: bool) -> None: """ ``MMEMory:AUTonaming:TIME`` \n Snippet: ``driver.massMemory.autoNaming.set_time(name_date_time = False)`` \n Includes or excludes the prefix/ date/time /index in the filename pattern for automatic filename generation. This name is used as the default filename. The prefix indicates the type of data that is saved, for example, RefCurve, Settings. :param name_date_time: OFF | ON """ param = Conversions.bool_to_str(name_date_time) self._core.io.write(f'MMEMory:AUTonaming:TIME {param}')
[docs] def get_index(self) -> bool: """ ``MMEMory:AUTonaming:INDex`` \n Snippet: ``value: bool = driver.massMemory.autoNaming.get_index()`` \n Includes or excludes the prefix/ date/time /index in the filename pattern for automatic filename generation. This name is used as the default filename. The prefix indicates the type of data that is saved, for example, RefCurve, Settings. :return: name_index: OFF | ON """ response = self._core.io.query_str('MMEMory:AUTonaming:INDex?') return Conversions.str_to_bool(response)
[docs] def set_index(self, name_index: bool) -> None: """ ``MMEMory:AUTonaming:INDex`` \n Snippet: ``driver.massMemory.autoNaming.set_index(name_index = False)`` \n Includes or excludes the prefix/ date/time /index in the filename pattern for automatic filename generation. This name is used as the default filename. The prefix indicates the type of data that is saved, for example, RefCurve, Settings. :param name_index: OFF | ON """ param = Conversions.bool_to_str(name_index) self._core.io.write(f'MMEMory:AUTonaming:INDex {param}')
[docs] def get_user_text(self) -> bool: """ ``MMEMory:AUTonaming:USERtext`` \n Snippet: ``value: bool = driver.massMemory.autoNaming.get_user_text()`` \n If enabled, inserts the specified user text after the prefix. You can define the text with method ``RsMxo.massMemory.autoNaming.text()`` . """ response = self._core.io.query_str('MMEMory:AUTonaming:USERtext?') return Conversions.str_to_bool(response)
[docs] def set_user_text(self, nme_string_st: bool) -> None: """ ``MMEMory:AUTonaming:USERtext`` \n Snippet: ``driver.massMemory.autoNaming.set_user_text(nme_string_st = False)`` \n If enabled, inserts the specified user text after the prefix. You can define the text with method ``RsMxo.massMemory.autoNaming.text()`` . :param nme_string_st: OFF | ON """ param = Conversions.bool_to_str(nme_string_st) self._core.io.write(f'MMEMory:AUTonaming:USERtext {param}')
[docs] def get_prefix(self) -> bool: """ ``MMEMory:AUTonaming:PREFix`` \n Snippet: ``value: bool = driver.massMemory.autoNaming.get_prefix()`` \n Includes or excludes the prefix/ date/time /index in the filename pattern for automatic filename generation. This name is used as the default filename. The prefix indicates the type of data that is saved, for example, RefCurve, Settings. """ response = self._core.io.query_str('MMEMory:AUTonaming:PREFix?') return Conversions.str_to_bool(response)
[docs] def set_prefix(self, main_nme_stem_st: bool) -> None: """ ``MMEMory:AUTonaming:PREFix`` \n Snippet: ``driver.massMemory.autoNaming.set_prefix(main_nme_stem_st = False)`` \n Includes or excludes the prefix/ date/time /index in the filename pattern for automatic filename generation. This name is used as the default filename. The prefix indicates the type of data that is saved, for example, RefCurve, Settings. :param main_nme_stem_st: OFF | ON """ param = Conversions.bool_to_str(main_nme_stem_st) self._core.io.write(f'MMEMory:AUTonaming:PREFix {param}')
[docs] def get_text(self) -> str: """ ``MMEMory:AUTonaming:TEXT`` \n Snippet: ``value: str = driver.massMemory.autoNaming.get_text()`` \n Defines a text that can be included in the autonaming pattern. :return: name_string: String parameter """ response = self._core.io.query_str('MMEMory:AUTonaming:TEXT?') return trim_str_response(response)
[docs] def set_text(self, name_string: str) -> None: """ ``MMEMory:AUTonaming:TEXT`` \n Snippet: ``driver.massMemory.autoNaming.set_text(name_string = 'abc')`` \n Defines a text that can be included in the autonaming pattern. :param name_string: String parameter """ param = Conversions.value_to_quoted_str(name_string) self._core.io.write(f'MMEMory:AUTonaming:TEXT {param}')
[docs] def get_default_path(self) -> str: """ ``MMEMory:AUTonaming:DEFaultpath`` \n Snippet: ``value: str = driver.massMemory.autoNaming.get_default_path()`` \n Sets the path where data and settings files are stored. On the instrument, all user data is written to /home/storage/userData. You can create subfolders in this folder. :return: path: String parameter """ response = self._core.io.query_str('MMEMory:AUTonaming:DEFaultpath?') return trim_str_response(response)
[docs] def set_default_path(self, path: str) -> None: """ ``MMEMory:AUTonaming:DEFaultpath`` \n Snippet: ``driver.massMemory.autoNaming.set_default_path(path = 'abc')`` \n Sets the path where data and settings files are stored. On the instrument, all user data is written to /home/storage/userData. You can create subfolders in this folder. :param path: String parameter """ param = Conversions.value_to_quoted_str(path) self._core.io.write(f'MMEMory:AUTonaming:DEFaultpath {param}')
def clone(self) -> 'AutoNamingCls': """ 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 = AutoNamingCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group