winIDEA SDK
isys::CIDEController Class Reference

Description

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>

Inheritance diagram for isys::CIDEController:
isys::WrapperBase

Public Types

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...
 
enum class  ViewState { Opened , Closed , Undefined }
 View states. More...
 
enum  EPathType {
  WINIDEA_EXE_DIR , WORKSPACE_DIR ,
  WORKSPACE_FILE_NAME
}
 Enum for method getPath(). More...
 
enum  EAPICategory {
  EDebugAPI , EAnalyzerAPI ,
  EiTestAPI
}
 Defines API categories. More...
 

Public Member Functions

 CIDEController (std::shared_ptr< ConnectionMgr > connectionMgr)
 Instantiates object. More...
 
isys::CWinIDEAVersion getWinIDEAVersion ()
 Returns winIDEA version. More...
 
bool isWinIDEAOpenVersion ()
 Returns true, if winIDEA is open version, false for professional version. More...
 
bool isAPICompatible (CIDEController::EAPICategory apiCategory)
 Returns true, if the given API category is compatible between the client and winIDEA of different versions. 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...
 
void getOpenDocuments (iconnect::StrVector &documents)
 Returns the list of all open documents.
 
void closeAllDocuments ()
 Closes all documents opened in winIDEA. More...
 
void saveAllDocuments ()
 Saves all documents opened in winIDEA. More...
 
CIDEData activate ()
 Activates the winIDEA window - it gets focus. More...
 
CIDEData minimize ()
 Minimizes winIDEA window. More...
 
CIDEData maximize ()
 Maximizes winIDEA window. More...
 
CIDEData restore ()
 Restores winIDEA window to previous position and size. More...
 
CIDEData getPID ()
 Returns object containing process ID of winIDEA instance. More...
 
CIDEData move (int left, int top, int right, int bottom)
 Moves and resizes winIDEA window to the given rectangle. More...
 
void refreshUI ()
 Refreshes winIDEA UI. More...
 
void bringWinIDEAToTop ()
 Makes winIDEA window the top window. More...
 
int getNumClients ()
 
CIDECapabilities getCapabilities ()
 Returns capabilities of the current hardware setup. More...
 
void iOpenDisconnect ()
 Disconnect winIDEA from debugger. More...
 
std::string getDefaultDownloadFile ()
 Returns default download file path relative to winIDEA workspace. 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 option (DWORD flags, const std::string &optionURL, COptionValue &optValue)
 This is general method for setting winIDEA options. More...
 
void setOptionsMap (const std::string &moduleTypeId, const std::string &assignmentsMap)
 Sets multiple options with one call. More...
 
