Source code for rsrtx.Implementations.Diagnostic.Hums.Utilization.History

from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal.Types import DataType
from ......Internal.ArgSingleList import ArgSingleList
from ......Internal.ArgSingle import ArgSingle


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

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

	@property
	def detailed(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_detailed'):
			from .Detailed import DetailedCls
			self._detailed = DetailedCls(self._core, self._cmd_group)
		return self._detailed

[docs] def get(self, start: str=None, end: str=None, resolution: int=None) -> bytes: """ ``DIAGnostic:HUMS:UTILization:HISTory`` \n Snippet: ``value: bytes = driver.diagnostic.hums.utilization.history.get(start = 'abc', end = 'abc', resolution = 1)`` \n No help available """ param = ArgSingleList().compose_cmd_string(ArgSingle('start', start, DataType.String, None, is_optional=True), ArgSingle('end', end, DataType.String, None, is_optional=True), ArgSingle('resolution', resolution, DataType.Integer, None, is_optional=True)) response = self._core.io.query_bin_block_ERROR(f'DIAGnostic:HUMS:UTILization:HISTory? {param}'.rstrip()) return response
[docs] def delete_all(self) -> None: """ ``DIAGnostic:HUMS:UTILization:HISTory:DELete:ALL`` \n Snippet: ``driver.diagnostic.hums.utilization.history.delete_all()`` \n No help available """ self._core.io.write(f'DIAGnostic:HUMS:UTILization:HISTory:DELete:ALL')
[docs] def delete_all_and_wait(self, opc_timeout_ms: int = -1) -> None: """ ``DIAGnostic:HUMS:UTILization:HISTory:DELete:ALL`` \n Snippet: ``driver.diagnostic.hums.utilization.history.delete_all_and_wait()`` \n No help available Same as delete_all, 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'DIAGnostic:HUMS:UTILization:HISTory:DELete:ALL', opc_timeout_ms)
def clone(self) -> 'HistoryCls': """ 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 = HistoryCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group