winIDEA SDK
isys::CCoverageController2 Class Reference

Description

This class implements coverage functionality with a document oriented interface.

It replaces the old CCoverageController, which is deprecated now. If you need some functionality from the old class, which is missing in this one, please contact iSYSTEM support, rather than using the old class. If you use the old class, your code will no longer work once the deprecated class will be removed in the future versions of isystem.connect.

Portability list

CCoverageController()  -->  CCoverageController2() 
                            File name and open mode are required.

isCoverageAvailable ()        -->  not implemented in CCoverageController2
isBranchCoverageAvailable ()  -->  not implemented in CCoverageController2
isHWCoverageAvailable ()      -->  not implemented in CCoverageController2
isOfflineCoverageAvailable () -->  not implemented in CCoverageController2

setConfiguration()   --> use createTrigger(), setProvideAssemblerInfo()

all range methods --> use area handling methods (addArea(), removeArea(), ...)

getCoverageBitmap()      --> no longer available, use class CCoverageData2
getCoverageStatistics()  --> use class CCoverageData2
getStatisticsForSymbol() --> use class CCoverageData2

This class can be used to configure coverage, run recording, and export the recorded data. However, it has no methods to get recorded information. For this purpose a separate class called CCoverageData2 should be used.

Use only methods documented for this class. If a method from the base class is not documented here, do not use it.

Python example with recording and simple data reading: test_area.py

#include <CCoverageController2.h>

Inheritance diagram for isys::CCoverageController2:
isys::CAnalyzerDocController isys::CDocumentController isys::WrapperBase

Public Types

enum  ECoverageAreaType {
  EAreaFolder , EAreaModule ,
  EAreaFunction , EAreaRange ,
  EAreaImage
}
 Defines types of ares, which can be included in coverage measurement. More...
 
enum  ECoverageScope {
  EScopeAllDownloadedCode , EScopeEntireMemory ,
  EScopeCustom
}
 Defines types of scopes for coverage measurement. More...
 
enum  EDocumentType {
  ANALYZER , CODE_COVERAGE ,
  PROFILER
}
 new enum type introduced, to limit the allowed values More...
 
enum  EAnalysisType {
  ETraceOnly , ECoverage ,
  EProfiler , EBoth
}
 Which type of analysis should be performed on recording. More...
 

Public Member Functions

 CCoverageController2 (std::shared_ptr< ConnectionMgr > connectionMgr, const std::string &fileName, const std::string &mode)
 Instantiates object and opens or creates coverage document in winIDEA. More...
 
int createTrigger (const std::string &triggerName)
 Creates a new coverage trigger. More...
 
void setScope (int triggerIndex, ECoverageScope scope)
 Sets scope to be included in coverage measurement. More...
 
ECoverageScope getScope (int triggerIdx)
 Returns scope to be included in coverage measurement. More...
 
void setProvideAssemblerInfo (int triggerIdx, bool isProvideAssemblerInfo)
 Sets option to include assembler instructions in measured coverage. More...
 
bool isProvideAssemblerInfo (int triggerIdx)
 Returns true if assembler info should be provided with coverage. More...
 
void setIgnoreUnreachableCode (bool isIgnoreUnreachableCode)
 If set to true, then the code inside the function which is not reachable by sequential or (conditional)direct branch flow is not considered for coverage statistics. More...
 
bool isIgnoreUnreachableCode ()
 
int addArea (int triggerIndex, ECoverageAreaType areaType, const std::string &areaName)
 Adds area (module, function, ...) to be included in coverage measurement. More...
 
int removeArea (int triggerIndex, ECoverageAreaType areaType, const std::string &areaName)
 Removes area, which has been previously added with addArea(), from coverage measurement. More...
 
void removeAllAreas (int triggerIndex)
 Removes all areas of the given type from coverage measurement. More...
 
void getAreas (int triggerIndex, ECoverageAreaType areaType, iconnect::StrVector &areas)
 Returns list of currently configured areas. More...
 
void exportData (isys::CCoverageExportConfigSPtr exportConfig)
 Exports coverage data according to the given configuration. More...
 
void merge (const iconnect::StrVector &files)
 This method merges coverage information from the given list of analyzer files to this document. More...
 
std::string areaType2Str (ECoverageAreaType areaType)
 Returns string, which can be used to set option /Document/<fileName>/Trigger.Items[<idx1>].Coverage.Include[<idx2>].Type. More...
 