std::string getOptionsMap (const std::string &moduleTypeId, const std::string &options, int bufferSize)
 Returns values of multiple options separated by '\n'. 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, DWORD 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 (const std::string &optionUrl, const std::string &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 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 setOption (const std::string &optionUrl, double 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 (const std::string &optionUrl, const int64_t value)
 Sets winIDEA option. More...
 
void setOption (const std::string &optionUrl, bool value)
 Sets winIDEA option. More...
 
bool optionExists (const std::string &option)
 Returns true, if the given option exists, false otherwise. More...
 
std::string getOptionStr (DWORD moduleType, const std::string &moduleId, const std::string &options)
 Returns winIDEA option of type string. More...
 
int64_t getOptionInt (DWORD moduleType, const std::string &moduleId, const std::string &option)
 Returns winIDEA option of type integer. More...
 
double getOptionFloat (DWORD moduleType, const std::string &moduleId, const std::string &option)
 Returns winIDEA option of type float. More...
 
std::string getOptionStr (const std::string &optionUrl)
 Returns winIDEA option of type string. 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...
 
int64_t getOptionInt (const std::string &optionUrl)
 Returns winIDEA option of type integer. More...
 
double getOptionFloat (const std::string &optionUrl)
 Returns winIDEA option of type float. More...
 
DWORD getDynamicOptionSize (DWORD moduleType, const std::string &moduleId, const std::string &option)
 Returns current number of items in dynamic option. More...
 
DWORD getDynamicOptionSize (const std::string &optionUrl)
 Returns current number of items in dynamic option. 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...
 
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...
 
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...
 
int addDynamicOption (const std::string &optionUrl, 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 removeDynamicOption (DWORD moduleType, const std::string &moduleId, const std::string &options, int index=-1)
 Removes item at the specified index in dynamic option. More...
 
void removeDynamicOption (const std::string &optionUrl, int index=-1)
 Removes item at the specified index in dynamic option. More...
 
void commitOptions (const std::string &optionUrl)
 
void commitOptions (DWORD destFlags)
 
std::string serviceCall (const std::string &funcUrl, const std::string &params, int bufferSize=DEFAULT_OPTION_BUFFER_SIZE)
 
std::string serviceCall (const std::string &funcUrl, const iconnect::StrStrMap &inParams, iconnect::StrStrMap &outParams, int bufferSize=DEFAULT_OPTION_BUFFER_SIZE)
 
iconnect::StrStrMap invoke (const std::string &funcUrl, const iconnect::StrStrMap &inParams)
 This method invokes functions within winIDEA process. More...
 
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...
 
std::string cdToWinIDEAWorkspaceDir ()
 Changes working directory to winIDEA workspace directory. More...
 
std::string getLicenseDescription ()
 Returns license description. More...
 
void openView (ViewType type, const std::string name="")
 Opens specified winIDEA view, for example Symbols, Callstack, etc. More...
 
void closeView (ViewType type, const std::string name="")
 Closes specified winIDEA view, for example Symbols, Callstack, etc. More...
 
void closeAllViews ()
 Closes all documents and views. More...
 
void enumerateViewTypes (std::vector< ViewTypeData > &data)
 Enumerates complete view types (singleton and non-singleton), providing data for each type. More...
 
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 exportViewLayout (const std::string filePath)
 Exports layout as workspace template. More...
 
void importViewLayout (const std::string filePath)
 Imports layout from workspace template. 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_IDE
 Module type for option URL, value "IDE". More...
 
static const std::string OPT_DEST_DOCUMENT
 Module type for option URL, value "Document". 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...
 

Member Enumeration Documentation

◆ EAPICategory

Defines API categories.

Enumerator
EDebugAPI 

debug API

EAnalyzerAPI 

analyzer API

EiTestAPI 

isystem.test API

◆ EPathType

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

◆ ViewState

View states.

Enumerator
Opened 

view opened

Closed 

view closed

◆ ViewType

enum class isys::CIDEController::ViewType
strong

Defines various view types.

Enumerator
Project 

Project view.

Symbols 

Symbols view.

Callstack 

Callstack view.

Locals 

Locals view.

This 

This view.

Disassembly 

Disassembly view.

CoreRegisters 

Core Registers view.

Terminal 

Terminal view.

Tasks 

Tasks view.

SFRs 

SFRs view.

Output 

Otput view.

Build 

Build view.

FindInFiles 

Find In Files view.

Tools 

Tools view.

Script 

Scripts view.

Progress 

Progress view.

Watch 

Watch view.

Memory 

Memory view.

SFR 

SFR view.

FrameworkPlugin 

Framework Plugin view.

Document 

Document view.

Constructor & Destructor Documentation

◆ CIDEController()

isys::CIDEController::CIDEController ( std::shared_ptr< ConnectionMgr connectionMgr)

Instantiates object.

Parameters
connectionMgrclass which maintains connection to winIDEA. Connection must be established before this call. Python example: test_get_capabilities.py

Member Function Documentation

◆ activate()

CIDEData isys::CIDEController::activate ( )

Activates the winIDEA window - it gets focus.

Python example: test_activate.py

◆ addDynamicOption() [1/2]

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
Parameters
optionUrloption.
indexitem index. If set to -1, item is appended to the end of the list.
Returns
index of the added element. Useful when input index was set to -1.

Python example: test_dynamic_option.py

◆ addDynamicOption() [2/2]

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
Parameters
moduleTypemodule type, one of ofDest... flags from EOptionFlags in i_Option.h.
moduleIdmodule ID, for example file name in case of documents or CLSID in case of plugins.
optionspath to option
indexitem index. If set to -1, item is appended to the end of the list.
Returns
index of the added element. Useful when input index was set to -1.

Python example: test_dynamic_option.py

◆ addDynamicOptionUrl()

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.

Parameters
optionUrloption.
indexitem index. If set to -1, item is appended to the end of the list.
See also
addDynamicOption(const std::string &, int)

Python example: test_dynamic_option.py

◆ bringWinIDEAToTop()

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

◆ cdToWinIDEAWorkspaceDir()

std::string isys::CIDEController::cdToWinIDEAWorkspaceDir ( )

Changes working directory to winIDEA workspace directory.

Returns
working directory before this function was called

Python example: test_cd_to_winidea_workspace_dir.py

◆ closeAllDocuments()

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

◆ closeAllViews()

void isys::CIDEController::closeAllViews ( )

Closes all documents and views.

Python example: test_layout_manipulation.py

◆ closeView()

void isys::CIDEController::closeView ( ViewType  type,
const std::string  name = "" 
)

Closes specified winIDEA view, for example Symbols, Callstack, etc.

Parameters
typetype 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.
namename 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.

◆ commitOptions() [1/2]

void isys::CIDEController::commitOptions ( const std::string &  optionUrl)
Deprecated:
This method terminates debugging session in most cases. Since all options are applied at start of debugging session, this method is no longer needed. For options applied during debugging session, use service call. For example, to apply hardware breakpoints, call
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.

Parameters
optionUrlurl 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.

◆ commitOptions() [2/2]

void isys::CIDEController::commitOptions ( DWORD  destFlags)
Deprecated:
This method terminates debugging session in most cases. Since all options are applied at start of debugging session, this method is no longer needed. For options applied during debugging session, use service call. For example, to apply hardware breakpoints, call
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

Parameters
destFlagsone of ofDest... flags from EOptionFlags.

◆ enumerateAllViews()

void isys::CIDEController::enumerateAllViews ( std::vector< ViewData > &  data)

Enumerates complete views (singleton and existing non-singleton), providing data for each of it.

Parameters
datavector of CIDEController::ViewData elements

Python example: test_layout_manipulation.py

◆ enumerateView()

void isys::CIDEController::enumerateView ( ViewType  type,
std::vector< ViewData > &  data,
bool  bAbsolutePaths = false 
)

Enumerates all views of specified type.

Parameters
typeview type
datavector of CIDEController::ViewData elements
bAbsolutePathsset to true to get absolute instead of relative paths of documents

Python example: test_document_manipulation.py

◆ enumerateViewTypes()

void isys::CIDEController::enumerateViewTypes ( std::vector< ViewTypeData > &  data)

Enumerates complete view types (singleton and non-singleton), providing data for each type.

Parameters
datavector of CIDEController::ViewTypeData elements

◆ exportViewLayout()

void isys::CIDEController::exportViewLayout ( const std::string  filePath)

Exports layout as workspace template.

Parameters
filePathpath 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

◆ findDynamicOption()

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.

Parameters
urlBaseurl of the dynamic option, without index
elementNamename of the element in the array of dynamic options
strToFindvalue of the dynamic option to look for

Python example: test_dynamic_option.py

◆ getCapabilities()

CIDECapabilities isys::CIDEController::getCapabilities ( )

Returns capabilities of the current hardware setup.

Python example: test_get_capabilities.py

◆ getDefaultDownloadFile()

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

◆ getDynamicOptions()

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"
Parameters
urlBasepart of url up to index
elementNamepart of url after index
optionValuesvector to contain option values on return

Python example: test_dynamic_option.py

◆ getDynamicOptionSize() [1/2]

DWORD isys::CIDEController::getDynamicOptionSize ( const std::string &  optionUrl)

Returns current number of items in dynamic option.

Example:

ide.getDynamicOptionSize("/IDE/ExecBPs.BP");
See also
getDynamicOptionSize() for description of dynamic options

◆ getDynamicOptionSize() [2/2]

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");
Parameters
moduleTypemodule type, one of ofDest... flags from EOptionFlags in i_Option.h.
moduleIdmodule ID, for example file name in case of documents or CLSID in case of plugins.
optionpath to option

Python example: test_dynamic_option.py

◆ getLicenseDescription()

std::string isys::CIDEController::getLicenseDescription ( )

Returns license description.

Python example: test_get_license_description.py

◆ getNumClients()

int isys::CIDEController::getNumClients ( )
Deprecated:
Since this method does not count clients connected via shared memory, there is no good use case for it.

Returns the number of iConnect clients connected via TCP/IP, including the calling one.

On winIDEA 9.7 and earlier always returns -1.

◆ getOptionFloat() [1/2]

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 ....

Parameters
optionUrlurl 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

◆ getOptionFloat() [2/2]

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 ....

Parameters
moduleTypemodule type, one of ofDest... flags from EOptionFlags in i_Option.h.
moduleIdmodule ID, for example file name in case of documents or CLSID in case of plug-ins.
optionpaths to option

Python example: test_get_option.py

◆ getOptionInt() [1/2]

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 ....

Parameters
optionUrlurl 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

◆ getOptionInt() [2/2]

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 ....

Parameters
moduleTypemodule type, one of ofDest... flags from EOptionFlags in i_Option.h.
moduleIdmodule ID, for example file name in case of documents or CLSID in case of plugins.
optionpaths to option

Python example: test_get_option.py

◆ getOptionJSON()

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 ....

Parameters
optionUrlurl 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

◆ getOptionsMap()

std::string isys::CIDEController::getOptionsMap ( const std::string &  moduleTypeId,
const std::string &  options,
int  bufferSize 
)

Returns values of multiple options separated by '\n'.

Parameters
moduleTypeIddefines 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.

optionsOptions.
bufferSizeSize 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

◆ getOptionStr() [1/2]

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 ....

Parameters
optionUrlurl 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

◆ getOptionStr() [2/2]

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 ....

Parameters
moduleTypemodule type, one of ofDest... flags from EOptionFlags in i_Option.h.
moduleIdmodule ID, for example file name in case of documents or CLSID in case of plugins.
optionspaths to option

Python example: test_get_option.py

◆ getPath()

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.

Parameters
pathTypespecifies which path or file name the function should return.

Python example: test_get_path.py

◆ getPID()

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

◆ getWinIDEAVersion()

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

◆ importViewLayout()

void isys::CIDEController::importViewLayout ( const std::string  filePath)

Imports layout from workspace template.

Parameters
filePathpath 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

◆ invoke()

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'})
Parameters
funcUrlname of the winIDEA service function to call
inParamsinput parameters as mapping
Returns
mapping of output values.

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

◆ iOpenDisconnect()

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

◆ isAPICompatible()

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.

Parameters
apiCategoryAPI category to get compatibility info for.

Python example: test_is_api_compatible.py

◆ isWinIDEAOpenVersion()

bool isys::CIDEController::isWinIDEAOpenVersion ( )

Returns true, if winIDEA is open version, false for professional version.

Python example: test_is_winidea_open_version.py

◆ maximize()

CIDEData isys::CIDEController::maximize ( )

Maximizes winIDEA window.

Python example: test_window_manipulation.py

◆ minimize()

CIDEData isys::CIDEController::minimize ( )

Minimizes winIDEA window.

Python example: test_window_manipulation.py

◆ move()

CIDEData isys::CIDEController::move ( int  left,
int  top,
int  right,
int  bottom 
)

Moves and resizes winIDEA window to the given rectangle.

Parameters
leftposition of the left window edge in screen coordinates
topposition of the top window edge in screen coordinates
rightposition of the right window edge in screen coordinates
bottomposition of the bottom window edge in screen coordinates

Python example: test_window_manipulation.py

◆ openView()

void isys::CIDEController::openView ( ViewType  type,
const std::string  name = "" 
)

Opens specified winIDEA view, for example Symbols, Callstack, etc.

Parameters
typetype of the view, must be one of CIDEController::ViewType. This parameter is sufficient for opening singleton views.
namename 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

◆ option() [1/2]

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 ....

Parameters
flagssee EOptionFlags in IConnectIDE.
optionURLURL of option to set.
optValuedata for option manipulation, see isys::COptionValue

Python example: test_option.py

◆ option() [2/2]

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)

Parameters
flagssee EOptionFlags in i_Option.h and EOptionFlags in IConnectIDE.
scopedefines the destination. It may be file name in case of documents or CLSID in case of plugins.
optionoption to set, depends also on flags used
optValuedata for option manipulation, see isys::COptionValue

Python example: test_option.py

◆ optionExists()

bool isys::CIDEController::optionExists ( const std::string &  option)

Returns true, if the given option exists, false otherwise.

Parameters
optionurl 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

◆ parseServiceCallMap()

static void isys::CIDEController::parseServiceCallMap ( const std::string &  str,
iconnect::StrStrMap outParams 
)
static
Deprecated:
due to serviceCall() methods deprecation this one is not needed anymore, call '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.
Parameters
strstring returned by method serviceCall(const std::string &, const std::string &, int)
outParamsmapping to receive parsed key/value pairs.

◆ refreshUI()

void isys::CIDEController::refreshUI ( )

Refreshes winIDEA UI.

Call this method, when previous calls to isystem.connect methods disabled UI refresh (usually for speed reasons).

See also
CDataController::writeValue(IConnectDebug::EAccessFlags, bool, BYTE, DWORD, const CValueType &)

◆ removeDynamicOption() [1/2]

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");
Parameters
optionUrlOption.
indexitem index. If set to -1, all items are removed.

Python example: test_dynamic_option.py

◆ removeDynamicOption() [2/2]

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);
Parameters
moduleTypemodule type, one of ofDest... flags from EOptionFlags in i_Option.h.
moduleIdmodule ID, for example file name in case of documents or CLSID in case of plugins.
optionspath to option
indexitem index. If set to -1, all items are removed.

Python example: test_dynamic_option.py

◆ restore()

CIDEData isys::CIDEController::restore ( )

Restores winIDEA window to previous position and size.

Python example: test_window_manipulation.py

◆ saveAllDocuments()

void isys::CIDEController::saveAllDocuments ( )

Saves all documents opened in winIDEA.

Python example: test_document_manipulation.py

◆ serviceCall() [1/2]

std::string isys::CIDEController::serviceCall ( const std::string &  funcUrl,
const iconnect::StrStrMap inParams,
iconnect::StrStrMap outParams,
int  bufferSize = DEFAULT_OPTION_BUFFER_SIZE 
)
Deprecated:
call method 'invoke(std::string, iconnect::StrStrMap, iconnect::StrStrMap)' This method invokes functions within winIDEA process. Use this method only when instructed by iSYSTEM support.
Parameters
funcUrlname of the winIDEA service function to call, for example: '/IDE/Divide'
inParamsinput parameters as mapping
outParamsoutput parameters as mapping
bufferSizebuffer size for data received from winIDEA. Usually there is no need to set this value.
Returns
function result as comma separated 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.

◆ serviceCall() [2/2]

std::string isys::CIDEController::serviceCall ( const std::string &  funcUrl,
const std::string &  params,
int  bufferSize = DEFAULT_OPTION_BUFFER_SIZE 
)
Deprecated:
call method 'invoke(std::string, iconnect::StrStrMap, iconnect::StrStrMap)' This method invokes functions within winIDEA process. Use this method only when instructed by iSYSTEM support.
Parameters
funcUrlname of the winIDEA service function to call, for example: '/IDE/Divide'
paramsfunction parameters as comma separated key: value pairs, for example: 'Dividend: 10, Divisor: 3'
bufferSizebuffer size for data received from winIDEA. Usually there is no need to set this value.
Returns
function result as comma separated 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.

◆ setInterruptsDisable()

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

◆ setOption() [1/7]

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)
Parameters
optionUrlurl 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
                    
