winIDEA SDK
test_doc_control.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_doc_control():
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
14
15 FILE_NAME = "test_control.trd"
16 print("Creating example analyzer '.trd' file...")
17 covCtrl = ic.CCoverageController2(connMgr, FILE_NAME, "w")
18 covCtrl.save()
19
20 print("Opening file with document controller...")
21 docCtrl = ic.CDocumentController(connMgr, FILE_NAME, "u")
22
23 print("Controlling analyzer document state...")
24 docCtrl.start()
25 docCtrl.stop()
26
27 docCtrl.resume()
28 docCtrl.stop()
29
30 docCtrl.start1()
31
32 print("Discarding document...")
33 docCtrl.closeDiscard()
34
35
36if __name__ == "__main__":
37 test_doc_control()