winIDEA SDK
|
This class can be used to control winIDEA IDE behavior.
Python example for method setOption(): test_dynamic_option.py
Python example for method getOptionStr(): test_get_option.py
Python example for method getCapabilities(): test_get_capabilities.py
#include <CIDEController.h>
Public Types | |
enum | EAPICategory { EDebugAPI , EAnalyzerAPI , EiTestAPI } |
Defines API categories. More... | |
enum | EPathType { WINIDEA_EXE_DIR , WORKSPACE_DIR , WORKSPACE_FILE_NAME } |
Enum for method getPath(). More... | |
enum class | ViewState { Opened , Closed , Undefined } |
View states. More... | |
enum class | ViewType { Project , Symbols , Callstack , Locals , This , Disassembly , CoreRegisters , Terminal , Tasks , SFRs , Output , Build , FindInFiles , Tools , Script , Progress , Watch , Memory , SFR , FrameworkPlugin , Document , NoneView } |
Defines various view types. More... | |
Public Member Functions | |
CIDEData | activate () |
Activates the winIDEA window - it gets focus. More... | |
int | addDynamicOption (const std::string &optionUrl, int index=-1) |
Adds item at the specified index in dynamic option. More... | |
int | addDynamicOption (DWORD moduleType, const std::string &moduleId, const std::string &options, int index=-1) |
Adds item at the specified index in dynamic option. More... | |
std::string | addDynamicOptionUrl (const std::string &optionUrl, int index=-1) |
This is a helper method, which performs the same operation as addDynamicOption(const std::string &, int), but returns URL of the added option instead of its index. More... | |
void | bringWinIDEAToTop () |
Makes winIDEA window the top window. More... | |
std::string | cdToWinIDEAWorkspaceDir () |
Changes working directory to winIDEA workspace directory. More... | |
CIDEController (std::shared_ptr< ConnectionMgr > connectionMgr) | |
Instantiates object. More... | |
void | closeAllDocuments () |
Closes all documents opened in winIDEA. More... | |
void | closeAllViews () |
Closes all documents and views. More... | |
void | closeView (ViewType type, const std::string name="") |
Closes specified winIDEA view, for example Symbols, Callstack, etc. More... | |
void | commitOptions (const std::string &optionUrl) |
void | commitOptions (DWORD destFlags) |
void | enumerateAllViews (std::vector< ViewData > &data) |
Enumerates complete views (singleton and existing non-singleton), providing data for each of it. More... | |
void | enumerateView (ViewType type, std::vector< ViewData > &data, bool bAbsolutePaths=false) |
Enumerates all views of specified type. More... | |
void | enumerateViewTypes (std::vector< ViewTypeData > &data) |
Enumerates complete view types (singleton and non-singleton), providing data for each type. More... | |
void | exportViewLayout (const std::string filePath) |
Exports layout as workspace template. More... | |
int | findDynamicOption (const std::string &urlBase, const std::string &elementName, const std::string &strToFind) |
This method returns index of option with the given value. More... | |
CIDECapabilities | getCapabilities () |
Returns capabilities of the current hardware setup. More... | |
std::string | getDefaultDownloadFile () |
Returns default download file path relative to winIDEA workspace. More... | |
void | getDynamicOptions (const std::string &urlBase, const std::string &elementName, iconnect::StrVector &optionValues) |
Returns all values of dynamic options for the given urlBase and element. More... | |
DWORD | getDynamicOptionSize (const std::string &optionUrl) |
Returns current number of items in dynamic option. More... | |
DWORD | getDynamicOptionSize (DWORD moduleType, const std::string &moduleId, const std::string &option) |
Returns current number of items in dynamic option. More... | |
std::string | getLicenseDescription () |
Returns license description. More... | |
int | getNumClients () |
void | getOpenDocuments (iconnect::StrVector &documents) |
Returns the list of all open documents. | |
double | getOptionFloat (const std::string &optionUrl) |
Returns winIDEA option of type float. More... | |
double | getOptionFloat (DWORD moduleType, const std::string &moduleId, const std::string &option) |
Returns winIDEA option of type float. More... | |
int64_t | getOptionInt (const std::string &optionUrl) |
Returns winIDEA option of type integer. More... | |
int64_t | getOptionInt (DWORD moduleType, const std::string &moduleId, const std::string &option) |
Returns winIDEA option of type integer. More... | |
std::string | getOptionJSON (const std::string &optionUrl) |
Returns winIDEA options of an object as JSON formatted string Paths and values of options can be found in winIDEA, menu Help | Display Option ... . More... | |
std::string | getOptionsMap (const std::string &moduleTypeId, const std::string &options, int bufferSize) |
Returns values of multiple options separated by '\n'. More... | |
std::string | getOptionStr (const std::string &optionUrl) |
Returns winIDEA option of type string. More... | |
std::string | getOptionStr (DWORD moduleType, const std::string &moduleId, const std::string &options) |
Returns winIDEA option of type string. More... | |
std::string | getPath (EPathType pathType) |
Returns path or file name of winIDEA item, for example name of the workspace file currently opened in winIDEA. More... | |
CIDEData | getPID () |
Returns object containing process ID of winIDEA instance. More... | |
isys::CWinIDEAVersion | getWinIDEAVersion () |
Returns winIDEA version. More... | |
void | importViewLayout (const std::string filePath) |
Imports layout from workspace template. More... | |
iconnect::StrStrMap | invoke (const std::string &funcUrl, const iconnect::StrStrMap &inParams) |
This method invokes functions within winIDEA process. More... | |
void | iOpenDisconnect () |
Disconnect winIDEA from debugger. More... | |
bool | isAPICompatible (CIDEController::EAPICategory apiCategory) |
Returns true, if the given API category is compatible between the client and winIDEA of different versions. More... | |
bool | isWinIDEAOpenVersion () |
Returns true, if winIDEA is open version, false for professional version. More... | |
CIDEData | maximize () |
Maximizes winIDEA window. More... | |
CIDEData | minimize () |
Minimizes winIDEA window. More... | |
CIDEData | move (int left, int top, int right, int bottom) |
Moves and resizes winIDEA window to the given rectangle. More... | |
void | openView (ViewType type, const std::string name="") |
Opens specified winIDEA view, for example Symbols, Callstack, etc. More... | |
bool | option (DWORD flags, const std::string &optionURL, COptionValue &optValue) |
This is general method for setting winIDEA options. More... | |
bool | option (DWORD flags, const std::string &scope, const std::string &option, COptionValue &optValue) |
This is general method for setting winIDEA options. More... | |
bool | optionExists (const std::string &option) |
Returns true, if the given option exists, false otherwise. More... | |
void | refreshUI () |
Refreshes winIDEA UI. More... | |
void | removeDynamicOption (const std::string &optionUrl, int index=-1) |
Removes item at the specified index in dynamic option. More... | |
void | removeDynamicOption (DWORD moduleType, const std::string &moduleId, const std::string &options, int index=-1) |
Removes item at the specified index in dynamic option. More... | |
CIDEData | restore () |
Restores winIDEA window to previous position and size. More... | |
void | saveAllDocuments () |
Saves all documents opened in winIDEA. More... | |
std::string | serviceCall (const std::string &funcUrl, const iconnect::StrStrMap &inParams, iconnect::StrStrMap &outParams, int bufferSize=DEFAULT_OPTION_BUFFER_SIZE) |
std::string | serviceCall (const std::string &funcUrl, const std::string ¶ms, int bufferSize=DEFAULT_OPTION_BUFFER_SIZE) |
int64_t | setInterruptsDisable (int64_t interruptFlags=0xffff) |
This method is a convenient shortcut to disable target interrupts during some winIDEA operations, and to restore the previous state. More... | |
void | setOption (const std::string &optionUrl, bool value) |
Sets winIDEA option. More... | |
void | setOption (const std::string &optionUrl, const int64_t value) |
Sets winIDEA option. More... | |
void | setOption (const std::string &optionUrl, const std::string &value) |
Sets winIDEA option. More... | |
void | setOption (const std::string &optionUrl, double value) |
Sets winIDEA option. More... | |
void | setOption (DWORD moduleType, const std::string &moduleId, const std::string &option, const std::string &value) |
Sets winIDEA option. More... | |
void | setOption (DWORD moduleType, const std::string &moduleId, const std::string &option, double value) |
Sets winIDEA option. More... | |
void | setOption (DWORD moduleType, const std::string &moduleId, const std::string &option, DWORD value) |
Sets winIDEA option. More... | |
void | setOption_f64 (const std::string &optionUrl, double value) |
This method should be used in languages, where oveloading makes problems, for example Tcl. More... | |
void | setOption_str (const std::string &optionUrl, const std::string &value) |
This method should be used in languages, where oveloading makes problems, for example Tcl. More... | |
void | setOption_u32 (const std::string &optionUrl, DWORD value) |
Sets winIDEA option. More... | |
void | setOptionJSON (const std::string &optionUrl, const std::string &valueJSON) |
Sets winIDEA options of an object from a JSON formatted string Paths and values of options can be found in winIDEA, menu Help | Display Option ... . More... | |
void | setOptionsMap (const std::string &moduleTypeId, const std::string &assignmentsMap) |
Sets multiple options with one call. More... | |
Static Public Member Functions | |
static void | parseServiceCallMap (const std::string &str, iconnect::StrStrMap &outParams) |
Static Public Attributes | |
static const int | DEFAULT_OPTION_BUFFER_SIZE = 0x10000 |
Buffer size for data received from winIDEA. More... | |
static const std::string | OPT_DEST_DOCUMENT |
Module type for option URL, value "Document". More... | |
static const std::string | OPT_DEST_IDE |
Module type for option URL, value "IDE". More... | |
static const std::string | OPT_DEST_IOPEN |
Module type for option URL, value "IOPEN". More... | |
static const std::string | OPT_DEST_PLUGIN |
Module type for option URL, value "Plugin". More... | |
Enum for method getPath().
Enumerator | |
---|---|
WINIDEA_EXE_DIR | directory of winIDEA executable |
WORKSPACE_DIR | directory of winIDEA workspace file |
WORKSPACE_FILE_NAME | path and name of winIDEA workspace file |
|
strong |
|
strong |
Defines various view types.
isys::CIDEController::CIDEController | ( | std::shared_ptr< ConnectionMgr > | connectionMgr | ) |
Instantiates object.
connectionMgr | class which maintains connection to winIDEA. Connection must be established before this call. Python example: test_get_capabilities.py |
CIDEData isys::CIDEController::activate | ( | ) |
Activates the winIDEA window - it gets focus.
Python example: test_activate.py
int isys::CIDEController::addDynamicOption | ( | const std::string & | optionUrl, |
int | index = -1 |
||
) |
Adds item at the specified index in dynamic option.
Default values are used for all members of the item. Use method setOption() to define the values.
Example:
ide.addDynamicOption("/IDE/System.Network.Networks"); // appends an empty breakpoint
optionUrl | option. |
index | item index. If set to -1, item is appended to the end of the list. |
index
was set to -1.Python example: test_dynamic_option.py
int isys::CIDEController::addDynamicOption | ( | DWORD | moduleType, |
const std::string & | moduleId, | ||
const std::string & | options, | ||
int | index = -1 |
||
) |
Adds item at the specified index in dynamic option.
Default values are used for all members of the item. Use method setOption() to define the values.
Example:
ide.addDynamicOption(ofDestIDE, "", "System.Network.Networks"); // add empty breakpoint
moduleType | module type, one of ofDest ... flags from EOptionFlags in i_Option.h. |
moduleId | module ID, for example file name in case of documents or CLSID in case of plugins. |
options | path to option |
index | item index. If set to -1, item is appended to the end of the list. |
index
was set to -1.Python example: test_dynamic_option.py
std::string isys::CIDEController::addDynamicOptionUrl | ( | const std::string & | optionUrl, |
int | index = -1 |
||
) |
This is a helper method, which performs the same operation as addDynamicOption(const std::string &, int), but returns URL of the added option instead of its index.
optionUrl | option. |
index | item index. If set to -1, item is appended to the end of the list. |
Python example: test_dynamic_option.py
void isys::CIDEController::bringWinIDEAToTop | ( | ) |
Makes winIDEA window the top window.
Works only on winIDEA 9.9 and later. Does nothing on winIDEA 9.7 and earlier versions.
Python example: test_window_manipulation.py
std::string isys::CIDEController::cdToWinIDEAWorkspaceDir | ( | ) |
Changes working directory to winIDEA workspace directory.
Python example: test_cd_to_winidea_workspace_dir.py
void isys::CIDEController::closeAllDocuments | ( | ) |
Closes all documents opened in winIDEA.
It has the same functionality as CDocumentController::closeAll(), but can be used even if we have no document opened via isystem.connect.
Python example: test_document_manipulation.py
void isys::CIDEController::closeAllViews | ( | ) |
Closes all documents and views.
Python example: test_layout_manipulation.py
void isys::CIDEController::closeView | ( | ViewType | type, |
const std::string | name = "" |
||
) |
Closes specified winIDEA view, for example Symbols, Callstack, etc.
type | type of the view, must be one of CIDEController::ViewType . This parameter is sufficient for closing singleton views or all non-singleton views of certain type. |
name | name of the view. This is required for closing non-singleton view with a certain name, but only if once opened via GUI (manually). Memory view is an example of such view. |
void isys::CIDEController::commitOptions | ( | const std::string & | optionUrl | ) |
serviceCall('/iOPEN/Core.Debug.ApplyInternalBPs', '')
Contact iSYSTEM support if you need other options to be applied during debug session.
Commits options previously set by option() and setOption() methods.
optionUrl | url of the option to commit. Can also be module type only, for example "/IOPEN/" or "/IDE/". Both '/' must be present, as they are in the examples. |
void isys::CIDEController::commitOptions | ( | DWORD | destFlags | ) |
serviceCall('/iOPEN/Core.Debug.ApplyInternalBPs', '')
Contact iSYSTEM support if you need other options to be applied during debug session.
Commits options previously set by option() and setOption() methods. Note that document and plugin destinations cannot use this function as they require the path to the document or plugin. Use commitOptions('/Document/<path>') function instead
destFlags | one of ofDest ... flags from EOptionFlags. |
void isys::CIDEController::enumerateAllViews | ( | std::vector< ViewData > & | data | ) |
Enumerates complete views (singleton and existing non-singleton), providing data for each of it.
data | vector of CIDEController::ViewData elements |
Python example: test_layout_manipulation.py
void isys::CIDEController::enumerateView | ( | ViewType | type, |
std::vector< ViewData > & | data, | ||
bool | bAbsolutePaths = false |
||
) |
Enumerates all views of specified type.
type | view type |
data | vector of CIDEController::ViewData elements |
bAbsolutePaths | set to true to get absolute instead of relative paths of documents |
Python example: test_document_manipulation.py
void isys::CIDEController::enumerateViewTypes | ( | std::vector< ViewTypeData > & | data | ) |
Enumerates complete view types (singleton and non-singleton), providing data for each type.
data | vector of CIDEController::ViewTypeData elements |
void isys::CIDEController::exportViewLayout | ( | const std::string | filePath | ) |
Exports layout as workspace template.
filePath | path to the file with *.jswt extension (Json Workspace Template). Can be an absolute path or relative to the workspace. |
Python example: test_export_import_layout.py
int isys::CIDEController::findDynamicOption | ( | const std::string & | urlBase, |
const std::string & | elementName, | ||
const std::string & | strToFind | ||
) |
This method returns index of option with the given value.
For example, if we have an array of options
"/a/b.c[idx].d" = x
and we specify:
urlBase = "/a/b.c" elementName = "d" strToFind = "e"
then this method will return the first idx
, for which x == "e"
. If the item is not found, -1 is returned.
urlBase | url of the dynamic option, without index |
elementName | name of the element in the array of dynamic options |
strToFind | value of the dynamic option to look for |
Python example: test_dynamic_option.py
CIDECapabilities isys::CIDEController::getCapabilities | ( | ) |
Returns capabilities of the current hardware setup.
Python example: test_get_capabilities.py
std::string isys::CIDEController::getDefaultDownloadFile | ( | ) |
Returns default download file path relative to winIDEA workspace.
Throws FileNotFoundException if there is no download file with symbols or Load Symbols
check box is not selected in winIDEA.
Python example: test_get_default_download_file.py
void isys::CIDEController::getDynamicOptions | ( | const std::string & | urlBase, |
const std::string & | elementName, | ||
iconnect::StrVector & | optionValues | ||
) |
Returns all values of dynamic options for the given urlBase and element.
Example:
Get all function names in profiler for current trigger. URL for the first name is /Document/sample_profiler.trd/SessionTrigger.Item.Profiler.ExecArea[0].Name
Specify parameters as:
urlBase = "/Document/sample_profiler.trd/SessionTrigger.Item.Profiler.ExecArea" elementName = "Name"
urlBase | part of url up to index |
elementName | part of url after index |
optionValues | vector to contain option values on return |
Python example: test_dynamic_option.py
DWORD isys::CIDEController::getDynamicOptionSize | ( | const std::string & | optionUrl | ) |
Returns current number of items in dynamic option.
Example:
ide.getDynamicOptionSize("/IDE/ExecBPs.BP");
dynamic
options DWORD isys::CIDEController::getDynamicOptionSize | ( | DWORD | moduleType, |
const std::string & | moduleId, | ||
const std::string & | option | ||
) |
Returns current number of items in dynamic option.
Dynamic options are arrays of options, which size is not fixed. They may have 0..N items. Example of dynamic option are breakpoints. There may be any number of breakpoints in the program, and each of them contains several attributes, for example location and enabled status. See 'Help | Display Option...' in winIDEA. Make sure that Values
check-box is not checked and click the Display
button. All options with '[]' are dynamic. If there is a number, for example '[32]', the option has fixed size.
Example:
ide.getDynamicOptionSize(ofDestIDE, "", "ExecBPs.BP");
moduleType | module type, one of ofDest ... flags from EOptionFlags in i_Option.h. |
moduleId | module ID, for example file name in case of documents or CLSID in case of plugins. |
option | path to option |
Python example: test_dynamic_option.py
std::string isys::CIDEController::getLicenseDescription | ( | ) |
Returns license description.
Python example: test_get_license_description.py
int isys::CIDEController::getNumClients | ( | ) |
Returns the number of iConnect clients connected via TCP/IP, including the calling one.
On winIDEA 9.7 and earlier always returns -1.
double isys::CIDEController::getOptionFloat | ( | const std::string & | optionUrl | ) |
Returns winIDEA option of type float.
Paths and values of options can be found in winIDEA, menu Help | Display Option ...
.
optionUrl | url of the option. Format: /<moduleType>/<moduleId>/<optionPath> where: <moduleType> defines module type, see constants beginning with OPT_DEST_ ... defined in this file for available module types, for example CIDEController::OPT_DEST_IDE.<moduleId> defines module ID, used only by some module types. See CIDEController::OPT_DEST_IDE and other module type constants to see if this value must be specified. <optionPath> path defining the option. Examples: /HIL/outputVoltage.1 /IOPEN/Communication.Mode /Document/myFile.ccv/Code.AutoStart |
Python example: test_get_option.py
double isys::CIDEController::getOptionFloat | ( | DWORD | moduleType, |
const std::string & | moduleId, | ||
const std::string & | option | ||
) |
Returns winIDEA option of type float.
Paths and values of options can be found in winIDEA, menu Help | Display Option ...
.
moduleType | module type, one of ofDest ... flags from EOptionFlags in i_Option.h. |
moduleId | module ID, for example file name in case of documents or CLSID in case of plug-ins. |
option | paths to option |
Python example: test_get_option.py
int64_t isys::CIDEController::getOptionInt | ( | const std::string & | optionUrl | ) |
Returns winIDEA option of type integer.
Paths and values of options can be found in winIDEA, menu Help | Display Option ...
.
optionUrl | url of the option. Format: /<moduleType>/<moduleId>/<optionPath> where: <moduleType> defines module type, see constants beginning with OPT_DEST_ ... defined in this file for available module types, for example CIDEController::OPT_DEST_IDE.<moduleId> defines module ID, used only by some module types. See CIDEController::OPT_DEST_IDE and other module type constants to see if this value must be specified. <optionPath> path defining the option. Examples: /HIL/outputVoltage.1 /IOPEN/Communication.Mode /Document/myFile.ccv/Code.AutoStart |
Python example: test_get_option.py
int64_t isys::CIDEController::getOptionInt | ( | DWORD | moduleType, |
const std::string & | moduleId, | ||
const std::string & | option | ||
) |
Returns winIDEA option of type integer.
Paths and values of options can be found in winIDEA, menu Help | Display Option ...
.
moduleType | module type, one of ofDest ... flags from EOptionFlags in i_Option.h. |
moduleId | module ID, for example file name in case of documents or CLSID in case of plugins. |
option | paths to option |
Python example: test_get_option.py
std::string isys::CIDEController::getOptionJSON | ( | const std::string & | optionUrl | ) |
Returns winIDEA options of an object as JSON formatted string Paths and values of options can be found in winIDEA, menu Help | Display Option ...
.
optionUrl | url of the option. Format: /<moduleType>/<moduleId>/<optionPath>; where: <moduleType> defines module type, see constants beginning with OPT_DEST_ ... defined in this file for available module types, for example CIDEController::OPT_DEST_IDE.<moduleId> defines module ID, used only by some module types. See CIDEController::OPT_DEST_IDE and other module type constants to see if this value must be specified. <optionPath> path defining the option. Examples: /IOPEN/Communication.Mode /Document/myFile.ccv/Code |
Python example: test_get_set_option_json.py
std::string isys::CIDEController::getOptionsMap | ( | const std::string & | moduleTypeId, |
const std::string & | options, | ||
int | bufferSize | ||
) |
Returns values of multiple options separated by '\n'.
moduleTypeId | defines module type and ID combined. See constants beginning with OPT_DEST_ ... defined in this file for available module types, for example CIDEController::OPT_DEST_IDE.If moduleType is OPT_DEST_DOCUMENT, append document name. See CIDEController::OPT_DEST_IDE and other module type constants to see if moduleID must be specified. <optionPath> path defining the option. |
options | Options. |
bufferSize | Size of buffer. Examples: getOptionsMap("/IDE/", "Debug.DownloadFiles.File[0].Path\nDebug.DownloadFiles.File[1].Path", 1000); getOptionsMap("/Document/sample_profiler.trd/", "SessionTrigger.Item.Profiler.ExecArea[0].Name\nSessionTrigger.Item.Profiler.ExecArea[1].Name", 1000); |
Python example: test_get_set_options_map.py
std::string isys::CIDEController::getOptionStr | ( | const std::string & | optionUrl | ) |
Returns winIDEA option of type string.
Paths and values of options can be found in winIDEA, menu Help | Display Option ...
.
optionUrl | url of the option. Format: /<moduleType>/<moduleId>/<optionPath> where: <moduleType> defines module type, see constants beginning with OPT_DEST_ ... defined in this file for available module types, for example CIDEController::OPT_DEST_IDE.<moduleId> defines module ID, used only by some module types. See CIDEController::OPT_DEST_IDE and other module type constants to see if this value must be specified. <optionPath> path defining the option. Examples: /HIL/outputVoltage.1 /IOPEN/Communication.Mode /Document/myFile.ccv/Code.AutoStart |
Python example: test_get_option.py
std::string isys::CIDEController::getOptionStr | ( | DWORD | moduleType, |
const std::string & | moduleId, | ||
const std::string & | options | ||
) |
Returns winIDEA option of type string.
Paths and values of options can be found in winIDEA, menu Help | Display Option ...
.
moduleType | module type, one of ofDest ... flags from EOptionFlags in i_Option.h. |
moduleId | module ID, for example file name in case of documents or CLSID in case of plugins. |
options | paths to option |
Python example: test_get_option.py
std::string isys::CIDEController::getPath | ( | EPathType | pathType | ) |
Returns path or file name of winIDEA item, for example name of the workspace file currently opened in winIDEA.
pathType | specifies which path or file name the function should return. |
Python example: test_get_path.py
CIDEData isys::CIDEController::getPID | ( | ) |
Returns object containing process ID of winIDEA instance.
To obtain the process ID call CIDEData::getPID() on returned object, for example:
ideData = ideCtrl.getPID() pid = ideData.getPID()
Python example: test_activate.py
isys::CWinIDEAVersion isys::CIDEController::getWinIDEAVersion | ( | ) |
Returns winIDEA version.
Supported only on winIDEA versions 9.9 and higher. On versions lower than that, it always returns 0.0.0.
Python example: test_get_winidea_version.py
void isys::CIDEController::importViewLayout | ( | const std::string | filePath | ) |
Imports layout from workspace template.
filePath | path to the file with *.jswt extension (Json Workspace Template). Can be an absolute path or relative to the workspace. |
Python example: test_export_import_layout.py
iconnect::StrStrMap isys::CIDEController::invoke | ( | const std::string & | funcUrl, |
const iconnect::StrStrMap & | inParams | ||
) |
This method invokes functions within winIDEA process.
Use this method only when instructed by iSYSTEM support. Example:
result = ide.invoke('/IDE/Divide', {'Dividend': '10', 'Divisor': '2'})
funcUrl | name of the winIDEA service function to call |
inParams | input parameters as mapping |
Note: Python and Java support Python mapping and Java Map as input/output types in addition to isystem.connect.StrStrMap
. Example for Java:
ideCtrl.invoke("/IDE/Divide", Map.of("Dividend", "10", "Divisor", "2"));
Python example: test_invoke.py
void isys::CIDEController::iOpenDisconnect | ( | ) |
Disconnect winIDEA from debugger.
This method is equivalent to winIDEA menu command 'Tools | Disconnect from Debugger'.
Python example: test_iopen_disconnect.py
bool isys::CIDEController::isAPICompatible | ( | CIDEController::EAPICategory | apiCategory | ) |
Returns true, if the given API category is compatible between the client and winIDEA of different versions.
Client version is determined by SDK automatically and winIDEA version is taken from connected winIDEA. Connection to winIDEA must be established before calling this method.
apiCategory | API category to get compatibility info for. |
Python example: test_is_api_compatible.py
bool isys::CIDEController::isWinIDEAOpenVersion | ( | ) |
Returns true, if winIDEA is open version, false for professional version.
Python example: test_is_winidea_open_version.py
CIDEData isys::CIDEController::maximize | ( | ) |
Maximizes winIDEA window.
Python example: test_window_manipulation.py
CIDEData isys::CIDEController::minimize | ( | ) |
Minimizes winIDEA window.
Python example: test_window_manipulation.py
CIDEData isys::CIDEController::move | ( | int | left, |
int | top, | ||
int | right, | ||
int | bottom | ||
) |
Moves and resizes winIDEA window to the given rectangle.
left | position of the left window edge in screen coordinates |
top | position of the top window edge in screen coordinates |
right | position of the right window edge in screen coordinates |
bottom | position of the bottom window edge in screen coordinates |
Python example: test_window_manipulation.py
void isys::CIDEController::openView | ( | ViewType | type, |
const std::string | name = "" |
||
) |
Opens specified winIDEA view, for example Symbols, Callstack, etc.
type | type of the view, must be one of CIDEController::ViewType . This parameter is sufficient for opening singleton views. |
name | name of the view. This is required for opening specified non-singleton view, but only if once opened via GUI (manually). Memory view is an example of such view. |
Python example: test_layout_manipulation.py
bool isys::CIDEController::option | ( | DWORD | flags, |
const std::string & | optionURL, | ||
COptionValue & | optValue | ||
) |
This is general method for setting winIDEA options.
Destination and scope (document name) are encoded in optionURL. Paths and values of options can be found in winIDEA, menu Help | Display Option ...
.
flags | see EOptionFlags in IConnectIDE. |
optionURL | URL of option to set. |
optValue | data for option manipulation, see isys::COptionValue |
Python example: test_option.py
bool isys::CIDEController::option | ( | DWORD | flags, |
const std::string & | scope, | ||
const std::string & | option, | ||
COptionValue & | optValue | ||
) |
This is general method for setting winIDEA options.
Use set/getOption
() methods for simple cases. Paths and values of options can be found in winIDEA, menu Help | Display Option ...
.
Example in Python:
import isystem.connect as ic ide = ic.CIDEController(conMgr) optVal = isystem.connect.COptionValue("myString") flags = ic.ofValBuffer | ic.ofSet ide.option(flags, "myscope", "myoption", optVal)
flags | see EOptionFlags in i_Option.h and EOptionFlags in IConnectIDE. |
scope | defines the destination. It may be file name in case of documents or CLSID in case of plugins. |
option | option to set, depends also on flags used |
optValue | data for option manipulation, see isys::COptionValue |
Python example: test_option.py
bool isys::CIDEController::optionExists | ( | const std::string & | option | ) |
Returns true, if the given option exists, false otherwise.
option | url of the option with value, not just part of option path. Format: /<moduleType>/<moduleId>/<optionPath> where: <moduleType> defines module type, see constants beginning with OPT_DEST_ ... defined in this file for available module types, for example CIDEController::OPT_DEST_IDE.<moduleId> defines module ID, used only by some module types. See CIDEController::OPT_DEST_IDE and other module type constants to see if this value must be specified. <optionPath> path defining the option. Examples: /HIL/outputVoltage.1 /IOPEN/Communication.Mode /Document/myFile.ccv/Code.AutoStart |
Python example: test_option_exists.py
|
static |
'invoke(std::string, iconnect::StrStrMap, iconnect::StrStrMap)'
Parses the given string and returns mapping of strings. The string should be obtained as return value from service call.str | string returned by method serviceCall(const std::string &, const std::string &, int) |
outParams | mapping to receive parsed key/value pairs. |
void isys::CIDEController::refreshUI | ( | ) |
Refreshes winIDEA UI.
Call this method, when previous calls to isystem.connect methods disabled UI refresh (usually for speed reasons).
void isys::CIDEController::removeDynamicOption | ( | const std::string & | optionUrl, |
int | index = -1 |
||
) |
Removes item at the specified index in dynamic option.
Example:
ide.removeDynamicOption("/IDE/ExecBPs.BP");
optionUrl | Option. |
index | item index. If set to -1, all items are removed. |
Python example: test_dynamic_option.py
void isys::CIDEController::removeDynamicOption | ( | DWORD | moduleType, |
const std::string & | moduleId, | ||
const std::string & | options, | ||
int | index = -1 |
||
) |
Removes item at the specified index in dynamic option.
Example:
ide.removeDynamicOption(ofDestIDE, "", "ExecBPs.BP", 2);
moduleType | module type, one of ofDest ... flags from EOptionFlags in i_Option.h. |
moduleId | module ID, for example file name in case of documents or CLSID in case of plugins. |
options | path to option |
index | item index. If set to -1, all items are removed. |
Python example: test_dynamic_option.py
CIDEData isys::CIDEController::restore | ( | ) |
Restores winIDEA window to previous position and size.
Python example: test_window_manipulation.py
void isys::CIDEController::saveAllDocuments | ( | ) |
Saves all documents opened in winIDEA.
Python example: test_document_manipulation.py
std::string isys::CIDEController::serviceCall | ( | const std::string & | funcUrl, |
const iconnect::StrStrMap & | inParams, | ||
iconnect::StrStrMap & | outParams, | ||
int | bufferSize = DEFAULT_OPTION_BUFFER_SIZE |
||
) |
'invoke(std::string, iconnect::StrStrMap, iconnect::StrStrMap)'
This method invokes functions within winIDEA process. Use this method only when instructed by iSYSTEM support.funcUrl | name of the winIDEA service function to call, for example: '/IDE/Divide' |
inParams | input parameters as mapping |
outParams | output parameters as mapping |
bufferSize | buffer size for data received from winIDEA. Usually there is no need to set this value. |
key: value
pairs, for example: 'Quotient: 5, Remainder: 0'
This information is the same as returned in outParams
.IMPORTANT: Never parse returned string with your code, because format may change in the future. Always use returned outParams
mapping.
std::string isys::CIDEController::serviceCall | ( | const std::string & | funcUrl, |
const std::string & | params, | ||
int | bufferSize = DEFAULT_OPTION_BUFFER_SIZE |
||
) |
invoke()
instead. This method invokes functions within winIDEA process. Use this method only when instructed by iSYSTEM support.funcUrl | name of the winIDEA service function to call, for example: '/IDE/Divide' |
params | function parameters as comma separated key: value pairs, for example: 'Dividend: 10, Divisor: 3' |
bufferSize | buffer size for data received from winIDEA. Usually there is no need to set this value. |
key: value
pairs, for example: 'Quotient: 5, Remainder: 0'
IMPORTANT: Never parse returned string with your code, because format may change in the future. Always use parseServiceCallMap() for parsing, then retrieve values from mapping.
int64_t isys::CIDEController::setInterruptsDisable | ( | int64_t | interruptFlags = 0xffff | ) |
This method is a convenient shortcut to disable target interrupts during some winIDEA operations, and to restore the previous state.
If called with the default argument value, all interrupts are disabled. Returns current setting, which can be used on next call to restore the the interrupt enabled/disabled setting. The returned value can only be used as parameter to this method to restore previous state. The meaning of bits is internal to this method. If you would like to have finer control over interrupts, then set options /IDE/Debug
.Debugging.DisableIRQ_... manually.
Python example: test_set_interrupts_disable.py
void isys::CIDEController::setOption | ( | const std::string & | optionUrl, |
bool | value | ||
) |
Sets winIDEA option.
Paths and values of options can be found in winIDEA, menu Help | Display Option ...
.
Example:
ide.setOption("/IDE/Debug.DownloadFiles.File[0].Load", true)
optionUrl | url of the option. Format: /<moduleType>/<moduleId>/<optionPath> where: <moduleType> defines module type, see constants beginning with OPT_DEST_ ... defined in this file for available module types, for example CIDEController::OPT_DEST_IDE.<moduleId> defines module ID, used only by some module types. See CIDEController::OPT_DEST_IDE and other module type constants to see if this value must be specified. <optionPath> path defining the option. Examples: /HIL/outputVoltage.1 /IOPEN/Communication.Mode /Document/myFile.ccv/Code.AutoStart |
value | value to be assigned to the option |
IOException | in case of failure. |
void isys::CIDEController::setOption | ( | const std::string & | optionUrl, |
const int64_t | value | ||
) |
Sets winIDEA option.
Paths and values of options can be found in winIDEA, menu Help | Display Option ...
.
Example:
ide.setOption("/Document/traceTest.trd/TraceExport.TimeFrom", 5000000000)
optionUrl | url of the option. Format: /<moduleType>/<moduleId>/<optionPath> where: <moduleType> defines module type, see constants beginning with OPT_DEST_ ... defined in this file for available module types, for example CIDEController::OPT_DEST_IDE.<moduleId> defines module ID, used only by some module types. See CIDEController::OPT_DEST_IDE and other module type constants to see if this value must be specified. <optionPath> path defining the option. Examples: /HIL/outputVoltage.1 /IOPEN/Communication.Mode /Document/myFile.ccv/Code.AutoStart |
value | value to be assigned to the option |
IOException | in case of failure. |
void isys::CIDEController::setOption | ( | const std::string & | optionUrl, |
const std::string & | value | ||
) |
Sets winIDEA option.
Paths and values of options can be found in winIDEA, menu Help | Display Option ...
.
Example:
ide.setOption("/IOPEN/Hardware.Emulator", "iC3000")
optionUrl | url of the option. Format: /<moduleType>/<moduleId>/<optionPath> where: <moduleType> defines module type, see constants beginning with OPT_DEST_ ... defined in this file for available module types, for example CIDEController::OPT_DEST_IDE.<moduleId> defines module ID, used only by some module types. See CIDEController::OPT_DEST_IDE and other module type constants to see if this value must be specified. <optionPath> path defining the option. Examples: /HIL/outputVoltage.1 /IOPEN/Communication.Mode /Document/myFile.ccv/Code.AutoStart |
value | value to be assigned to the option |
IOException | in case of failure. |
Python example: test_dynamic_option.py
void isys::CIDEController::setOption | ( | const std::string & | optionUrl, |
double | value | ||
) |
Sets winIDEA option.
Paths and values of options can be found in winIDEA, menu Help | Display Option ...
.
Example:
ide.setOption("/IDE/Debug.Symbols.Format.VagueFloatPrecision", 1e-005)
optionUrl | url of the option. Format: /<moduleType>/<moduleId>/<optionPath> where: <moduleType> defines module type, see constants beginning with OPT_DEST_ ... defined in this file for available module types, for example CIDEController::OPT_DEST_IDE.<moduleId> defines module ID, used only by some module types. See CIDEController::OPT_DEST_IDE and other module type constants to see if this value must be specified. <optionPath> path defining the option. Examples: /HIL/outputVoltage.1 /IOPEN/Communication.Mode /Document/myFile.ccv/Code.AutoStart |
value | value to be assigned to the option |
IOException | in case of failure. |
void isys::CIDEController::setOption | ( | DWORD | moduleType, |
const std::string & | moduleId, | ||
const std::string & | option, | ||
const std::string & | value | ||
) |
Sets winIDEA option.
Paths and values of options can be found in winIDEA, menu Help | Display Option ...
.
Example:
ide.setOption(ofDestIOPEN, "", "Hardware.Emulator", "iC5000")
moduleType | module type, one of ofDest ... flags from EOptionFlags in i_Option.h. |
moduleId | module ID, for example file name in case of documents or CLSID in case of plugins. |
option | paths to option |
value | value of option |
IOException | in case of failure. |
Python example: test_dynamic_option.py
void isys::CIDEController::setOption | ( | DWORD | moduleType, |
const std::string & | moduleId, | ||
const std::string & | option, | ||
double | value | ||
) |
Sets winIDEA option.
Paths and values of options can be found in winIDEA, menu Help | Display Option ...
.
moduleType | module type, one of ofDest ... flags from EOptionFlags in i_Option.h. |
moduleId | module ID, for example file name in case of documents or CLSID in case of plugins. |
option | paths to option |
value | value of option |
IOException | in case of failure. |
void isys::CIDEController::setOption | ( | DWORD | moduleType, |
const std::string & | moduleId, | ||
const std::string & | option, | ||
DWORD | value | ||
) |
Sets winIDEA option.
Paths and values of options can be found in winIDEA, menu Help | Display Option ...
.
moduleType | module type, one of ofDest ... flags from EOptionFlags in i_Option.h. |
moduleId | module ID, for example file name in case of documents or CLSID in case of plugins. |
option | paths to option |
value | value of option |
IOException | in case of failure. |
void isys::CIDEController::setOption_f64 | ( | const std::string & | optionUrl, |
double | value | ||
) |
This method should be used in languages, where oveloading makes problems, for example Tcl.
Paths and values of options can be found in winIDEA, menu Help | Display Option ...
.
void isys::CIDEController::setOption_str | ( | const std::string & | optionUrl, |
const std::string & | value | ||
) |
This method should be used in languages, where oveloading makes problems, for example Tcl.
Paths and values of options can be found in winIDEA, menu Help | Display Option ...
.
void isys::CIDEController::setOption_u32 | ( | const std::string & | optionUrl, |
DWORD | value | ||
) |
Sets winIDEA option.
Paths and values of options can be found in winIDEA, menu Help | Display Option ...
.
Example:
ide.setOption("/IDE/Debug.Symbols.Format.MaxParseUpload", 256)
optionUrl | url of the option. Format: /<moduleType>/<moduleId>/<optionPath> where: <moduleType> defines module type, see constants beginning with OPT_DEST_ ... defined in this file for available module types, for example CIDEController::OPT_DEST_IDE.<moduleId> defines module ID, used only by some module types. See CIDEController::OPT_DEST_IDE and other module type constants to see if this value must be specified. <optionPath> path defining the option. Examples: /HIL/outputVoltage.1 /IOPEN/Communication.Mode /Document/myFile.ccv/Code.AutoStart |
value | value to be assigned to the option |
IOException | in case of failure. |
Help | Display Option ...
.void isys::CIDEController::setOptionJSON | ( | const std::string & | optionUrl, |
const std::string & | valueJSON | ||
) |
Sets winIDEA options of an object from a JSON formatted string Paths and values of options can be found in winIDEA, menu Help | Display Option ...
.
Example:
ide.setOption("/IDE/Options.Terminal.Session", '{"Session": {"BaudRate": 4800, "DataBits": 7}}')
optionUrl | url of the option. Format: /<moduleType>/<moduleId>/<optionPath> where: <moduleType> defines module type, see constants beginning with OPT_DEST_ ... defined in this file for available module types, for example CIDEController::OPT_DEST_IDE.<moduleId> defines module ID, used only by some module types. See CIDEController::OPT_DEST_IDE and other module type constants to see if this value must be specified. <optionPath> path defining the option. |
valueJSON | value to be assigned to the object |
IOException | in case of failure. |
Python example: test_get_set_option_json.py
void isys::CIDEController::setOptionsMap | ( | const std::string & | moduleTypeId, |
const std::string & | assignmentsMap | ||
) |
Sets multiple options with one call.
moduleTypeId | defines module type and ID combined. See constants beginning with OPT_DEST_ ... defined in this file for available module types, for example CIDEController::OPT_DEST_IDE.If moduleType is OPT_DEST_DOCUMENT, append document name. See CIDEController::OPT_DEST_IDE and other module type constants to see if moduleID must be specified. |
assignmentsMap | defines key/value pair delimited by colon character |
Examples:
setOptionsMap("/IDE/", "Debug.DownloadFiles.File[0].Path: prog.elf") setOptionsMap("/Document/sample_profiler.trd", "SessionTrigger.Item.Profiler.ExecArea[1].Name: func1")
Python example: test_get_set_options_map.py
|
static |
Buffer size for data received from winIDEA.
If this buffer size is too small, use method 'option()' instead of specialized 'getOptionStr()'.
|
static |
Module type for option URL, value "Document".
The second item in path must be document name. Used in CIDEController::setOption(const std::string &, const std::string &), CIDEController::setOption(const std::string &, DWORD), and CIDEController::setOption(const std::string &, double).
|
static |
Module type for option URL, value "IDE".
Used in CIDEController::setOption(const std::string &, const std::string &), CIDEController::setOption(const std::string &, DWORD), and CIDEController::setOption(const std::string &, double).
|
static |
Module type for option URL, value "IOPEN".
Used in CIDEController::setOption(const std::string &, const std::string &), CIDEController::setOption(const std::string &, DWORD), and CIDEController::setOption(const std::string &, double).
|
static |
Module type for option URL, value "Plugin".
The second item in path must be plug-in name given as CLSID. Used in CIDEController::setOption(const std::string &, const std::string &), CIDEController::setOption(const std::string &, DWORD), and CIDEController::setOption(const std::string &, double).