Source code for RsFsw.Implementations.System.Srecorder

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
from .... import enums


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

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

	@property
	def auto(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_auto'):
			from .Auto import AutoCls
			self._auto = AutoCls(self._core, self._cmd_group)
		return self._auto

	@property
	def formatPy(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_formatPy'):
			from .FormatPy import FormatPyCls
			self._formatPy = FormatPyCls(self._core, self._cmd_group)
		return self._formatPy

	@property
	def data(self):
		"""
		| Commands in total: 1
		| Subgroups: 1
		| Direct child commands: 0
		"""
		if not hasattr(self, '_data'):
			from .Data import DataCls
			self._data = DataCls(self._core, self._cmd_group)
		return self._data

	@property
	def sync(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_sync'):
			from .Sync import SyncCls
			self._sync = SyncCls(self._core, self._cmd_group)
		return self._sync

[docs] def clear(self) -> None: """ ``SYSTem:SRECorder:CLEar`` \n Snippet: ``driver.system.srecorder.clear()`` \n Removes all recorded commands from the current SCPI command list. """ self._core.io.write(f'SYSTem:SRECorder:CLEar')
[docs] def clear_with_opc(self, opc_timeout_ms: int = -1) -> None: """ ``SYSTem:SRECorder:CLEar`` \n Snippet: ``driver.system.srecorder.clear_with_opc()`` \n Removes all recorded commands from the current SCPI command list. Same as clear, but waits for the operation to complete before continuing further. Use the RsFsw.utilities.opc_timeout_set() to set the timeout value. :param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call. """ self._core.io.write_with_opc(f'SYSTem:SRECorder:CLEar', opc_timeout_ms)
[docs] def export(self, format_py: enums.ScpiRecorderExportFormat, filename: str) -> None: """ ``SYSTem:SRECorder:EXPort`` \n Snippet: ``driver.system.srecorder.export(format_py = enums.ScpiRecorderExportFormat.CPLusplus, filename = 'abc')`` \n Exports the current SCPI command list to the specified file and directory in the selected format. By default, the file is stored in the C:/R_S/INSTR/ScpiRecordings directory. Besides the recorded commands themselves, the exported script includes all format-specific header data required to execute the script using an external program on the controller. :param format_py: SCPI | PYTHon | MATLab | CPLusplus | CVI | CSHarp CPLusplus A commonly used general programming language for various applications (*.cpp) MATLab (Instrument Control Toolbox) A programming environment, frequently used in signal processing and test and measurement applications (*.m) You can use this format directly with the MATLAB Toolkit. CVI An ANSI C programming environment designed for measurements and tests (*.cvi) You can use this format directly with National Instruments LabWindows CVI. SCPI Represents SCPI base format, that is ASCII format, saved as a text file (*.inp) ; contains no additional header data Use this format to load a recorded script back to the editor later. PYTHon A commonly used general programming language for various applications (.py) :param filename: String containing the path and name of the file. """ param = ArgSingleList().compose_cmd_string(ArgSingle('format_py', format_py, DataType.Enum, enums.ScpiRecorderExportFormat), ArgSingle('filename', filename, DataType.String)) self._core.io.write(f'SYSTem:SRECorder:EXPort {param}'.rstrip())
def clone(self) -> 'SrecorderCls': """ 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 = SrecorderCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group