cwbSV_SetTraceProduct

Purpose

This function allows setting of a unique product identifier in the trace handle that is provided. Along with setting the component ID (see cwbSV_SetTraceComponent), this call should be used to distinguish your trace entries from other product's entries in the trace file.

Syntax

 
unsigned int CWB_ENTRY cwbSV_SetTraceProduct(
                             cwbSV_TraceDataHandle  traceDataHandle,
                             char                  *productID);

Parameters

cwbSV_TraceDataHandle traceDataHandle - input
Handle that was returned by a previous call to cwbSV_CreateTraceDataHandle().
char * productID - input
Points to a null-terminated string that contains a product identifier to be used on this trace entry. NOTE: A maximum of CWBSV_MAX_PRODUCT_ID characters will be logged for the product ID. Larger strings will be truncated.

Return Codes

The following list shows common return values.

CWB_OK
Successful completion.
CWB_INVALID_HANDLE
Handle is not valid.

Usage

This value should be set before calling the corresponding log function, cwbSV_LogTraceData. The suggested hierarchy is that you would define a product ID with one or many components that are defined under it.