Source code for rsrtx.Implementations.Diagnostic.Hums

from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import enums


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class HumsCls:
	"""
	| Commands in total: 30
	| Subgroups: 4
	| Direct child commands: 11
	"""

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

	@property
	def utilization(self):
		"""
		| Commands in total: 9
		| Subgroups: 3
		| Direct child commands: 1
		"""
		if not hasattr(self, '_utilization'):
			from .Utilization import UtilizationCls
			self._utilization = UtilizationCls(self._core, self._cmd_group)
		return self._utilization

	@property
	def device(self):
		"""
		| Commands in total: 3
		| Subgroups: 1
		| Direct child commands: 0
		"""
		if not hasattr(self, '_device'):
			from .Device import DeviceCls
			self._device = DeviceCls(self._core, self._cmd_group)
		return self._device

	@property
	def system(self):
		"""
		| Commands in total: 3
		| Subgroups: 1
		| Direct child commands: 1
		"""
		if not hasattr(self, '_system'):
			from .System import SystemCls
			self._system = SystemCls(self._core, self._cmd_group)
		return self._system

	@property
	def tags(self):
		"""
		| Commands in total: 4
		| Subgroups: 1
		| Direct child commands: 3
		"""
		if not hasattr(self, '_tags'):
			from .Tags import TagsCls
			self._tags = TagsCls(self._core, self._cmd_group)
		return self._tags

[docs] def get_all(self) -> bytes: """ ``DIAGnostic:HUMS[:ALL]`` \n Snippet: ``value: bytes = driver.diagnostic.hums.get_all()`` \n No help available """ response = self._core.io.query_bin_block('DIAGnostic:HUMS:ALL?') return response
[docs] def delete_all(self) -> None: """ ``DIAGnostic:HUMS:DELete:ALL`` \n Snippet: ``driver.diagnostic.hums.delete_all()`` \n No help available """ self._core.io.write(f'DIAGnostic:HUMS:DELete:ALL')
[docs] def delete_all_and_wait(self, opc_timeout_ms: int = -1) -> None: """ ``DIAGnostic:HUMS:DELete:ALL`` \n Snippet: ``driver.diagnostic.hums.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:DELete:ALL', opc_timeout_ms)
[docs] def save(self, path: str) -> None: """ ``DIAGnostic:HUMS:SAVE`` \n Snippet: ``driver.diagnostic.hums.save(path = 'abc')`` \n No help available """ param = Conversions.value_to_quoted_str(path) self._core.io.write(f'DIAGnostic:HUMS:SAVE {param}')
[docs] def get_state(self) -> bool: """ ``DIAGnostic:HUMS:STATe`` \n Snippet: ``value: bool = driver.diagnostic.hums.get_state()`` \n No help available """ response = self._core.io.query_str('DIAGnostic:HUMS:STATe?') return Conversions.str_to_bool(response)
[docs] def set_state(self, hums_enabled: bool) -> None: """ ``DIAGnostic:HUMS:STATe`` \n Snippet: ``driver.diagnostic.hums.set_state(hums_enabled = False)`` \n No help available """ param = Conversions.bool_to_str(hums_enabled) self._core.io.write(f'DIAGnostic:HUMS:STATe {param}')
[docs] def get_bios(self) -> bytes: """ ``DIAGnostic:HUMS:BIOS`` \n Snippet: ``value: bytes = driver.diagnostic.hums.get_bios()`` \n No help available """ response = self._core.io.query_bin_block('DIAGnostic:HUMS:BIOS?') return response
[docs] def get_equipment(self) -> bytes: """ ``DIAGnostic:HUMS:EQUipment`` \n Snippet: ``value: bytes = driver.diagnostic.hums.get_equipment()`` \n No help available """ response = self._core.io.query_bin_block('DIAGnostic:HUMS:EQUipment?') return response
[docs] def get_sw(self) -> bytes: """ ``DIAGnostic:HUMS:SW`` \n Snippet: ``value: bytes = driver.diagnostic.hums.get_sw()`` \n No help available """ response = self._core.io.query_bin_block('DIAGnostic:HUMS:SW?') return response
[docs] def get_storage(self) -> bytes: """ ``DIAGnostic:HUMS:STORage`` \n Snippet: ``value: bytes = driver.diagnostic.hums.get_storage()`` \n No help available """ response = self._core.io.query_bin_block('DIAGnostic:HUMS:STORage?') return response
[docs] def get_security(self) -> bytes: """ ``DIAGnostic:HUMS:SECurity`` \n Snippet: ``value: bytes = driver.diagnostic.hums.get_security()`` \n No help available """ response = self._core.io.query_bin_block('DIAGnostic:HUMS:SECurity?') return response
[docs] def get_service(self) -> bytes: """ ``DIAGnostic:HUMS:SERVice`` \n Snippet: ``value: bytes = driver.diagnostic.hums.get_service()`` \n No help available """ response = self._core.io.query_bin_block('DIAGnostic:HUMS:SERVice?') return response
# noinspection PyTypeChecker
[docs] def get_format_py(self) -> enums.DiagFileFormat: """ ``DIAGnostic:HUMS:FORMat`` \n Snippet: ``value: enums.DiagFileFormat = driver.diagnostic.hums.get_format_py()`` \n No help available """ response = self._core.io.query_str('DIAGnostic:HUMS:FORMat?') return Conversions.str_to_scalar_enum(response, enums.DiagFileFormat)
[docs] def set_format_py(self, format_py: enums.DiagFileFormat) -> None: """ ``DIAGnostic:HUMS:FORMat`` \n Snippet: ``driver.diagnostic.hums.set_format_py(format_py = enums.DiagFileFormat.JSON)`` \n No help available """ param = Conversions.enum_scalar_to_str(format_py, enums.DiagFileFormat) self._core.io.write(f'DIAGnostic:HUMS:FORMat {param}')
def clone(self) -> 'HumsCls': """ 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 = HumsCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group