std::string scope2Str (ECoverageScope scope)
 Returns string, which can be used to set option /Document/<fileName>/Trigger.Items[<idx1>].Coverage.Scope. More...
 
ECoverageScope scope2Enum (const std::string &scope)
 Returns enum value for the given scope string. More...
 
bool isActive ()
 Returns true if the document start action is still running, false otherwise. More...
 
bool isBusy ()
 Returns true if the document is still changing, either because recording or loading/analysis is still running. More...
 
void setDirty (bool isDirty)
 Sets dirty status of the document. More...
 
void abort ()
 Aborts loading of document contents from a file. More...
 
void stopSampling ()
 Stops sampling (recording) operation. More...
 
void stopUploading ()
 Stops transfer of data to PC. More...
 
void stopAnalyzing ()
 Stops analysis of analyzer data. More...
 
void stopLoadingOrSaving ()
 Stops load or save operation.
 
CAnalyzerSessionStatus getAnalyzerSessionStatus ()
 Returns analyzer session status. More...
 
CDocumentStatus getDocumentStatus ()
 Returns analyzer document status.
 
int getActiveTriggerIndex ()
 Returns index of the currently active trigger. More...
 
void setAnalysisType (int triggerIndex, EAnalysisType analysisType)
 This method sets analysis type on the given trigger. More...
 
int removeTrigger (const std::string &triggerName)
 Removes profiler or trace trigger. More...
 
int getTriggerIndex (const std::string &triggerName, bool isThrowException=true)
 Returns the index of the trigger with the given name. More...
 
void select (const std::string &triggerName)
 Selects trigger from 'Analyzer Configuration' toolbar drop down list in winIDEA (the one with a hammer and text) More...
 
void select (int index)
 Selects trigger from 'Analyzer Configuration' toolbar drop down list in winIDEA (the one with a hammer and text) More...
 
bool waitUntilLoaded (int timeoutMs=0, DWORD pollingIntervalMs=100, bool isThrow=false)
 This method polls analyzer status with the given polling interval and returns when analyzer stops loading samples from the hardware, or timeout expires. More...
 
int getNumberOfTriggers ()
 Returns the number of triggers defined in the opened document. More...
 
std::string getDocumentOptionURL (const std::string &postfix)
 This utility method returns URL of analyzer document option. More...
 
std::string getTriggerOption (int index, const std::string &triggerOption)
 Returns value of trigger option, for example trigger name, buffer size, trigger position, ... More...
 
void setTriggerOption (int index, const std::string &triggerOption, const std::string &newValue)
 Sets value of the trigger option, for example trigger name, buffer size, trigger position, ... More...
 
void setTriggerOption (int index, const std::string &triggerOption, DWORD newValue)
 Sets value of the trigger option, for example trigger name, buffer size, trigger position, ... More...
 
void setMarker ()
 Not available for analyzer documents - does nothing.
 
CIDEControllerSPtr getIConnectIDE ()
 Returns the isystem.connect IDE interface. More...
 
void start ()
 Starts default document action. More...
 
void start1 ()
 Starts alternate document action. More...
 
void stop ()
 Stops document action. More...
 
void resume ()
 Starts recording but keeps existing coverage data. More...
 
void close ()
 Closes the document. More...
 
void closeDiscard ()
 Closes the document and discards any unsaved changes. More...
 
void closeAll ()
 Closes all documents. More...
 
void reset (IConnectIDE::EDocumentResetParameter resetScope)
 Resets contents of the document. More...
 
void save ()
 Saves the document. More...
 
void saveAs (const std::string &fileName, bool isForceOverwrite=false)
 Saves the document with a new name. More...
 
void saveCopy (const std::string &newFileName)
 Saves copy of the document under a given file name. More...
 
void saveAsPrompt ()
 Saves the document, winIDEA prompts the user for a new name. More...
 

Static Public Attributes

static const std::string exportCCAsHTML
 Export coverage document as HTML file. More...
 
static const std::string exportCCAsText
 Export coverage document as text file. More...
 
static const std::string exportCCAsCSV
 Export coverage document as CSV file. More...
 
static const std::string exportCCAsXML
 Export coverage document as XML file. More...
 
static const std::string exportCCAsXML2
 Export coverage document as XML file. More...
 
