winIDEA SDK
test_connect.py
1# This script is licensed under BSD License, see file LICENSE.txt.
2#
3# (c) TASKING Germany GmbH, 2023
4
5"""
6This script shows recommended way to connect to specific version of winIDEA
7at known location.
8"""
9
10import isystem.connect as ic
11import subprocess
12import time
13
14TIMEOUT_S = 15
15POLL_INTERVAL_S = 0.5
16
17
18def test_connect():
19 conn_mgr = ic.ConnectionMgr()
20 cfg = ic.CConnectionConfig()
21 cfg.start_always()
22
23 conn_mgr.connect(cfg)
24
25 if conn_mgr.isConnected():
26 print("Connected to winIDEA!")
27 else:
28 print("Could not connect to winIDEA in the specified time.")
29
30
31if __name__ == "__main__":
32 test_connect()