winIDEA SDK
IConnectIDE Struct Reference

Description

The IConnectIDE interface provides access to IDE functions exported by winIDEA.

#include <i_Connect.h>

Inherits IUnknown.

Inherited by IConnectIDE2.

Classes

struct  SApplication
 Stores application parameters. More...
 

Public Types

enum  EFileFlags {
  ffIsOpen = 0x0000000F , ffClose = 0x00000001 ,
  ffCloseAll = 0x00000002 , ffCloseDiscard = 0x0000000B ,
  ffSave = 0x00000003 , ffSaveAs = 0x00000004 ,
  ffSaveAsPrompt = 0x00000005 , ffSaveAll = 0x00000006 ,
  ffSaveAsOverwrite = 0x0000000C , ffSaveCopyAsOverwrite = 0x0000000E ,
  ffNew = 0x00000007 , ffNewPrompt = 0x00000008 ,
  ffOpen = 0x00000009 , ffOpenPrompt = 0x0000000A ,
  ffOpenOrNew = 0x0000000D , ffActionMask = 0x0000000F ,
  ffCreateObjectOnly = 0x00000010
}
 File related flags. More...
 
enum  EDocumentFlags {
  dmMarkSet = 0x00010000 , dmMarkClear = 0x00020000 ,
  dmMarkPos = 0x00030000 , dmMarkMask = 0x00030000 ,
  dfFocus = 0x00040000 , dfSpecialWindow = 0x00080000 ,
  dtText = 0x00000000 , dtAnalyzer = 0x01000000 ,
  dtCodeCoverage = 0x02000000 , dtDataCoverage = 0x03000000 ,
  dtMask = 0x0F000000 , dwTerminal = 0x01000000 ,
  dwDisassembly = 0x02000000 , dwBreakpoints = 0x03000000 ,
  dwMask = 0x0F000000 , daStart = 0x10000000 ,
  daStop = 0x20000000 , daStatus = 0x30000000 ,
  daResume = 0x40000000 , daSelect = 0x50000000 ,
  daExport = 0x60000000 , daExportV = 0x70000000 ,
  daSetExportFormat = 0x80000000 , daDeactivate = 0x90000000 ,
  daReset = 0xA0000000 , daStart1 = 0xB0000000 ,
  daAbort = 0xC0000000 , daDirty = 0xD0000000 ,
  daMask = 0xF0000000
}
 Document related flags. More...
 
enum  EDocumentExportParameter {
  deFormatMask = isys::IConnectIDE::EDocumentExportParameter::deFormatMask , deScopeAll = isys::IConnectIDE::EDocumentExportParameter::deScopeAll ,
  deScopeSelection = isys::IConnectIDE::EDocumentExportParameter::deScopeSelection , deScopeMask = isys::IConnectIDE::EDocumentExportParameter::deScopeMask
}
 
enum  EDocumentResetParameter {
  drContent = isys::IConnectIDE::EDocumentResetParameter::drContent , drItem = isys::IConnectIDE::EDocumentResetParameter::drItem ,
  drItemMask = isys::IConnectIDE::EDocumentResetParameter::drItemMask , drConfigAll = isys::IConnectIDE::EDocumentResetParameter::drConfigAll ,
  drConfigSelected = isys::IConnectIDE::EDocumentResetParameter::drConfigSelected , drConfigPresetInit = isys::IConnectIDE::EDocumentResetParameter::drConfigPresetInit ,
  drConfigPresetApply = isys::IConnectIDE::EDocumentResetParameter::drConfigPresetApply , drConfigMask = isys::IConnectIDE::EDocumentResetParameter::drConfigMask
}
 
enum  EDocumentStatusParameter {
  dsReturnFlags = 0x00000001 , dsDomainMask = 0x0000000E ,
  dsDomainDefault = 0x00000000 , dsDomainSession = 0x00000002 ,
  dsDomainDocument = 0x00000004
}
 Interpretation of dwParameter value in a daStatus call. More...
 
enum  EStatusFlagsAnalyzerSession {
  sfasRecorderMask = 0x0300 , sfasRecorderIdle = 0x0000 ,
  sfasRecorderWaiting = 0x0100 , sfasRecorderSampling = 0x0200 ,
  sfasLoading = 0x0400 , sfasAnalyzing = 0x0800 ,
  sfasError = 0x8000 , sfasOverrun = 0x4000
}
 Additional status information for Analyzer type document, when dsReturnFlags requests /c dsDomainSession. More...
 
enum  EStatusFlagsDocument {
  sfadSerializing = 0x0100 , sfadNoData = 0x0200 ,
  sfadIsDirty = 0x0400 , sfadCanStart = 0x0800
}
 Additional status information for Analyzer type document, when dsReturnFlags requests /c dsDomainDocument. More...
 
