This class contains configuration for export of trace recording. More...
#include <CTraceController.h>
Public Types | |
| enum | ETimeScope { ETimeAll , ETimeBetweenMarkers } |
| This enum defines available time scopes format for trace export. More... | |
Public Member Functions | |
| CTraceExportConfig () | |
| Creates object with default values. | |
| int64_t | getEndTime () const |
| Returns export and time. | |
| std::string | getFileName () const |
| Returns trace export file name. | |
| CTraceFormatBaseSPtr | getFormatter () |
| Returns formatter object, which configures export file format. | |
| int64_t | getStartTime () const |
| Returns export start time. | |
| ETimeScope | getTimeScope () const |
| Returns trace export time scope. | |
| std::string | getTimeScopeAsStr () const |
| Returns string, which can be used for setting of option '/Document/<file name>/TraceExport.SampleRange'. | |
| bool | isLaunchViewer () const |
| Returns true, if viewer will be launched after export. | |
| CTraceExportConfigSPtr | setFileName (const std::string &fileName) |
| Sets the name of the exported file. | |
| CTraceExportConfigSPtr | setFormatter (CTraceFormatBaseSPtr &formatter) |
| Sets formatter object, which configures export file format. | |
| CTraceExportConfigSPtr | setLaunchViewer (bool isLaunchViewer) |
| If set to true, launches the system default viewer for the specified document type after export, for example notepad for text documents. | |
| void | setOptions (CIDEController &ide, const std::string &docFileName) |
| Writes configured options to winIDEA. | |
| CTraceExportConfigSPtr | setTimeFilter (int64_t startTime, int64_t endTime) |
| Sets time-frame for which trace should be exported Default: both times are set to 0, but are not used if setTimeScope(ETimeBetweenMarkers) is not called. | |
| CTraceExportConfigSPtr | setTimeScope (ETimeScope timeScope) |
| Sets the time scope Default: ETimeAll. | |
| std::string | toString () |
| Returns contents of this object in human readable form. | |
This class contains configuration for export of trace recording.
All setters return reference to this, so we can chain calls to set values, for example:
cfg = CTraceExportConfig().setFileName('traceResult.xml') .setTimeScope(CTraceExportConfig::ETimeAll) .setTimeFilter(0, 1000000);
This enum defines available time scopes format for trace export.
| Enumerator | |
|---|---|
| ETimeAll | export recorded samples regardless of timestamp |
| ETimeBetweenMarkers | export only samples between times specified with call to setTimeFilter() |
|
inline |
Sets the name of the exported file.
If this method is not called, or fileName is empty string, then the existing export file name in winIDEA is used.
Python example: trace_controller.py
|
inline |
Sets formatter object, which configures export file format.
If this method is not called, XML formatter with default settings is used.
|
inline |
If set to true, launches the system default viewer for the specified document type after export, for example notepad for text documents.
Default: false.
|
inline |
Writes configured options to winIDEA.
Only after this call the configured options are made active. This method is automatically called when CTraceController::exportData() is called.
| ide | ide controller |
| docFileName | document file name relative to winIDEA workspace location |
|
inline |
Sets time-frame for which trace should be exported Default: both times are set to 0, but are not used if setTimeScope(ETimeBetweenMarkers) is not called.
To export measurements before trigger, times must be negative. Trigger has timestamp 0.
| startTime | start of measurements to export relative to trigger. |
| endTime | end of measurements to export. If greater than the timestamp of the last sample, all samples from startTime to the end are exported. |