static const std::string exportCCAsGCOV
 Export coverage document as GNU coverage file. More...
 
static const std::string exportCCAsReviewHTML
 Export coverage document as HTML file in format suitable for code review. More...
 
static const std::string exportCCAsReviewText
 Export coverage document as text file in format suitable for code review. More...
 
static const std::string exportTrcAsText
 Export trace document as text file. More...
 
static const std::string exportTrcAsCSV
 Export trace document as CSV file. More...
 
static const std::string exportTrcAsBinary
 Export trace document as binary file. More...
 
static const std::string exportTrcAsXML
 Export trace document as XML file. More...
 
static const std::string exportProfilerAsXML
 Export profiler document as XML file. More...
 
static const std::string exportProfilerAsText1
 Export profiler document as customized text file. More...
 
static const std::string exportProfilerAsBTF
 Export profiler document as BTF file. More...
 
static const std::string exportProfilerAsMDF
 Export profiler document as MDF file. More...
 
static const std::string exportProfilerAsHTML
 Export profiler document as HTML file. More...
 

Member Enumeration Documentation

◆ EAnalysisType

Which type of analysis should be performed on recording.

Enumerator
ETraceOnly 

trace is recorded, but no profiler or coverage analysis is performed

ECoverage 

coverage only

EProfiler 

profiler only

EBoth 

profiler and coverage

◆ ECoverageAreaType

Defines types of ares, which can be included in coverage measurement.

Enumerator
EAreaFolder 

folder with sources

EAreaModule 

source file

EAreaFunction 

function

EAreaRange 

address range

EAreaImage 

download file

◆ ECoverageScope

Defines types of scopes for coverage measurement.

Enumerator
EScopeAllDownloadedCode 

All downloaded code is measured, adding or removing areas with methods in this class has no effect.

EScopeEntireMemory 

All memory is measured, adding or removing areas with methods in this class has no effect.

EScopeCustom 

only coverage of areas added with addArea() method in this class is measured

◆ EDocumentType

new enum type introduced, to limit the allowed values

Enumerator
ANALYZER 

trace document

CODE_COVERAGE 

code coverage document.

For internal use only, instantiate class CCoverageController instead.

PROFILER 

profiler document.

For internal use only, instantiate class CProfilerController2 instead.

Constructor & Destructor Documentation

◆ CCoverageController2()

isys::CCoverageController2::CCoverageController2 ( std::shared_ptr< ConnectionMgr connectionMgr,
const std::string &  fileName,
const std::string &  mode 
)

Instantiates object and opens or creates coverage document in winIDEA.

Parameters
connectionMgrclass which maintains connection to winIDEA. Connection must be established before this call.
modedocument open mode. 'u' opens existing file for update (file must exist), 'w' opens existing file and deletes recordings, or creates a new file, 'a' opens existing file and keeps contents, or creates a new file if it does not exist.
fileNameif not an empty string, it is used, otherwise the user is prompted for fileName by winIDEA. In the later case this object can not be used, because the file name is known only in winIDEA.

Python example: test_configure.py

Member Function Documentation

◆ abort()

void isys::CAnalyzerDocController::abort ( )
inherited

Aborts loading of document contents from a file.

Use this method only when opening a really large documents and contents is not needed, otherwise call waitUntilLoaded() and wait until document contents is loaded. Has no effect when analyzer is running.

◆ addArea()

int isys::CCoverageController2::addArea ( int  triggerIndex,
ECoverageAreaType  areaType,
const std::string &  areaName 
)

Adds area (module, function, ...) to be included in coverage measurement.

This method has effect only if method setScope() was called with EScopeCustom as scope value.

Parameters
triggerIndexindex of analyzer trigger as returned by createTrigger(), getActiveTriggerIndex() or getTriggerIndex()
areaTypetype of area
areaNamename of image file, module, function, ... Modules must be specified with relative path if they are not in winIDEA workspace folder.
Returns
index of the added area.
See also
getAreas

Python example: test_area.py

◆ areaType2Str()

std::string isys::CCoverageController2::areaType2Str ( ECoverageAreaType  areaType)

Returns string, which can be used to set option /Document/<fileName>/Trigger.Items[<idx1>].Coverage.Include[<idx2>].Type.

Parameters
areaTypetype of area

Python example: test_area.py

◆ close()

void isys::CDocumentController::close ( )
inherited

Closes the document.

