Source code for rsrtx.Implementations.Mtest.File

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class FileCls:
	"""
	| Commands in total: 4
	| Subgroups: 1
	| Direct child commands: 3
	"""

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

	@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

[docs] def delete(self, mask_test_name: str) -> None: """ ``MTESt:FILE:DELete`` \n Snippet: ``driver.mtest.file.delete(mask_test_name = 'abc')`` \n Deletes the specified mask test. :param mask_test_name: String with the name of the mask test """ param = Conversions.value_to_quoted_str(mask_test_name) self._core.io.write_with_opc(f'MTESt:FILE:DELete {param}')
[docs] def open(self, mask_test_name: str) -> None: """ ``MTESt:FILE:OPEN`` \n Snippet: ``driver.mtest.file.open(mask_test_name = 'abc')`` \n Loads the specified mask test to the instrument. :param mask_test_name: String with the name of the mask test """ param = Conversions.value_to_quoted_str(mask_test_name) self._core.io.write_with_opc(f'MTESt:FILE:OPEN {param}')
[docs] def save(self, mask_test_name: str) -> None: """ ``MTESt:FILE:SAVE`` \n Snippet: ``driver.mtest.file.save(mask_test_name = 'abc')`` \n Saves the specified mask test. It contains the mask definition, defined actions and fail conditions. :param mask_test_name: String with the name of the mask test """ param = Conversions.value_to_quoted_str(mask_test_name) self._core.io.write_with_opc(f'MTESt:FILE:SAVE {param}')
def clone(self) -> 'FileCls': """ 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 = FileCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group