enum  EStatusFlagsAnalyzer {
  sfaErrorsInBuffer = 0x0100 , sfaBufferOverrun = 0x0200 ,
  sfaLoading = 0x0400 , sfaRecordingError = 0x0800 ,
  sfaWaiting = 0x1000 , sfaEmpty = 0x2000 ,
  sfaOpening = 0x4000
}
 Additional status information for Analyzer type document, when dsReturnFlags is requested. These flags are OR-ed into the return value. More...
 
enum  EAnalyzerStopParameter {
  asStopActionMask = 0x000F , asStopSamplingOrAnalyzingAndWait = 0x00 ,
  asSampling = 0x01 , asUploading = 0x02 ,
  asAnalyzing = 0x03 , asSerializing = 0x04
}
 Additional information for /c daStop action of the Analyzer type document. More...
 
enum  EApplicationFlags {
  afWindowActivate = 0x00000001 , afWindowMinimize = 0x00000002 ,
  afWindowRestore = 0x00000003 , afWindowMaximize = 0x00000004 ,
  afWindowMove = 0x00000005 , afWindowMask = 0x0000000F ,
  afHookMsgBoxSet = 0x00000010 , afHookMsgBoxClr = 0x00000020 ,
  afHookMsgBoxGet = 0x00000030 , afHookMsgBoxAll = 0x00000040 ,
  afHookMsgBoxAllClr = 0x00000050 , afHookMsgBoxMask = 0x00000070 ,
  afiOPEN_Disconnect = 0x00000100 , afiOPEN_Mask = 0x00000F00
}
 Application flags. More...
 

Public Member Functions

virtual HRESULT Document (DWORD dwDocumentFlags, LPCSTR pszFileName, LPCSTR pszParameter=NULL, DWORD dwParameter=0) PURE
 Manages document files and windows in winIDEA. More...
 
virtual HRESULT Workspace (DWORD dwFileFlags, LPCSTR pszWorkspaceName) PURE
 Controls a workspace in winIDEA. More...
 

Member Enumeration Documentation

◆ EAnalyzerStopParameter

Additional information for /c daStop action of the Analyzer type document.

Enumerator
asStopActionMask 

stop action mask

asStopSamplingOrAnalyzingAndWait 

Stop sampling or analyzing and wait until status is idle. This option is deprecated.

asSampling 

Stop sampling. The analyzer will no longer record any samples.

asUploading 

Stop uploading trace data from emulator to PC.

asAnalyzing 

Stop analyzing of the uploaded data.

asSerializing 

Abort analyzer document save/load operation.

◆ EApplicationFlags

Application flags.

Enumerator
afWindowActivate 

activate the application

afWindowMinimize 

minimize

afWindowRestore 

restore size

afWindowMaximize 

maximize

afWindowMove 

move to pApplication->m_Rect

afWindowMask 

mask for application values

afHookMsgBoxSet 

hook message box when called over iConnect. (default)

afHookMsgBoxClr 

display regular message box

afHookMsgBoxGet 

gets the hook state, returns ICONNECT_S_STATUS_1 for not hooked, ICONNECT_S_STATUS_2 for iConnect only hook, ICONNECT_S_STATUS_3 for all hooked

afHookMsgBoxAll 

hook all message box calls. revert to default with afHookMsgBoxClr

afHookMsgBoxAllClr 

revert from hooking all message box calls

afHookMsgBoxMask 

mask for Hook settings

afiOPEN_Disconnect 

disconnect the iOPEN interface. Equivalent to winIDEA/Tools/Disconnect

afiOPEN_Mask 

mask for iOPEN settings

◆ EDocumentExportParameter

Deprecated:
For C++ use flags from isys::IConnectIDE::EDocumentExportParameter (i_ConnectTypes.h), for other languages the right type is automatically used. Provided for backwards compatibility.
Enumerator
deFormatMask 

See isys::IConnectIDE::EDocumentExportParameter.

deScopeAll 

See isys::IConnectIDE::EDocumentExportParameter.

deScopeSelection 

See isys::IConnectIDE::EDocumentExportParameter.

deScopeMask 

See isys::IConnectIDE::EDocumentExportParameter.

◆ EDocumentFlags

Document related flags.

Enumerator
dmMarkSet 

puts a marker on the line specified with dwParameter

dmMarkClear 

clears the marker

dmMarkPos 

positions the document on the specified line

dmMarkMask 

mask for dmXXX values

 

dfFocus 

Focus the file window.

Use dwParameter to specify the line number to be displayed.

 

dfSpecialWindow 

not a document window, but a special one defined by dwXXX mask
pszFileName is ignored

 

dtText 

Text type.

dtAnalyzer 

Analyzer type.

dtCodeCoverage 

Code Coverage type.

dtMask 

mask for dtXXX values

 

dwTerminal 

terminal window, supports daStart, daStop and daStatus actions