If the document is changed but not saved, winIDEA prompts user if he would like to save the file.

Exceptions
IOExceptionin case of an error.

Python example: test_doc_close.py

◆ closeAll()

void isys::CDocumentController::closeAll ( )
inherited

Closes all documents.

If there are no documents opened via isystem.connect, CIDEController::closeAllDocuments() can also be used.

Exceptions
IOExceptionin case of an error.

Python example: test_doc_close.py

◆ closeDiscard()

void isys::CDocumentController::closeDiscard ( )
inherited

Closes the document and discards any unsaved changes.

Exceptions
IOExceptionin case of an error.

Python example: test_doc_close.py

◆ createTrigger()

int isys::CCoverageController2::createTrigger ( const std::string &  triggerName)

Creates a new coverage trigger.

Trigger contains information about what coverage should record (which functions, modules, ...) and how to record it (when to start, buffer size, ...).

Parameters
triggerNamename of the trigger
Returns
index of the created trigger
Exceptions
IllegalArgumentExceptionif the trigger already exists

Python example: test_trigger.py

◆ exportData()

void isys::CCoverageController2::exportData ( isys::CCoverageExportConfigSPtr  exportConfig)

Exports coverage data according to the given configuration.

Example:

coverage = CCoverageController2(connectionMgr, "coverage.trd", "w")

...

cfg = CCoverageExportConfig().setFileName('coverageResult.xml') \
                             .setExportSources(True) \
                             .setExportFunctionLines(True)
coverage.exportData(cfg)
Parameters
exportConfigobject with parameters for export - defines which items to export and their format
See also
CCoverageExportConfig

Python example: test_area.py

◆ getActiveTriggerIndex()

int isys::CAnalyzerDocController::getActiveTriggerIndex ( )
inherited

Returns index of the currently active trigger.

If you want to get the active trigger name, call method:

triggerName = getTriggerOption(index, "Name").
See also
getTriggerOption

◆ getAnalyzerSessionStatus()

CAnalyzerSessionStatus isys::CAnalyzerDocController::getAnalyzerSessionStatus ( )
inherited

Returns analyzer session status.

Use this method to check for analyzer status and recording errors.

◆ getAreas()

void isys::CCoverageController2::getAreas ( int  triggerIndex,
ECoverageAreaType  areaType,
iconnect::StrVector areas 
)

Returns list of currently configured areas.

See also
addArea
removeArea

Python example: test_area.py

◆ getDocumentOptionURL()

std::string isys::CAnalyzerDocController::getDocumentOptionURL ( const std::string &  postfix)
inherited

This utility method returns URL of analyzer document option.

The returned URL is composed as '/Document/' + fileName + '/' + postfix. Use this method when you have to set some option, which is not accessible with methods of this class or derived classes.

Python example: test_set_profiling_sections.py

◆ getIConnectIDE()

CIDEControllerSPtr isys::CDocumentController::getIConnectIDE ( )
inherited

Returns the isystem.connect IDE interface.

Use this method only when some functionality of the IConnectIDE interface regarding workspace handling is not accessible from this wrapper.

◆ getNumberOfTriggers()

int isys::CAnalyzerDocController::getNumberOfTriggers ( )
inherited

Returns the number of triggers defined in the opened document.

Python example: profiler_controller.py

◆ getScope()

ECoverageScope isys::CCoverageController2::getScope ( int  triggerIdx)

Returns scope to be included in coverage measurement.

Parameters
triggerIdxindex of analyzer trigger as returned by createTrigger(), getActiveTriggerIndex() or getTriggerIndex()
See also
setScope

Python example: test_scope.py

◆ getTriggerIndex()

int isys::CAnalyzerDocController::getTriggerIndex ( const std::string &  triggerName,
bool  isThrowException = true 
)
inherited

Returns the index of the trigger with the given name.

Parameters
triggerNamename of analyzer trigger as specified in 'Analyzer Configuration' toolbar drop down list in winIDEA analyzer window (the one with a hammer and text). It is also accessible as winIDEA option with URL /Document/<fileName>/Trigger.Items[<index>].Name. where <index> is the value returned by this method.
isThrowExceptionif trigger with the given name is not found, and:
  • this parameter is set to true, then an IllegalArgumentException is thrown.
  • this parameter is set to false, then -1 is returned.

Python example: profiler_controller.py

◆ getTriggerOption()

