winIDEA SDK
test_get_typedefs.py
1# This script is licensed under BSD License, see file LICENSE.txt.
2#
3# (c) TASKING Germany GmbH, 2023
4
5import isystem.connect as ic
6
7
8winidea_id = ''
9
10
11def test_getTypedefs():
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
14
15 dataCtrl = ic.CDataController(connMgr)
16
17 tdVector = ic.TypeVector()
18 dataCtrl.getTypes(0, tdVector)
19
20 print("Available `typedefs`:")
21 for typedef in tdVector:
22 typedef: ic.CTypedef
23 print(f"'{typedef.getTypedefName()}', type: '{typedef.getTypeName()}'")
24
25
26if __name__ == "__main__":
27 test_getTypedefs()