dwDisassembly 

disassembly window, supports dmMarkPos

dwBreakpoints 

breakpoint window. dwParameter specifies the BP Index to focus

dwMask 

mask for dwXXX values

 

daStart 

start the document action.

There exists only one action per document type. Can be used with documents of type dtAnalyzer, dtCodeCoverage, and dtDataCoverage.

 

daStop 

stop the document action (for example trace recording).

/c dwParameter specifies document specific type of stop. For analyzer documents see IConnectIDE::EAnalyzerStopParameter.

 

daStatus 

probe status.

S_OK = idle, S_FALSE = busy, ICONNECT_S_STATUS_[1..4] document specific busy state. If dsReturnFlags is specified in the call, additional status bits can be encoded in the return value Can be used with documents of type dtAnalyzer, dtCodeCoverage, and dtDataCoverage. It makes sense to use it between daStart and daStop actions to see, if the action already stopped for some other reason.

 

daResume 

resume the document action, currently works only with code coverage.

 

daSelect 

select a property of the document.

Currently only valid with documents of type dtAnalyzer and dtCodeCoverage pszParameter is used as trigger/rangeset name. A NULL/empty valua specifies default (full) configuration.

 

daExport 

Export the document to a different format.

Currently only valid with documents of type dtAnalyzer and dtCodeCoverage. pszParameter specifies the file to export to. dwParameter specifies the export format and scope to use. The values follow the document specific export format list starting with 0. If 0xFFFFFFFF is used the currently set export format is used. See IConnectIDE::EDocumentExportParameter for scope flags.

 

daExportV 

Same effect as daExport, but the associated viewer is launched after export.

This option is deprecated.

 

daSetExportFormat 

Sets the default export format.

only valid with documents of type dtAnalyzer and dtCodeCoverage pszParameter specifies the format name. For analyzer these formats are supported: /trace/name and /profiler/name dwParameter currently not used. should be zero.

 

daDeactivate 

stop the active document action (stop HW sampling) after this the document status will remain busy until all data is valid.

 

daReset 

reset/clear document data.

dwParameter specifies which data should be reset using IConnectIDE::EDocumentResetParameter.

 

daStart1 

start the alternate document action.

The action depends on document type. Can be used with documents of type dtAnalyzer where the re-analysis is started on previously acquired data.

 

daAbort 

abort current blocking action (for example trace loading from file)

daDirty 

set (dwParameter = 1) or clear (dwParameter = 0) dirty flag

daMask 

mask for daXXX values

◆ EDocumentResetParameter

Deprecated:
For C++ use flags from isys::IConnectIDE::EDocumentResetParameter (i_ConnectTypes.h), for other languages the right type is automatically used. Provided for backwards compatibility.
Enumerator
drContent 

See isys::IConnectIDE::EDocumentResetParameter.

drItem 

See isys::IConnectIDE::EDocumentResetParameter.

drItemMask 

See isys::IConnectIDE::EDocumentResetParameter.

drConfigAll 

See isys::IConnectIDE::EDocumentResetParameter.

drConfigSelected 

See isys::IConnectIDE::EDocumentResetParameter.

drConfigPresetInit 

See isys::IConnectIDE::EDocumentResetParameter.

drConfigPresetApply 

See isys::IConnectIDE::EDocumentResetParameter.

drConfigMask 

See isys::IConnectIDE::EDocumentResetParameter.

◆ EDocumentStatusParameter

Interpretation of dwParameter value in a daStatus call.

Enumerator
dsReturnFlags 

return value will encode additional info using ICONNECT_S_STATUS_FLAGSMASK

dsDomainMask 

enumerated domain mask

dsDomainDefault 

return status from default domain. For Analyzer: Deprecated. Returned values in IConnectIDE::EStatusFlagsAnalyzer.

dsDomainSession 

return status from session domain. For Analyzer: Returned values in IConnectIDE::EStatusFlagsAnalyzerSession.

dsDomainDocument 

return status from document domain. Returned values in IConnectIDE::EStatusFlagsDocument.

◆ EFileFlags

File related flags.

Enumerator
ffIsOpen 

returns S_OK if the window is open, or S_FALSE if it isn't

ffClose 

close

ffCloseAll 

close all

ffCloseDiscard 

close, discard changes

ffSave 

save existing to its original name

ffSaveAs 

save existing to pszFileName

ffSaveAsPrompt 

save using SaveAs prompt

ffSaveAsOverwrite 

save existing to pszFileName, overwrite an existing file if it exists

ffSaveCopyAsOverwrite 

save existing to pszFileName, overwrite an existing file if it exists, exiting file name remains the same

ffNew 

create new with pszFileName.

If already exists, ICONNECT_E_ERROR is returned. Add also one of dtText, dtAnalyzer, dtCodeCoverage, or dtDataCoverage to specify type. If none is specified, dtText is assumed.