std::string isys::CAnalyzerDocController::getTriggerOption ( int  index,
const std::string &  triggerOption 
)
inherited

Returns value of trigger option, for example trigger name, buffer size, trigger position, ...

Parameters
triggerOptionpart of the URL, which is following the Items[] part. For example, name of the trigger at index 0 for analyzer file Sample5554_profiler.trd is specified with winIDEA option URL /Document/Sample5554_profiler.trd/Trigger.Items[0].Name. To get it by this method, we define index as 0 and triggerOption as 'Name'.
Another example - to get sampling starting point, we call this method as: getTriggerOption(0, "HW.Recorder.Start");
indextrigger index, see methods getTriggerIndex() and getNumberOfTriggers()

Python example: profiler_controller.py

◆ isActive()

bool isys::CAnalyzerDocController::isActive ( )
inherited

Returns true if the document start action is still running, false otherwise.

When recording stops, this method returns false, even if loading and analysis of data is still in progress.

See also
isBusy
Exceptions
IOExceptionin case of an error.

Python example: test_coverage_get_status.py

◆ isBusy()

bool isys::CAnalyzerDocController::isBusy ( )
inherited

Returns true if the document is still changing, either because recording or loading/analysis is still running.

Returns false otherwise.

See also
isActive
Exceptions
IOExceptionin case of an error.

◆ isIgnoreUnreachableCode()

bool isys::CCoverageController2::isIgnoreUnreachableCode ( )

◆ isProvideAssemblerInfo()

bool isys::CCoverageController2::isProvideAssemblerInfo ( int  triggerIdx)

Returns true if assembler info should be provided with coverage.

Parameters
triggerIdxindex of analyzer trigger as returned by createTrigger(), getActiveTriggerIndex() or getTriggerIndex()

Python example: test_configure.py

◆ merge()

void isys::CCoverageController2::merge ( const iconnect::StrVector files)

This method merges coverage information from the given list of analyzer files to this document.

Note: If this document is configured to show only certain areas (functions), then only those areas will be visible after merging. It is recommended to create a new document before merging, because it has all areas visible by default.

Limitations: You can only merge results, if all analyzer documents were obtained with the same target code.

Exceptions
IOExceptionif one of source files is not found or in case of merging error.

Python example: test_merge.py

◆ removeAllAreas()

void isys::CCoverageController2::removeAllAreas ( int  triggerIndex)

Removes all areas of the given type from coverage measurement.

See also
addArea

Python example: test_area.py

◆ removeArea()

int isys::CCoverageController2::removeArea ( int  triggerIndex,
ECoverageAreaType  areaType,
const std::string &  areaName 
)

Removes area, which has been previously added with addArea(), from coverage measurement.

Parameters
triggerIndexindex of analyzer trigger as returned by createTrigger(), getActiveTriggerIndex() or getTriggerIndex()
areaTypetype of area
areaNamename of image file, module, function, ... Modules must be specified with relative path if they are not in winIDEA workspace folder.
Returns
-1 if area with the give name was not found (not removed), 0 if area with the given name exists, but is not of the specified type (not removed), 1 if area was found and removed
See also
addArea

Python example: test_area.py

◆ removeTrigger()

int isys::CAnalyzerDocController::removeTrigger ( const std::string &  triggerName)
inherited

Removes profiler or trace trigger.

Parameters
triggerNamename of the trigger to remove
Returns
-1 if trigger with the given name did not exist, otherwise non-negative value is returned

Python example: profiler_controller.py

◆ reset()

void isys::CDocumentController::reset ( IConnectIDE::EDocumentResetParameter  resetScope)
inherited

Resets contents of the document.

Parameters
resetScopedefines which part of the document to reset.

Python example: test_reset.py

◆ resume()

void isys::CDocumentController::resume ( )
inherited

Starts recording but keeps existing coverage data.

Works on coverage analyzer documents only.

Exceptions
IOExceptionin case of an error.

Python example: test_doc_control.py

◆ save()

void isys::CDocumentController::save ( )
inherited

Saves the document.

Exceptions
IOExceptionin case of an error.

Python example: test_save.py

◆ saveAs()

void isys::CDocumentController::saveAs ( const std::string &  fileName,
bool  isForceOverwrite = false 
)
inherited

Saves the document with a new name.

Exceptions
IOExceptionin case of an error.

