Source code for rsrtx.Implementations.Power.Report.File

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 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 new(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_new'):
			from .New import NewCls
			self._new = NewCls(self._core, self._cmd_group)
		return self._new

[docs] def get_name(self) -> str: """ ``POWer:REPort:FILE:NAME`` \n Snippet: ``value: str = driver.power.report.file.get_name()`` \n Defines the path and file name of the report file that is to be created, saved, or deleted. :return: path: String containing path and file name """ response = self._core.io.query_str('POWer:REPort:FILE:NAME?') return trim_str_response(response)
[docs] def set_name(self, path: str) -> None: """ ``POWer:REPort:FILE:NAME`` \n Snippet: ``driver.power.report.file.set_name(path = 'abc')`` \n Defines the path and file name of the report file that is to be created, saved, or deleted. :param path: String containing path and file name """ param = Conversions.value_to_quoted_str(path) self._core.io.write(f'POWer:REPort:FILE:NAME {param}')
[docs] def save(self) -> None: """ ``POWer:REPort:FILE:SAVE`` \n Snippet: ``driver.power.report.file.save()`` \n Saves the report file. """ self._core.io.write(f'POWer:REPort:FILE:SAVE')
[docs] def save_and_wait(self, opc_timeout_ms: int = -1) -> None: """ ``POWer:REPort:FILE:SAVE`` \n Snippet: ``driver.power.report.file.save_and_wait()`` \n Saves the report file. Same as save, but waits for the operation to complete before continuing further. Use the RsRtx.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'POWer:REPort:FILE:SAVE', opc_timeout_ms)
[docs] def delete(self) -> None: """ ``POWer:REPort:FILE:DELete`` \n Snippet: ``driver.power.report.file.delete()`` \n Deletes the selected report file. """ self._core.io.write(f'POWer:REPort:FILE:DELete')
[docs] def delete_and_wait(self, opc_timeout_ms: int = -1) -> None: """ ``POWer:REPort:FILE:DELete`` \n Snippet: ``driver.power.report.file.delete_and_wait()`` \n Deletes the selected report file. Same as delete, but waits for the operation to complete before continuing further. Use the RsRtx.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'POWer:REPort:FILE:DELete', opc_timeout_ms)
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