Source code for rsrtx.Implementations.Bus.ExpResult

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


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

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

	@property
	def time(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_time'):
			from .Time import TimeCls
			self._time = TimeCls(self._core, self._cmd_group)
		return self._time

	@property
	def detail(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_detail'):
			from .Detail import DetailCls
			self._detail = DetailCls(self._core, self._cmd_group)
		return self._detail

[docs] def save(self, filename: str, bus=repcap.Bus.Default) -> None: """ ``BUS<*>:EXPResult:SAVE`` \n Snippet: ``driver.bus.expResult.save(filename = 'abc', bus = repcap.Bus.Default)`` \n Saves the selected results to the indicated file. :param bus: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Bus') """ param = Conversions.value_to_quoted_str(filename) bus_cmd_val = self._cmd_group.get_repcap_cmd_value(bus, repcap.Bus) self._core.io.write(f'BUS{bus_cmd_val}:EXPResult:SAVE {param}')
def clone(self) -> 'ExpResultCls': """ 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 = ExpResultCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group