更新UCD-API库及文档
This commit is contained in:
28
UniTAP/dev/dev_base_roles.py
Normal file
28
UniTAP/dev/dev_base_roles.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from UniTAP.libs.lib_tsi.tsi_io import DeviceIO
|
||||
|
||||
|
||||
class DevBase:
|
||||
"""
|
||||
Class `DevBase`.
|
||||
"""
|
||||
|
||||
def __init__(self, dev_io: DeviceIO):
|
||||
self.__dev_io = dev_io
|
||||
|
||||
def is_fw_update_available(self) -> bool:
|
||||
"""
|
||||
Checks if there is a firmware update available for the current device.
|
||||
|
||||
Returns:
|
||||
object of bool type.
|
||||
"""
|
||||
return self.__dev_io.is_fw_update_available()
|
||||
|
||||
def get_fw_update_info(self) -> str:
|
||||
"""
|
||||
Returns a list of modules to update on the current device and also displays the current version.
|
||||
|
||||
Returns:
|
||||
object of str type.
|
||||
"""
|
||||
return self.__dev_io.get_fw_update_info()
|
||||
Reference in New Issue
Block a user