Purpose
This function creates a trace SPI object and returns a handle to it. This
trace SPI handle can be used in your program to log entry to and exit from
your SPI entry points.
Syntax
unsigned int CWB_ENTRY cwbSV_CreateTraceSPIHandle(
char *productID,
char *componentID,
cwbSV_TraceSPIHandle *traceSPIHandle);
Parameters
- char * productID - input
- Points to a null-terminated string that contains a product identifier
to be used on this message entry. Parameter is optional, if null, no productID
is set. NOTE: A maximum of CWBSV_MAX_PRODUCT_ID characters will be logged
for the product ID. Larger strings will be truncated.
- char * componentID - input
- Points to a null-terminated string that contains a component identifier
to be used on this message entry. Parameter is optional, if null, no componentID
is set. NOTE: A maximum of CWBSV_MAX_COMP_ID characters will be logged for
the component ID. Larger strings will be truncated.
- cwbSV_TraceSPIHandle * traceSPIHandle - input/output
- Pointer to a cwbSV_TraceSPIHandle where the handle will be returned.
This handle should be used in subsequent calls to the trace SPI functions.
Return Codes
The following list shows common return values.
- CWB_OK
- Successful completion.
- CWB_INVALID_POINTER
- NULL passed on output parameter.
- CWB_NOT_ENOUGH_MEMORY
- Insufficient memory to create handle.
Usage
It is recommended that you set a unique product ID and component ID in
the trace data handle before using it to log trace entries. These ID's will
distinguish your trace entries from other entries in the trace file.