winIDEA SDK
Loading...
Searching...
No Matches
test_doc_an_trig_process.py
1# This script is licensed under BSD License, see file LICENSE.txt, or search for `License` in the SDK online help.
2#
3# (c) TASKING Germany GmbH, 2023
4
5import isystem.connect as ic
6
7
8def test_doc_an_trig_process():
9 connMgr = ic.ConnectionMgr()
10 connMgr.connect(ic.CConnectionConfig())
11
12 cfgCtrl = ic.CConfigurationController(connMgr)
13
14 traceCtrl = ic.CTraceController(connMgr, "sdk_example.trd", "w")
15 optCtrl = cfgCtrl.doc("sdk_example.trd")
16
17 # Prerequisite for obtaining process configuration node,
18 # is to first select valid trigger.
19 trigOptCtrl = cfgCtrl.doc_an_triggers(optCtrl)
20 if trigOptCtrl.size() == 0:
21 trigOptCtrl = trigOptCtrl.add()
22 else:
23 trigOptCtrl = trigOptCtrl.at(0)
24
25 procOptCtrl = cfgCtrl.doc_an_trig_processes(trigOptCtrl)
26 url = procOptCtrl.URL()
27 print(f"URL of the 'document' controller for file 'sdk_example.trd', processes: {url}")
28
29 traceCtrl.close()
30
31
32if __name__ == "__main__":
33 test_doc_an_trig_process()