winIDEA SDK
test_get_types.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_getTypes():
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
14
15 dataCtrl = ic.CDataController(connMgr)
16
17 typesVector = ic.TypeVector()
18 dataCtrl.getTypes(0, typesVector)
19
20 print("Available types:")
21 for thisType in typesVector:
22 thisType: ic.CType
23 print(f"'{thisType.getName()}', bit size: '{thisType.getType().m_byBitSize}'")
24
25 # NOTE: Object 'thisType.getType()' is `ic.SType2` object, explore other available methods.
26
27
28if __name__ == "__main__":
29 test_getTypes()