5import isystem.connect
as ic
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 print(f
"Device with index {devIndex} yield a MURMUR2 hash:")
23 data = ic.VectorBYTE(4)
24 storageCtrl.readHash(data)
25 for index
in range(4):
26 print(f
"{data[index]} ", end=
"")
28 print(f
"\nDevice with index {devIndex} yield a MURMUR2 hash (0x08000000, 16 bytes):")
29 data = ic.VectorBYTE(4)
30 storageCtrl.readHash(ic.IConnectUMI.wProgDevice, 0x08000000, 16, data)
31 storageCtrl.readHash(data)
32 for index
in range(4):
33 print(f
"{data[index]} ", end=
"")
36if __name__ ==
"__main__":