winIDEA SDK
test_launch_core1.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
8WORKSPACE_PATH = r'..\..\..\targetProjects\SampleTC399XE.xjrf'
9
10
11def test_launchCore1():
12 cfg = ic.CConnectionConfig()
13 connMgr = ic.ConnectionMgr()
14 cfg.workspace(WORKSPACE_PATH)
15 connMgr.connect(cfg)
16
17 sessCtrl = ic.CSessionCtrl(connMgr)
18 sessCtrl.begin_prepare()
19
20 print(f"Is core with index 1 launched: {connMgr.isCoreLaunched(1)}")
21
22 print("Launching core with index 1...")
23 connMgr2 = connMgr.launchCore1(1)
24 wksFilePath = ic.CIDEController(connMgr2).getPath(ic.CIDEController.WORKSPACE_FILE_NAME)
25 print(f"\tDone, connected to instance: {wksFilePath}")
26
27 print("\tDisconnecting.")
28 connMgr2.disconnect_close(bSaveAll=False)
29
30
31if __name__ == "__main__":
32 test_launchCore1()