valuevalue to be assigned to the option
Exceptions
IOExceptionin case of failure.
See also
setOption(std::string, std::string);

◆ setOption() [2/7]

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)
Parameters
optionUrlurl 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
                    
valuevalue to be assigned to the option
Exceptions
IOExceptionin case of failure.
See also
setOption(std::string, std::string);

◆ setOption() [3/7]

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")
Parameters
optionUrlurl 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
                    
valuevalue to be assigned to the option
Exceptions
IOExceptionin case of failure.

Python example: test_dynamic_option.py

◆ setOption() [4/7]

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)
Parameters
optionUrlurl 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
                    
valuevalue to be assigned to the option
Exceptions
IOExceptionin case of failure.
See also
setOption(std::string, std::string);

◆ setOption() [5/7]

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")
Parameters
moduleTypemodule type, one of ofDest... flags from EOptionFlags in i_Option.h.
moduleIdmodule ID, for example file name in case of documents or CLSID in case of plugins.
optionpaths to option
valuevalue of option
Exceptions
IOExceptionin case of failure.

Python example: test_dynamic_option.py

◆ setOption() [6/7]

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 ....

Parameters
moduleTypemodule type, one of ofDest... flags from EOptionFlags in i_Option.h.
moduleIdmodule ID, for example file name in case of documents or CLSID in case of plugins.
optionpaths to option
valuevalue of option
Exceptions
IOExceptionin case of failure.
See also
setOption (DWORD, std::string, std::string, std::string)

