winIDEA SDK
isys::CMulticoreConnectionMgr Class Reference

Description

Deprecated:
since 9.21.209. Use ConnectionMgr instead.

This class manages connections to multicore instances of winIDEA. It can be used when we want to connect to multi-core target. Since advanced functions of ConnectionMgr (which is used under the hood) are not exposed, use ConnectionMgr directly when advanced functionality (for example starting winIDEAs in hidden mode) is needed.

Python example: test_get_connected_core_ids.py

#include <CMulticoreConnectionMgr.h>

Public Member Functions

ConnectionMgrSPtr connectPrimaryCore (const iconnect::StrVector &loggingParams, const std::string &winIDEAWorkspace, bool isUseWinIDEAId, const std::string &winIDEAId, const std::string &primaryCoreId)
 This method starts winIDEA version, which was the last started in current user account. More...
 
ConnectionMgrSPtr connectPrimaryCore (const iconnect::StrVector &loggingParams, const std::string &winIDEAWorkspace, bool isUseWinIDEAId, const std::string &winIDEAId, const std::string &primaryCoreId, const std::string &pathToIConnectDll)
 This method creates connection to primary core. More...
 
ConnectionMgrSPtr connectCore (int coreIndex, const std::string &coreId)
 Creates connection to core with the given index and assigns it the given coreId. More...
 
ConnectionMgrSPtr getConnectionMgr (const std::string &coreID)
 Returns connection manager for core with the given ID. More...
 
bool isConnected (const std::string &coreId)
 Returns true, if connection to the given core was established and is still alive. More...
 
void disconnect (const std::string &coreId, IConnect::EDetachFlags closeServerFlags=IConnect::dfCloseAutoSaveDefault, IConnect::EDetachFlags autoSaveFlags=IConnect::dfCloseAutoSaveDefault)
 Disconnects connection manager with the given core ID. More...
 
void disconnectAll ()
 Disconnects all connection managers.
 
isys::CDebugFacadeSPtr getCDebugFacade (const std::string &coreId)
 Returns cached CDebugFacade for the given core ID.
 
isys::CIDEControllerSPtr getCIDEController (const std::string &coreId)
 Returns cached CIDEController for the given core ID.
 
isys::CExecutionControllerSPtr getCExecutionController (const std::string &coreId)
 Returns cached CExecutionController for the given core ID.
 
isys::CLoaderControllerSPtr getCLoaderController (const std::string &coreId)
 Returns cached CLoaderController for the given core ID.
 
isys::CDataController2SPtr getCDataEController2 (const std::string &coreId)
 
isys::CDataController2SPtr getCDataController2 (const std::string &coreId)
 Returns cached CDataController2 for the given core ID.
 
isys::CHILControllerSPtr getCHILController ()
 Returns cached CHILController for the given core ID.
 
iconnect::StrVector getConnectedCoreIDs ()
 Returns list of all core IDs currently connected. More...
 

Member Function Documentation

◆ connectCore()

ConnectionMgrSPtr isys::CMulticoreConnectionMgr::connectCore ( int  coreIndex,
const std::string &  coreId 
)

Creates connection to core with the given index and assigns it the given coreId.

Connection to primary core must exist before calling this method (call connectPrimaryCore()). If winIDEA for the given core is already running, connection to this instance is made.

Parameters
coreIndexindex of the core to connect to. Index 0 is used for primary core (see connectPrimaryCore()), so for this method coreIndex >= 1.
coreIdid, which is assigned to the core with index coreIndex. Must not be empty string!
Returns
created connection manager

Python example: test_connect_core.py

◆ connectPrimaryCore() [1/2]

ConnectionMgrSPtr isys::CMulticoreConnectionMgr::connectPrimaryCore ( const iconnect::StrVector loggingParams,
const std::string &  winIDEAWorkspace,
bool  isUseWinIDEAId,
const std::string &  winIDEAId,
const std::string &  primaryCoreId 
)

This method starts winIDEA version, which was the last started in current user account.

See overload for details.

