5import isystem.connect
as ic
11def test_getLastError():
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
15 devName =
"ST STM32F4xxxG_1024KB"
16 optCtrl = ic.COptionController(connMgr, ic.CStorageDeviceFactory.DEVICES_OPT_URL)
17 devIndex = optCtrl.index_of(
"Name", devName)
18 print(
"Index of the item whose 'Name' attribute has value " + devName + f
": {devIndex}")
20 storageCtrl = ic.CStorageDeviceFactory.makeDevice(connMgr, ic.EStorageDevice_EmbeddedFlashDevice, devIndex)
22 storageCtrl.write(ic.IConnectUMI.wProgDevice)
23 error = storageCtrl.getLastError()
25 print(f
"Last UMI operation failed: {error}")
27 print(f
"Last UMI operation succeeded without errors.")
30if __name__ ==
"__main__":