Source code for RsFsw.Implementations.MassMemory

from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal.Types import DataType
from ...Internal.ArgSingleList import ArgSingleList
from ...Internal.ArgSingle import ArgSingle


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class MassMemoryCls:
	"""
	| Commands in total: 75
	| Subgroups: 14
	| Direct child commands: 3
	"""

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

	@property
	def clear(self):
		"""
		| Commands in total: 1
		| Subgroups: 1
		| Direct child commands: 0
		"""
		if not hasattr(self, '_clear'):
			from .Clear import ClearCls
			self._clear = ClearCls(self._core, self._cmd_group)
		return self._clear

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

	@property
	def store(self):
		"""
		| Commands in total: 19
		| Subgroups: 13
		| Direct child commands: 0
		"""
		if not hasattr(self, '_store'):
			from .Store import StoreCls
			self._store = StoreCls(self._core, self._cmd_group)
		return self._store

	@property
	def currentDirectory(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_currentDirectory'):
			from .CurrentDirectory import CurrentDirectoryCls
			self._currentDirectory = CurrentDirectoryCls(self._core, self._cmd_group)
		return self._currentDirectory

	@property
	def network(self):
		"""
		| Commands in total: 4
		| Subgroups: 4
		| Direct child commands: 0
		"""
		if not hasattr(self, '_network'):
			from .Network import NetworkCls
			self._network = NetworkCls(self._core, self._cmd_group)
		return self._network

	@property
	def select(self):
		"""
		| Commands in total: 28
		| Subgroups: 2
		| Direct child commands: 0
		"""
		if not hasattr(self, '_select'):
			from .Select import SelectCls
			self._select = SelectCls(self._core, self._cmd_group)
		return self._select

	@property
	def name(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_name'):
			from .Name import NameCls
			self._name = NameCls(self._core, self._cmd_group)
		return self._name

	@property
	def raw(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_raw'):
			from .Raw import RawCls
			self._raw = RawCls(self._core, self._cmd_group)
		return self._raw

	@property
	def catalog(self):
		"""
		| Commands in total: 2
		| Subgroups: 1
		| Direct child commands: 1
		"""
		if not hasattr(self, '_catalog'):
			from .Catalog import CatalogCls
			self._catalog = CatalogCls(self._core, self._cmd_group)
		return self._catalog

	@property
	def delete(self):
		"""
		| Commands in total: 1
		| Subgroups: 1
		| Direct child commands: 0
		"""
		if not hasattr(self, '_delete'):
			from .Delete import DeleteCls
			self._delete = DeleteCls(self._core, self._cmd_group)
		return self._delete

	@property
	def makeDirectory(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_makeDirectory'):
			from .MakeDirectory import MakeDirectoryCls
			self._makeDirectory = MakeDirectoryCls(self._core, self._cmd_group)
		return self._makeDirectory

	@property
	def msis(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_msis'):
			from .Msis import MsisCls
			self._msis = MsisCls(self._core, self._cmd_group)
		return self._msis

	@property
	def deleteDirectory(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_deleteDirectory'):
			from .DeleteDirectory import DeleteDirectoryCls
			self._deleteDirectory = DeleteDirectoryCls(self._core, self._cmd_group)
		return self._deleteDirectory

	@property
	def comment(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_comment'):
			from .Comment import CommentCls
			self._comment = CommentCls(self._core, self._cmd_group)
		return self._comment

[docs] def clear_all(self, opc_timeout_ms: int = -1) -> None: """ ``MMEMory:CLEar:ALL`` \n Snippet: ``driver.massMemory.clear_all()`` \n This command deletes all instrument configuration files in the current directory. You can select the directory with method ``RsFsw.massMemory.currentDirectory.set()`` . :param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call. """ self._core.io.write_with_opc(f'MMEMory:CLEar:ALL', opc_timeout_ms)
[docs] def copy(self, source_file: str, target_file: str) -> None: """ ``MMEMory:COPY`` \n Snippet: ``driver.massMemory.copy(source_file = 'abc', target_file = 'abc')`` \n This command copies one or more files to another directory. :param source_file: String containing the path and file name of the source file. Special behavior if optional external mixer is active and the destination is C:/R_S/INSTR/USER/cvl/: the contents of the entire folder are copied. For details, see 'Conversion loss tables'. :param target_file: String containing the path and name of the target file. The path may be relative or absolute. """ param = ArgSingleList().compose_cmd_string(ArgSingle('source_file', source_file, DataType.String), ArgSingle('target_file', target_file, DataType.String)) self._core.io.write_with_opc(f'MMEMory:COPY {param}'.rstrip())
[docs] def move(self, source_file: str, target_file: str) -> None: """ ``MMEMory:MOVE`` \n Snippet: ``driver.massMemory.move(source_file = 'abc', target_file = 'abc')`` \n This command moves a file to another directory. The command also renames the file if you define a new name in the target directory. If you do not include a path for <NewFileName>, the command just renames the file. :param source_file: String containing the path and file name of the source file. :param target_file: String containing the path and name of the target file. """ param = ArgSingleList().compose_cmd_string(ArgSingle('source_file', source_file, DataType.String), ArgSingle('target_file', target_file, DataType.String)) self._core.io.write_with_opc(f'MMEMory:MOVE {param}'.rstrip())
def clone(self) -> 'MassMemoryCls': """ 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 = MassMemoryCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group