See also
connectPrimaryCore(const iconnect::StrVector &, const std::string &, bool, const std::string &, const std::string &, const std::string &).

Python example: test_is_connected.py

◆ connectPrimaryCore() [2/2]

ConnectionMgrSPtr isys::CMulticoreConnectionMgr::connectPrimaryCore ( const iconnect::StrVector loggingParams,
const std::string &  winIDEAWorkspace,
bool  isUseWinIDEAId,
const std::string &  winIDEAId,
const std::string &  primaryCoreId,
const std::string &  pathToIConnectDll 
)

This method creates connection to primary core.

If connection is already established, it disconnects first, then reconnects. This is the first method to be called in this class.

Note that it is highly recommended to specify either winIDEAWorkspace or winIDEAId, so that connection is always made to the primary core. Otherwise connection is made to the latest started winIDEA, which is usually not the one you intended to connect to, especially in multicore configurations.

Parameters
loggingParamsused for logger configuration. If empty vector, logging of isystem.connect calls is not performed. Otherwise loggingParams[0] should contain log file name. If loggingParams[1] exists, it is used as prefix in log statements.
winIDEAWorkspacepath to winIDEA workspace used for connection to winIDEA. If empty, connection to the most recently used winIDEA is made.
isUseWinIDEAIdif true, parameter winIDEAId is used to connect to winIDEA with the given ID. If false, connection can be made to any winIDEA, regardless if it has ID specified or not.
winIDEAIdused only if isUseWinIDEAId is true. If empty string, connection can be made only to winIDEA, which has no ID specified.
primaryCoreIdid of primary core, may be empty string.
pathToIConnectDllif not empty string, is should specify full path to iconnect.dll in winIDEA installation directory, for example 'C:\iSYSTEM\winIDEA\iconnect.dll'. Specify it when you want to run specific version of winIDEA, or winIDEA has never been run under current user account, so connect() can not find winIDEA. For example, when starting winIDEA with script running as a service (daemon).

Python example: test_is_connected.py

◆ disconnect()

void isys::CMulticoreConnectionMgr::disconnect ( const std::string &  coreId,
IConnect::EDetachFlags  closeServerFlags = IConnect::dfCloseAutoSaveDefault,
IConnect::EDetachFlags  autoSaveFlags = IConnect::dfCloseAutoSaveDefault 
)

Disconnects connection manager with the given core ID.

Parameters closeServerFlags and autoSaveFlags are later ORed together. Both of them are specified, because Java enums are not int-s, so they can not be ORed together before the call. This is also the reason for using IConnect::dfCloseAutoSaveDefault as value for closeServerFlags as described below in parameter description.

Parameters
coreIdid of the core to be disconnected
closeServerFlagsflags defining if and when winIDEA should close. Specify one of IConnect::EDetachFlags dfCloseServer... flags. If you do not want winIDEA to close, specify value IConnect::dfCloseAutoSaveDefault for this item.
autoSaveFlagsflags defining if winIDEA should save unsaved information. Specify one of IConnect::EDetachFlags dfCloseAutoSave... flags.

Example: test_connect_core.py

◆ getCDataEController2()

isys::CDataController2SPtr isys::CMulticoreConnectionMgr::getCDataEController2 ( const std::string &  coreId)
Deprecated:
since 2016-05-02, 9.12.179, because of typo in method name. Call getCDataController2() instead.

◆ getConnectedCoreIDs()

iconnect::StrVector isys::CMulticoreConnectionMgr::getConnectedCoreIDs ( )

Returns list of all core IDs currently connected.

Python example: test_get_connected_core_ids.py

◆ getConnectionMgr()

ConnectionMgrSPtr isys::CMulticoreConnectionMgr::getConnectionMgr ( const std::string &  coreID)

Returns connection manager for core with the given ID.

Parameters
coreIDcore ID or empty string for primary core.

◆ isConnected()

bool isys::CMulticoreConnectionMgr::isConnected ( const std::string &  coreId)

Returns true, if connection to the given core was established and is still alive.

Python example: test_is_connected.py