winIDEA SDK
test_get_labels.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_getLabels():
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
14
15 dataCtrl = ic.CDataController(connMgr)
16
17 labelVect = ic.VariableVector()
18 dataCtrl.getLabels(ic.CDataController.PARTITION_CURRENT, labelVect)
19
20 print(f"Available labels:")
21 for labelData in labelVect:
22 labelData: ic.CVariable
23 print(f"\tLabel: {labelData.getName()}")
24 print(f"\t\tQualified name: {labelData.getQualifiedName()}")
25 print(f"\t\tType: {labelData.getType()}")
26
27 # NOTE: Object 'labelData' is `ic.CVariable` object, explore other available methods.
28
29
30if __name__ == "__main__":
31 test_getLabels()