winIDEA SDK
test_profiler_create_trigger.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
7winidea_id = ''
8
9
10EXAMPLE_TRD_FILE_NAME = "sdk_example.trd"
11
12
13def test_createTrigger():
14 connMgr = ic.ConnectionMgr()
15 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
16
17 profCtrl = ic.CProfilerController2(connMgr, EXAMPLE_TRD_FILE_NAME, "u")
18 profCtrl.waitUntilLoaded(5000, isThrow=True)
19
20 print("Creating new trigger (name: 'createTrigger')...")
21 index = profCtrl.createTrigger("createTrigger")
22 print(f"\tDone, index: {index}")
23
24 profCtrl.closeDiscard()
25
26
27if __name__ == "__main__":
28 test_createTrigger()