1
2
3
4
5
6
7
8
9import isystem.connect as ic
10import subprocess
11import time
12
13TIMEOUT_S = 15
14POLL_INTERVAL_S = 0.5
15
16
17def test_isConnected():
18 print("Connecting...")
19 cfg = ic.CConnectionConfig()
20 cfg.start_always()
21 conn_mgr = ic.ConnectionMgr()
22
23 conn_mgr.connect(cfg)
24
25 print(f"\tIs connected: {conn_mgr.isConnected()}")
26
27 print("Disconnecting...")
28 conn_mgr.disconnect_close(bSaveAll=False)
29 print(f"\tIs connected: {conn_mgr.isConnected()}")
30
31
32
33
34
35if __name__ == "__main__":
36 test_isConnected()