winIDEA SDK
|
This class contains information for connection to winIDEA.
Its methods return reference to self, so we can use it like this:
CConnectionConfig config = new CConnectionConfig(); config.udpDiscoveryPort(5534).instanceId("main");
All parameters are optional. Set only what is required, default values are used for unspecified parameters.
Python example: advanced_winidea_launching.py
#include <ConnectionMgr.h>
Inherits std::enable_shared_from_this< CConnectionConfig >.
Public Member Functions | |
SPConnectionConfig | cmd_line (const std::string &rstr_cmd_line) |
Command line parameters for winIDEA This value is used to. More... | |
SPConnectionConfig | exe_dir (const std::string &rstr_exe_dir) |
Sets winIDEA exe dir to use. More... | |
IConnect::ELaunchFlags | get_start () const |
Returns winIDEA start policy. More... | |
const std::string & | getCmdLineParams () const |
Returns command line parameters. More... | |
const std::string & | getInstanceId () const |
Returns instanceId. More... | |
uint32_t | getProcessId () const |
Returns process id. More... | |
uint16_t | getTCPPort () const |
Returns TCP port. More... | |
int | getUdpDiscoveryPort () const |
Returns UDP discovery port. More... | |
IConnect::ELaunchFlags | getVisibility () const |
Returns winIDEA window visibility after startup. More... | |
IConnect::ELaunchFlags | getWaitTime () const |
Returns wait time. More... | |
const std::string & | getWorkspace () const |
Returns workspace path. More... | |
SPConnectionConfig | host (const std::string &rstr_host, uint16_t w_TCP_port=0) |
Sets PC host to use. More... | |
SPConnectionConfig | instanceId (const std::string &rstr_instance_ID) |
Sets winIDEA instance ID This value is used to. More... | |
bool | isUseIPCDiscovery () const |
Returns true, if IPC discovery should be used. More... | |
SPConnectionConfig | start (IConnect::ELaunchFlags eStart) |
Determines how to potentially start a new winIDEA instance. More... | |
SPConnectionConfig | start_always () |
Always start a new winIDEA instance. More... | |
SPConnectionConfig | start_existing () |
Connect to an existing winIDEA instance. More... | |
SPConnectionConfig | start_if_required () |
Start a new winIDEA instance if no existing is matching the connection criteria. More... | |
SPConnectionConfig | udpDiscoveryPort (uint16_t w_UDP_discovery_port) |
Sets UDP discovery port. More... | |
SPConnectionConfig | useIPCDiscovery (bool b_use_IPC_discovery) |
Locally running winIDEA instances will be discovered using local IPC discovery. More... | |
SPConnectionConfig | visibility (IConnect::ELaunchFlags e_visibility) |
Determines how the newly launched instance will start. More... | |
SPConnectionConfig | waitTime (IConnect::ELaunchFlags e_wait_time) |
Determines how long the isystem.connect should wait for running instances to respond. More... | |
SPConnectionConfig | workspace (const std::string &rstrWorkspace) |
Sets winIDEA workspace. More... | |
SPConnectionConfig isys::CConnectionConfig::cmd_line | ( | const std::string & | rstr_cmd_line | ) |
Command line parameters for winIDEA This value is used to.
(it is not used to search for an existing instance)
>>> cmgr = ic.ConnectionMgr() >>> cc = ic.CConnectionConfig() >>> cc = cc.cmd_line('-DEMO') >>> cmgr.connect(cc)
SPConnectionConfig isys::CConnectionConfig::exe_dir | ( | const std::string & | rstr_exe_dir | ) |
Sets winIDEA exe dir to use.
This value is used to
(it is not used to search for an existing instance)
IConnect::ELaunchFlags isys::CConnectionConfig::get_start | ( | ) | const |
Returns winIDEA start policy.
>>> cc = ic.CConnectionConfig() >>> cc = cc.start(ic.IConnect.lfStartExisting) >>> cc.get_start() & ic.IConnect.lfStartMask 3
const std::string & isys::CConnectionConfig::getCmdLineParams | ( | ) | const |
Returns command line parameters.
>>> cc = ic.CConnectionConfig() >>> cc = cc.cmd_line('-DEMO').getCmdLineParams() '-DEMO'
const std::string & isys::CConnectionConfig::getInstanceId | ( | ) | const |
Returns instanceId.
>>> cc = ic.CConnectionConfig() >>> cc.instanceId('sdk_demo_winideaID').getInstanceId() 'sdk_demo_winideaID'
uint32_t isys::CConnectionConfig::getProcessId | ( | ) | const |
Returns process id.
The id is set after call to findExistingInstance(), startNewInstance(), or findOrStartInstance(). It is valid only when different from 0.
>>> cmgr = ic.ConnectionMgr() >>> cc = ic.CConnectionConfig() >>> cmgr.connect(cc) >>> cc.getProcessId() != 0 True
uint16_t isys::CConnectionConfig::getTCPPort | ( | ) | const |
Returns TCP port.
The port is set after call to findExistingInstance(), startNewInstance(), or findOrStartInstance(). It is valid only when different from 0.
>>> cmgr = ic.ConnectionMgr() >>> cc = ic.CConnectionConfig() >>> cmgr.connect(cc) >>> cc.getTCPPort() != 0 True
int isys::CConnectionConfig::getUdpDiscoveryPort | ( | ) | const |
Returns UDP discovery port.
>>> cc = ic.CConnectionConfig() >>> cc.udpDiscoveryPort(5315).getUdpDiscoveryPort() 5315
IConnect::ELaunchFlags isys::CConnectionConfig::getVisibility | ( | ) | const |
Returns winIDEA window visibility after startup.
>>> cc = ic.CConnectionConfig() >>> cc = cc.visibility(ic.IConnect.lfShowHidden) >>> cc.getVisibility() & ic.IConnect.lfShowMask 768
IConnect::ELaunchFlags isys::CConnectionConfig::getWaitTime | ( | ) | const |
Returns wait time.
>>> cc = ic.CConnectionConfig() >>> cc = cc.waitTime(ic.IConnect.lfWait1s) >>> cc.getWaitTime() & ic.IConnect.lfWaitMask 64
const std::string & isys::CConnectionConfig::getWorkspace | ( | ) | const |
Returns workspace path.
>>> cc = ic.CConnectionConfig() >>> cc.workspace('path/to/the/workspace').getWorkspace() 'path/to/the/workspace'
SPConnectionConfig isys::CConnectionConfig::host | ( | const std::string & | rstr_host, |
uint16_t | w_TCP_port = 0 |
||
) |
Sets PC host to use.
If empty, local host is used to look for winIDEA. The optional w_TCP_port parameter can be used to specify the port to connect to. In this case no attempt at discovery is made, if winIDEA is not responding on this port, a new instance is not launched.
>>> cmgr = ic.ConnectionMgr() >>> cc = ic.CConnectionConfig() >>> cc = cc.host('', 5315)
SPConnectionConfig isys::CConnectionConfig::instanceId | ( | const std::string & | rstr_instance_ID | ) |
Sets winIDEA instance ID This value is used to.
>>> cmgr = ic.ConnectionMgr() >>> cc = ic.CConnectionConfig() >>> cc = cc.instanceId('sdk_example_winIDEA_instanceID') >>> cmgr.connect(cc)
bool isys::CConnectionConfig::isUseIPCDiscovery | ( | ) | const |
Returns true, if IPC discovery should be used.
>>> cc = ic.CConnectionCongif() >>> cc.useIPCDiscovery(False).isUseIPCDiscovery() False
SPConnectionConfig isys::CConnectionConfig::start | ( | IConnect::ELaunchFlags | eStart | ) |
Determines how to potentially start a new winIDEA instance.
Only one of lfStart
flags from IConnect::ELaunchFlags may be specified.
>>> cmgr = ic.ConnectionMgr() >>> cc = ic.CConnectionConfig() >>> cmgr.connect(cc.start(ic.IConnect.lfStartExisting)) >>> cc.get_start() & ic.IConnect.lfStartMask 3
SPConnectionConfig isys::CConnectionConfig::start_always | ( | ) |
Always start a new winIDEA instance.
>>> cmgr = ic.ConnectionMgr() >>> cc = ic.CConnectionConfig() >>> cmgr.connect(cc.start_always()) >>> cmgr.isConnected() True
SPConnectionConfig isys::CConnectionConfig::start_existing | ( | ) |
Connect to an existing winIDEA instance.
Never start new.
>>> cmgr = ic.ConnectionMgr() >>> cc = ic.CConnectionConfig() >>> cmgr.connect(cc.start_if_required()) >>> cmgr.isConnected() True >>> cmgr.disconnect_keep() >>> cmgr.connect(cc.start_existing()) >>> cmgr.isConnected() True
SPConnectionConfig isys::CConnectionConfig::start_if_required | ( | ) |
Start a new winIDEA instance if no existing is matching the connection criteria.
>>> cmgr = ic.ConnectionMgr() >>> cc = ic.CConnectionConfig() >>> cmgr.connect(cc.start_if_required()) >>> cmgr.isConnected() True
SPConnectionConfig isys::CConnectionConfig::udpDiscoveryPort | ( | uint16_t | w_UDP_discovery_port | ) |
Sets UDP discovery port.
>>> cmgr = ic.ConnectionMgr() >>> cc = ic.CConnectionConfig() >>> cc.udpDiscoveryPort(5315).getUdpDiscoveryPort() 5315
SPConnectionConfig isys::CConnectionConfig::useIPCDiscovery | ( | bool | b_use_IPC_discovery | ) |
Locally running winIDEA instances will be discovered using local IPC discovery.
By default this setting is set to true on Windows, and false on Linux.
>>> cc = ic.CConnectionCongif() >>> cc.useIPCDiscovery(False).isUseIPCDiscovery() False
SPConnectionConfig isys::CConnectionConfig::visibility | ( | IConnect::ELaunchFlags | e_visibility | ) |
Determines how the newly launched instance will start.
Only one of lfShowXXX
flags from IConnect::ELaunchFlags may be specified.
This value is used to
(it is not used to search for an existing instance)
>>> cmgr = ic.ConnectionMgr() >>> cc = ic.CConnectionConfig() >>> cmgr.connect(cc.visibility(ic.IConnect.lfShowHidden)) >>> cc.getVisibility() & ic.IConnect.lfShowMask 768
SPConnectionConfig isys::CConnectionConfig::waitTime | ( | IConnect::ELaunchFlags | e_wait_time | ) |
Determines how long the isystem.connect
should wait for running instances to respond.
Only one of lfWaitXXX
flags from IConnect::ELaunchFlags may be specified.
>>> cmgr = ic.ConnectionMgr() >>> cc = ic.CConnectionConfig() >>> cc = cc.waitTime(ic.IConnect.lfWait1s) >>> cc.getWaitTime() & ic.IConnect.lfWaitMask 64 >>> cmgr.connect(cc)
SPConnectionConfig isys::CConnectionConfig::workspace | ( | const std::string & | rstrWorkspace | ) |
Sets winIDEA workspace.
This value is used to