修改UCD连接需要重启错误

This commit is contained in:
xinzhu.yin
2026-06-16 14:31:00 +08:00
parent dc096a9805
commit 3dd383b982
5 changed files with 81 additions and 22 deletions

View File

@@ -231,6 +231,12 @@ class BaseIO:
self.__ref_count = TSI_Clean()
logging.info(f"[UniTAP] BaseIO.del: {self}; Ref count: {self.__ref_count}")
def rescan_devices(self):
if self.__ref_count > 0:
TSIX_DEV_RescanDevices()
return
logging.error("[UniTAP] BaseIO.rescan_devices call without TSI_Init")
def get_device_count(self) -> int:
if self.__ref_count > 0:
return TSIX_DEV_GetDeviceCount()