◆ setOption() [7/7]

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 ....

Parameters
moduleTypemodule type, one of ofDest... flags from EOptionFlags in i_Option.h.
moduleIdmodule ID, for example file name in case of documents or CLSID in case of plugins.
optionpaths to option
valuevalue of option
Exceptions
IOExceptionin case of failure.
See also
setOption (DWORD, std::string, std::string, std::string)

◆ setOption_f64()

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 ....

See also
setOption(const std::string &, double);

◆ setOption_str()

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 ....

See also
setOption(const std::string &, const std::string &);

◆ setOption_u32()

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)
Parameters
optionUrlurl 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
                    
valuevalue to be assigned to the option
Exceptions
IOExceptionin case of failure.
See also
setOption(std::string, std::string); This method should be used in languages, where oveloading makes problems. Paths and values of options can be found in winIDEA, menu Help | Display Option ....
setOption(const std::string &, DWORD);

◆ setOptionJSON()

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}}')
Parameters
optionUrlurl 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.

valueJSONvalue to be assigned to the object
Exceptions
IOExceptionin case of failure.

Python example: test_get_set_option_json.py

◆ setOptionsMap()

void isys::CIDEController::setOptionsMap ( const std::string &  moduleTypeId,
const std::string &  assignmentsMap 
)

Sets multiple options with one call.

Parameters
moduleTypeIddefines 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.

assignmentsMapdefines 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

Member Data Documentation

◆ DEFAULT_OPTION_BUFFER_SIZE

const int isys::CIDEController::DEFAULT_OPTION_BUFFER_SIZE = 0x10000
static

Buffer size for data received from winIDEA.

If this buffer size is too small, use method 'option()' instead of specialized 'getOptionStr()'.

◆ OPT_DEST_DOCUMENT

const std::string isys::CIDEController::OPT_DEST_DOCUMENT
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).

◆ OPT_DEST_IDE

const std::string isys::CIDEController::OPT_DEST_IDE
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).

◆ OPT_DEST_IOPEN

const std::string isys::CIDEController::OPT_DEST_IOPEN
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).

◆ OPT_DEST_PLUGIN

const std::string isys::CIDEController::OPT_DEST_PLUGIN
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).