Python example: test_save.py

◆ saveAsPrompt()

void isys::CDocumentController::saveAsPrompt ( )
inherited

Saves the document, winIDEA prompts the user for a new name.

Exceptions
IOExceptionin case of an error.

Python example: test_save.py

◆ saveCopy()

void isys::CDocumentController::saveCopy ( const std::string &  newFileName)
inherited

Saves copy of the document under a given file name.

The name of the opened document does not change. If the destination file already exists, it is overwritten. Use this method to save intermediate results, for example coverage between several runs.

Exceptions
IOExceptionin case of an error.

Python example: test_save.py

◆ scope2Enum()

ECoverageScope isys::CCoverageController2::scope2Enum ( const std::string &  scope)

Returns enum value for the given scope string.

Parameters
scopeone of strings specified for option /Document/<fileName>/Trigger.Items[<idx1>].Coverage.Scope See winIDEA, Help | Display Option, select Document and analyzer document with coverage trigger defined.

Python example: test_scope.py

◆ scope2Str()

std::string isys::CCoverageController2::scope2Str ( ECoverageScope  scope)

Returns string, which can be used to set option /Document/<fileName>/Trigger.Items[<idx1>].Coverage.Scope.

Parameters
scopecoverage scope

Python example: test_scope.py

◆ select() [1/2]

void isys::CAnalyzerDocController::select ( const std::string &  triggerName)
inherited

Selects trigger from 'Analyzer Configuration' toolbar drop down list in winIDEA (the one with a hammer and text)

Parameters
triggerNamename of the trigger in the list

Python example: profiler_controller.py

◆ select() [2/2]

void isys::CAnalyzerDocController::select ( int  index)
inherited

Selects trigger from 'Analyzer Configuration' toolbar drop down list in winIDEA (the one with a hammer and text)

Parameters
indexindex of the trigger in the list
See also
getTriggerIndex

Python example: profiler_controller.py

◆ setAnalysisType()

void isys::CAnalyzerDocController::setAnalysisType ( int  triggerIndex,
EAnalysisType  analysisType 
)
inherited

This method sets analysis type on the given trigger.

If trigger is created with CProfilerController2, it is set to profiler only analysis by default. Similar is true for coverage. To perform both types of analysis on the same recording, call this method with analysisType set to EBoth.

◆ setDirty()

void isys::CAnalyzerDocController::setDirty ( bool  isDirty)
inherited

Sets dirty status of the document.

Normally this method is used when dirty flag is not set after configuring the document via API, but we want to save the document.

◆ setIgnoreUnreachableCode()

void isys::CCoverageController2::setIgnoreUnreachableCode ( bool  isIgnoreUnreachableCode)

If set to true, then the code inside the function which is not reachable by sequential or (conditional)direct branch flow is not considered for coverage statistics.

Set it to true, when compiler generates data between instructions (for example branch addresses) and you want to get 100% coverage.

Python example: test_configure.py

◆ setProvideAssemblerInfo()

void isys::CCoverageController2::setProvideAssemblerInfo ( int  triggerIdx,
bool  isProvideAssemblerInfo 
)

Sets option to include assembler instructions in measured coverage.

Parameters
triggerIdxindex of analyzer trigger as returned by createTrigger(), getActiveTriggerIndex() or getTriggerIndex()
isProvideAssemblerInfoif set to true, assembler information is provided with coverage.

Python example: test_configure.py

◆ setScope()

void isys::CCoverageController2::setScope ( int  triggerIndex,
ECoverageScope  scope 
)

Sets scope to be included in coverage measurement.

If EScopeCustom is set, use method addArea() to define areas to be included in coverage measurements.

Parameters
triggerIndexindex of analyzer trigger as returned by createTrigger(), getActiveTriggerIndex() or getTriggerIndex()
scopedefines which part of memory to include in coverage measurements

Python example: test_area.py

◆ setTriggerOption() [1/2]

void isys::CAnalyzerDocController::setTriggerOption ( int  index,
const std::string &  triggerOption,
const std::string &  newValue 
)
inherited

Sets value of the trigger option, for example trigger name, buffer size, trigger position, ...

Parameters
indextrigger index, see methods getTriggerIndex() and getNumberOfTriggers()
triggerOptionpart of the URL, which is following the Items[] part. For example, the name of the trigger at index 0 for analyzer file Sample5554_profiler.trd is specified with winIDEA option URL:

