Source code for RsFsw.Implementations.System.Firmware.Update

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 UpdateCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

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

[docs] def set(self, directory: str) -> None: """ ``SYSTem:FIRMware:UPDate`` \n Snippet: ``driver.system.firmware.update.set(directory = 'abc')`` \n This command starts a firmware update using the *.msi files in the selected directory. The default path is D:/FW_UPDATE. The path is changed via the method ``RsFsw.massMemory.comment.set()`` command. To store the update files the MMEMory:DATA command is used. Only user accounts with administrator rights can perform a firmware update. """ param = Conversions.value_to_quoted_str(directory) self._core.io.write(f'SYSTem:FIRMware:UPDate {param}')
[docs] def get(self) -> str: """ ``SYSTem:FIRMware:UPDate`` \n Snippet: ``value: str = driver.system.firmware.update.get()`` \n This command starts a firmware update using the *.msi files in the selected directory. The default path is D:/FW_UPDATE. The path is changed via the method ``RsFsw.massMemory.comment.set()`` command. To store the update files the MMEMory:DATA command is used. Only user accounts with administrator rights can perform a firmware update. """ response = self._core.io.query_str(f'SYSTem:FIRMware:UPDate?') return trim_str_response(response)