winIDEA SDK
|
This class configures contents of Binary export.
It is highly recommended to set format to header version 2 (EHeaderVer2), and to export also the presence flags. This way the file format is self descriptive and can be parsed anytime later. In all other cases we have to store the file format separately, but even then the file may not be parseable - for example, if addresses and OCD are exported, than samples with OCD may not have data for addresses, and there is no way to find this out from the information in file. Use export without presence flags only when file size is really critical, and you know that all exported data is present in each sample.
winIDEA 9.12.x note: If parsing binary data without header or with header version 1, always call setNumBusStatusBytes(4)
on this object, because it is set to 8 by default.
#include <CTraceController.h>
Public Types | |
enum | EExportFormat { EFmtText , EFmtCSV , EFmtBinary , EFmtXML } |
This enum defines constants for export formats. More... | |
enum | EHeaderVersion { EHeaderVer1 = 1 , EHeaderVer2 = 2 } |
This enum defines available versions of trace binary export file headers. More... | |
enum | EPresenceFlags { EDataItem = 0x01 , EAddressItem = 0x02 , EMemAreaItem = 0x04 , ETimeStampItem = 0x8 , EBusStatusItem = 0x10 , ESampleIndexItem = 0x20 , EOCDItem = 0x40 , EAUXItem = 0x80 , EPresenceFlagsItem = 0x0100 , ETraceSourceIdItem = 0x0200 } |
This enum defines bit flags for presence of specific data in binary export. More... | |
Public Member Functions | |
CTraceBinExportFormatSPtr | addTraceItem (EPresenceFlags presenceFlag) |
Adds the given trace item to export. | |
CTraceBinExportFormat () | |
Creates object with default values. More... | |
EExportFormat | getExportFormat () |
Returns value used for option /TraceExport.Type. | |
virtual std::string | getExportFormatAsStr () |
Returns string with export format, suitable for setting winIDEA trace export format option. | |
EHeaderVersion | getHeaderVersion () |
Returns export header version. | |
std::string | getHeaderVersionAsStr () |
Returns export header version as string. | |
int | getNumBusStatusBytes () |
Returns the number of valid bus status bytes as set by setNumBusStatusBytes() | |
int | getNumMAUs () |
Returns the number of MAUs as set by setNumMAUs() | |
int | getNumOfCpuBuses () |
Returns the number of CPU buses as set by setNumOfCpuBuses() | |
unsigned short | getPresenceFlags () |
Returns presence flags, which indicate which trace items should be exported. More... | |
bool | isHeader () |
Returns true, if header will be exported. | |
bool | isTraceItem (CTraceBinExportFormat::EPresenceFlags itemMask) |
Returns true , if trace item specified in itemMask is available. | |
CTraceBinExportFormatSPtr | removeTraceItem (EPresenceFlags presenceFlag) |
Removes the given trace item from export. | |
CTraceBinExportFormatSPtr | setHeader (bool isHeader) |
If true, header is saved to binary export. More... | |
CTraceBinExportFormatSPtr | setHeaderVersion (EHeaderVersion headerVersion) |
Sets header version. More... | |
CTraceBinExportFormatSPtr | setNumBusStatusBytes (int numBusStatusBytes) |
Sets the number of valid bus status bytes in the bus status item. More... | |
CTraceBinExportFormatSPtr | setNumMAUs (int numMAUs) |
Sets the number of valid MAUs in the data item. More... | |
CTraceBinExportFormatSPtr | setNumOfCpuBuses (int numberOfCpuBusses) |
Sets the number of CPU buses. More... | |
void | setOptions (CIDEController &ide, const std::string &docFileName) |
Writes options to winIDEA. More... | |
CTraceBinExportFormatSPtr | setTraceItemFlags (unsigned short presenceFlags) |
Sets flags, where each bit defines, which trace items should be exported. More... | |
|
inherited |
This enum defines bit flags for presence of specific data in binary export.
|
inline |
Creates object with default values.
Most important, header version 2 and presence flags are saved to file. Change these two settings only if the export file size really matters.
|
inline |
Returns presence flags, which indicate which trace items should be exported.
|
inline |
If true, header is saved to binary export.
Default: true.
|
inline |
Sets header version.
Default: EHeaderVer2.
|
inline |
Sets the number of valid bus status bytes in the bus status item.
Default: 4.
|
inline |
Sets the number of valid MAUs in the data item.
Default: 4. Should be set to 4 for winIDEA 9.12.x, and 8 for winIDEA 9.17 and newer, if trace header version 2 is not available.
|
inline |
Sets the number of CPU buses.
This value is not used during export - all buses are always exported, but only during parsing. Default: 1.
|
inlinevirtual |
Writes options to winIDEA.
This method is automatically called by CTraceController::exportData(). This method sets only configuration for binary format, but does not set trace export format to binary (modifies only options '/Document/<fname>/TraceExport.Bin.*').
ide | ide controller |
docFileName | document file name relative to winIDEA workspace location |
Implements isys::CTraceFormatBase.
|
inline |
Sets flags, where each bit defines, which trace items should be exported.