ffNewPrompt 

create new, prompt for name

ffOpen 

open pszFileName

ffOpenPrompt 

prompt to open

ffOpenOrNew 

if a file already exists, the behavior is identical to ffOpen otherwise to ffNew

ffActionMask 

mask for ffXXX values

ffCreateObjectOnly 

only document object should be created. No GUI. valid with ffNew, ffOpen, ffOpenOrNew

◆ EStatusFlagsAnalyzer

Additional status information for Analyzer type document, when dsReturnFlags is requested. These flags are OR-ed into the return value.

Enumerator
sfaErrorsInBuffer 

if this bit is set, some recordings are incomplete due to OCT bottleneck

sfaBufferOverrun 

if this bit is set, session was terminated automatically when buffer was full

sfaLoading 

if this bit is set, the buffer is being loaded

sfaRecordingError 

recording error has occurred

sfaWaiting 

the analyzer is waiting for trigger to occur

sfaEmpty 

the analyzer recording contains no samples

sfaOpening 

document file is being opened

◆ EStatusFlagsAnalyzerSession

Additional status information for Analyzer type document, when dsReturnFlags requests /c dsDomainSession.

Enumerator
sfasRecorderMask 

recorder status mask

sfasRecorderIdle 

recorder is idle. No samples are recorded.

sfasRecorderWaiting 

recorder is waiting for trigger. Samples are recorded into circular trace buffer.

sfasRecorderSampling 

trigger was detected. Samples are recorded into trace buffer.

sfasLoading 

data is being uploaded from the emulator HW to the PC

sfasAnalyzing 

data is being analyzed

sfasError 

if this bit is set, error in trace stream was detected Possible sources are: OCT bottleneck, stream decoder error

sfasOverrun 

if this bit is set, session was terminated automatically when buffer was full

◆ EStatusFlagsDocument

Additional status information for Analyzer type document, when dsReturnFlags requests /c dsDomainDocument.

Enumerator
sfadSerializing 

document file is being opened or saved

sfadNoData 

document the contains no data

sfadIsDirty 

document is dirty

sfadCanStart 

document action start is available

Member Function Documentation

◆ Document()

virtual HRESULT IConnectIDE::Document ( DWORD  dwDocumentFlags,
LPCSTR  pszFileName,
LPCSTR  pszParameter = NULL,
DWORD  dwParameter = 0 
)
virtual

Manages document files and windows in winIDEA.

The following rules apply to parameters:

  • flags dtText, dtAnalyzer, dtCodeCoverage, and dtDataCoverage are valid only with flag ffNew.
  • type of document opened with ffOpen is determined with file's extension.

Examples:

Open a file and position to line 23:

Document(IConnectIDE::ffOpen, "demoFile.txt");
Document(IConnectIDE::dfFocus, "demoFile.txt", NULL, 23);

Open a terminal, connect, then save:

Document(IConnectIDE::dfSpecialWindow + IConnectIDE::dwTerminal + IConnectIDE::daStart, "");
Document(IConnectIDE::dfSpecialWindow + IConnectIDE::dwTerminal + IConnectIDE::daStop, "");
Document(IConnectIDE::dfSpecialWindow + IConnectIDE::dwTerminal + IConnectIDE::ffSaveAs, "", "myFile");
Returns
  • S_FALSE - Indicates busy state when querying status (dwDocumentFlags = daStatus). For other operations it means that the operation failed.
  • ICONNECT_E_FILE_NOT_FOUND - File not found
  • ICONNECT_E_NOT_AVAILABLE - The requested operation is not available
  • ICONNECT_E_ERROR - An error occurred performing the requested operation
  • E_NOTIMPL - The requested document or window type is not supported
Parameters
dwDocumentFlagssee IConnectIDE::EDocumentFlags and IConnectIDE::EFileFlags. This parameters defines action - what has to happen with the document.
pszFileNameFile path. It is used as document ID, so it has to be defined. If this path is relative, winIDEA will consider the workspace file directory as the root.
pszParameterParameter to the requested action. Currently used with:
  • ffSaveAs - file name
  • daSelect - trigger name. Triggers must already be defined in the active workspace.
dwParameterParameter for the requested action. Currently used with:

◆ Workspace()

virtual HRESULT IConnectIDE::Workspace ( DWORD  dwFileFlags,
LPCSTR  pszWorkspaceName 
)
virtual

Controls a workspace in winIDEA.

Returns
  • S_FALSE - The specified workspace is already open
  • ICONNECT_E_ERROR - An error occurred performing the requested operation
Parameters
dwFileFlagssee IConnectIDE::EFileFlags
pszWorkspaceNameWorkspace file path. If this path is relative, winIDEA will consider the workspace file directory as the root. This parameter must be specified in case of the following flags: ffSaveAs, ffNew, and ffOpen