/Document/Sample5554_profiler.trd/Trigger.Items[0].Name

To set the trigger name we call this method as:

setTriggerOption(0, "Name", "myTrig");

Another example - to set sampling starting point, we call this method as:

setTriggerOption(0, "HW.Recorder.Start", "Immediately");
newValuenew value of the config. property, see the Options dialog in winIDEA for the list of options and possible values of each option.

Python example: profiler_controller.py

◆ setTriggerOption() [2/2]

void isys::CAnalyzerDocController::setTriggerOption ( int  index,
const std::string &  triggerOption,
DWORD  newValue 
)
inherited

Sets value of the trigger option, for example trigger name, buffer size, trigger position, ...

Parameters
triggerOptionpart of the URL, which is following the Items[] part. For example, the name of the trigger at index 0 for analyzer file Sample5554_profiler.trd is specified with winIDEA option URL:

/Document/Sample5554_profiler.trd/Trigger.Items[0].Name.

To set the trigger name we call this method as:

setTriggerOption(0, "Name", "myTrig");

Another example - to set sampling starting point, we call this method as:

setTriggerOption(0, "HW.Recorder.Start", "Immediately");
indextrigger index, see methods getTriggerIndex() and getNumberOfTriggers()
newValuenew value of the config. property, see the Options dialog in winIDEA for the list of options and possible values of each option.

◆ start()

void isys::CDocumentController::start ( )
inherited

Starts default document action.

Starts recording if the document type is coverage, profiler or trace, or executes the script if it is a script document. Existing contents of analyzer document is always deleted when this method is called. It is possible to preserve existing coverage information by calling method resume(), instead of this method.

Note: If analyzer is started, then option 'Reactivate session after CPU stop' has no effect. Analyzer will not be automatically started.

Exceptions
IOExceptionin case of an error.

Python example: test_doc_control.py

◆ start1()

void isys::CDocumentController::start1 ( )
inherited

Starts alternate document action.

Repeats analysis on a previously recorded data if the document type is analyzer. Usage example: if document is recorded as trace (trace trigger is used), but we want to perform profiler analysis later (with profiler trigger).

Exceptions
IOExceptionin case of an error.

Python example: test_doc_control.py

◆ stop()

void isys::CDocumentController::stop ( )
inherited

Stops document action.

For analyzer documents this action is deprecated. Use one of stop...() methods of CAnalyzerController instead.

This method triggers the following state transitions on analyzer document:

  • waiting for trigger: forces trigger, sampling starts
  • sampling: stops sampling, enters loading state and waits until loading is finished
  • loading (data from debugger to PC): waits until loading finishes, does NOT stop it!
  • analyzing: stops analysis. If coverage and profiler analysis are running, call this method twice to stop both.
  • idle: does nothing

For script document this method terminates the script.

Exceptions
IOExceptionin case of an error.

Python example: test_doc_control.py

◆ stopAnalyzing()

void isys::CAnalyzerDocController::stopAnalyzing ( )
inherited

Stops analysis of analyzer data.

To unconditionally stop analyzer immediately, call stopUploading() before this call.

◆ stopSampling()

void isys::CAnalyzerDocController::stopSampling ( )
inherited

Stops sampling (recording) operation.

After this action loading of data starts. Does nothing if sampling has already finished.

Exceptions
IOExceptionin case of an error.

Python example: test_coverage_all_code.py

◆ stopUploading()

void isys::CAnalyzerDocController::stopUploading ( )
inherited

Stops transfer of data to PC.

Continues with analysis of data already transferred to PC. To completely stop analyzer, call stopAnalyzing() after this call.

◆ waitUntilLoaded()

bool isys::CAnalyzerDocController::waitUntilLoaded ( int  timeoutMs = 0,
DWORD  pollingIntervalMs = 100,
bool  isThrow = false 
)
inherited

This method polls analyzer status with the given polling interval and returns when analyzer stops loading samples from the hardware, or timeout expires.

Parameters
timeoutMstimeout in milliseconds. 0 means infinite timeout
pollingIntervalMstime in milliseconds between two readings of the analyzer status
isThrowif true and timeout occurs, an exception is thrown
Returns
true if CPU is in stopped state, false if timeout expired and isThrow == false

Python example: profiler_controller.py

Member Data Documentation

◆ exportCCAsCSV

