1
2
3
4
5import isystem.connect as ic
6
7
8winidea_id = ''
9
10
11def test_csReadMemory():
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
14
15 dataCtrl = ic.CDataController(connMgr)
16 addCtrl = ic.CAddressController(connMgr)
17
18 MEM_START = addCtrl.getVariableAddress("mainLoopCounter").getAddress()
19 MEM_SIZE = 4
20
21 codeStore = dataCtrl.csCreate()
22 dataContainer = ic.VectorBYTE(MEM_SIZE)
23 codeStore.insert(MEM_START, dataContainer)
24
25 print(f"Reading '{MEM_SIZE}' bytes of memory from '{hex(MEM_START)}'...")
26 readCodeStore = dataCtrl.csReadMemory(0, codeStore)
27 print(f"\tMemory read, explore 'readCodeStore' object.")
28
29
30
31
32if __name__ == "__main__":
33 test_csReadMemory()