5import isystem.connect
as ic
9connectionMgr = ic.ConnectionMgr()
12connectionConfig = ic.CConnectionConfig()
13connectionConfig.instanceId(
'myID')
17 connectionConfig.start_existing()
18 connectionMgr.connect(connectionConfig)
19 port = connectionConfig.getUdpDiscoveryPort()
20 connectionMgr.disconnect_close(bSaveAll=
False)
21 print(
'winIDEA found at port: ', port)
23 print(
'No winIDEA with the specified ID found: ', connectionConfig.toString())
26connectionConfig.instanceId(
'myID').workspace(
'../../../targetProjects/SampleSTM32.xjrf')
27connectionMgr.connect(connectionConfig.start_always())
29port = connectionConfig.getUdpDiscoveryPort()
30print(
'New instance of winIDEA started. Port: ', port)
31connectionMgr.disconnect_close(bSaveAll=
False)
35connectionMgr.connect(connectionConfig.start_if_required())
36port = connectionConfig.getUdpDiscoveryPort()
37print(
'winIDEA available at port: ', port)
38connectionMgr.disconnect_keep()
39connectionMgr.connect(ic.CConnectionConfig().host(
'').udpDiscoveryPort(port))
40port = connectionConfig.getUdpDiscoveryPort()
41print(
'winIDEA closed: ', port)
42connectionMgr.disconnect_close(bSaveAll=
False)
46invisibleConnectionConfig = ic.CConnectionConfig()
47invisibleConnectionConfig.visibility(ic.IConnect.lfShowHidden).workspace(
'../../../targetProjects/SampleSTM32.xjrf')
48connectionMgr.connect(invisibleConnectionConfig.start_always())
49port = invisibleConnectionConfig.getUdpDiscoveryPort()
50print(
'New instance of winIDEA started. Port: ', port)
51connectionMgr.disconnect_keep()
54connectionMgr.connect(ic.CConnectionConfig().host(
'').udpDiscoveryPort(port).start_always())
56debugCtrl = ic.CDebugFacade(connectionMgr)
57print(
'downloading to invisible winIDEA')
59print(
'Downloading finished')
60print(
'main_loop_counter = ', debugCtrl.evaluate(ic.IConnectDebug.fMonitor,
'main_loop_counter').getResult())
63connectionMgr.disconnect_close(bSaveAll=
False)
64print(
'Invisible winIDEA has been shut down')