const std::string isys::CAnalyzerDocController::exportCCAsCSV
staticinherited

Export coverage document as CSV file.

Can be used to set document option Export.Type, but it is recommended to use classes derived from CCoverageFormatBase instead.

◆ exportCCAsGCOV

const std::string isys::CAnalyzerDocController::exportCCAsGCOV
staticinherited

Export coverage document as GNU coverage file.

Can be used to set document option Export.Type, but it is recommended to use classes derived from CCoverageFormatBase instead.

◆ exportCCAsHTML

const std::string isys::CAnalyzerDocController::exportCCAsHTML
staticinherited

Export coverage document as HTML file.

Can be used to set document option Export.Type, but it is recommended to use classes derived from CCoverageFormatBase instead.

◆ exportCCAsReviewHTML

const std::string isys::CAnalyzerDocController::exportCCAsReviewHTML
staticinherited

Export coverage document as HTML file in format suitable for code review.

Can be used to set document option Export.Type, but it is recommended to use classes derived from CCoverageFormatBase instead.

◆ exportCCAsReviewText

const std::string isys::CAnalyzerDocController::exportCCAsReviewText
staticinherited

Export coverage document as text file in format suitable for code review.

Can be used to set document option Export.Type, but it is recommended to use classes derived from CCoverageFormatBase instead.

◆ exportCCAsText

const std::string isys::CAnalyzerDocController::exportCCAsText
staticinherited

Export coverage document as text file.

Can be used to set document option Export.Type, but it is recommended to use classes derived from CCoverageFormatBase instead.

◆ exportCCAsXML

const std::string isys::CAnalyzerDocController::exportCCAsXML
staticinherited

Export coverage document as XML file.

Can be used to set document option Export.Type, but it is recommended to use classes derived from CCoverageFormatBase instead.

◆ exportCCAsXML2

const std::string isys::CAnalyzerDocController::exportCCAsXML2
staticinherited

Export coverage document as XML file.

Can be used to set document option Export.Type, but it is recommended to use classes derived from CCoverageFormatBase instead.

◆ exportProfilerAsBTF

const std::string isys::CAnalyzerDocController::exportProfilerAsBTF
staticinherited

Export profiler document as BTF file.

Can be used to set document option Export.Type, but it is recommended to use classes derived from CProfilerFormatBase instead.

◆ exportProfilerAsHTML

const std::string isys::CAnalyzerDocController::exportProfilerAsHTML
staticinherited

Export profiler document as HTML file.

Can be used to set document option Export.Type, but it is recommended to use classes derived from CProfilerFormatBase instead.

◆ exportProfilerAsMDF

const std::string isys::CAnalyzerDocController::exportProfilerAsMDF
staticinherited

Export profiler document as MDF file.

Can be used to set document option Export.Type, but it is recommended to use classes derived from CProfilerFormatBase instead.

◆ exportProfilerAsText1

const std::string isys::CAnalyzerDocController::exportProfilerAsText1
staticinherited

Export profiler document as customized text file.

Can be used to set document option Export.Type, but it is recommended to use classes derived from CProfilerFormatBase instead.

◆ exportProfilerAsXML

const std::string isys::CAnalyzerDocController::exportProfilerAsXML
staticinherited

Export profiler document as XML file.


Can be used to set document option Export.Type, but it is recommended to use classes derived from CProfilerFormatBase instead.

◆ exportTrcAsBinary

const std::string isys::CAnalyzerDocController::exportTrcAsBinary
staticinherited

Export trace document as binary file.

Can be used to set document option Export.Type, but it is recommended to use classes derived from CTraceFormatBase instead.

◆ exportTrcAsCSV

const std::string isys::CAnalyzerDocController::exportTrcAsCSV
staticinherited

Export trace document as CSV file.

Can be used to set document option Export.Type, but it is recommended to use classes derived from CTraceFormatBase instead.

◆ exportTrcAsText

const std::string isys::CAnalyzerDocController::exportTrcAsText
staticinherited

Export trace document as text file.

Can be used to set document option Export.Type, but it is recommended to use classes derived from CTraceFormatBase instead.

◆ exportTrcAsXML

const std::string isys::CAnalyzerDocController::exportTrcAsXML
staticinherited

Export trace document as XML file.

Can be used to set document option Export.Type, but it is recommended to use classes derived from CTraceFormatBase instead.