Source code for RsSmw.Implementations.System.Scrpt

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 ScrptCls:
	"""
	| Commands in total: 5
	| Subgroups: 1
	| Direct child commands: 4
	"""

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

	@property
	def discard(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_discard'):
			from .Discard import DiscardCls
			self._discard = DiscardCls(self._core, self._cmd_group)
		return self._discard

[docs] def get_arg(self) -> str: """ ``SYSTem:SCRPt:ARG`` \n Snippet: ``value: str = driver.system.scrpt.get_arg()`` \n No help available """ response = self._core.io.query_str('SYSTem:SCRPt:ARG?') return trim_str_response(response)
[docs] def set_arg(self, arguments: str) -> None: """ ``SYSTem:SCRPt:ARG`` \n Snippet: ``driver.system.scrpt.set_arg(arguments = 'abc')`` \n No help available """ param = Conversions.value_to_quoted_str(arguments) self._core.io.write(f'SYSTem:SCRPt:ARG {param}')
[docs] def get_cmd(self) -> str: """ ``SYSTem:SCRPt:CMD`` \n Snippet: ``value: str = driver.system.scrpt.get_cmd()`` \n No help available """ response = self._core.io.query_str('SYSTem:SCRPt:CMD?') return trim_str_response(response)
[docs] def set_cmd(self, cmd_file: str) -> None: """ ``SYSTem:SCRPt:CMD`` \n Snippet: ``driver.system.scrpt.set_cmd(cmd_file = 'abc')`` \n No help available """ param = Conversions.value_to_quoted_str(cmd_file) self._core.io.write(f'SYSTem:SCRPt:CMD {param}')
[docs] def get_data(self) -> str: """ ``SYSTem:SCRPt:DATA`` \n Snippet: ``value: str = driver.system.scrpt.get_data()`` \n No help available """ response = self._core.io.query_str('SYSTem:SCRPt:DATA?') return trim_str_response(response)
[docs] def set_data(self, data_file: str) -> None: """ ``SYSTem:SCRPt:DATA`` \n Snippet: ``driver.system.scrpt.set_data(data_file = 'abc')`` \n No help available """ param = Conversions.value_to_quoted_str(data_file) self._core.io.write(f'SYSTem:SCRPt:DATA {param}')
[docs] def run(self) -> None: """ ``SYSTem:SCRPt:RUN`` \n Snippet: ``driver.system.scrpt.run()`` \n No help available """ self._core.io.write(f'SYSTem:SCRPt:RUN')
[docs] def run_with_opc(self, opc_timeout_ms: int = -1) -> None: """ ``SYSTem:SCRPt:RUN`` \n Snippet: ``driver.system.scrpt.run_with_opc()`` \n No help available Same as run, but waits for the operation to complete before continuing further. Use the RsSmw.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:SCRPt:RUN', opc_timeout_ms)
def clone(self) -> 'ScrptCls': """ 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 = ScrptCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group