Source code for rsrtx.Implementations.Tdrt.Calibration.Open

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 OpenCls:
	"""
	| Commands in total: 2
	| Subgroups: 1
	| Direct child commands: 1
	"""

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

	@property
	def execute(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_execute'):
			from .Execute import ExecuteCls
			self._execute = ExecuteCls(self._core, self._cmd_group)
		return self._execute

[docs] def get_name(self) -> str: """ ``TDRT:CALibration:OPEN:NAME`` \n Snippet: ``value: str = driver.tdrt.calibration.open.get_name()`` \n Sets the file name, file format and path of the TDR/TDT calibration file to be opened. The file format is always .xml. :return: path: String with path and file name with extension .xml """ response = self._core.io.query_str_with_opc('TDRT:CALibration:OPEN:NAME?') return trim_str_response(response)
[docs] def set_name(self, path: str) -> None: """ ``TDRT:CALibration:OPEN:NAME`` \n Snippet: ``driver.tdrt.calibration.open.set_name(path = 'abc')`` \n Sets the file name, file format and path of the TDR/TDT calibration file to be opened. The file format is always .xml. :param path: String with path and file name with extension .xml """ param = Conversions.value_to_quoted_str(path) self._core.io.write_with_opc(f'TDRT:CALibration:OPEN:NAME {param}')
def clone(self) -> 'OpenCls': """ 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 = OpenCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group