cwbSV_SetSPIProduct

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_SetSPIComponent), 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_SetSPIProduct(
                             cwbSV_TraceSPIHandle  traceSPIHandle,
                             char                 *productID);

Parameters

cwbSV_TraceSPIHandle traceSPIHandle - input
Handle that was returned by a previous call to cwbSV_CreateTraceSPIHandle().
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 functions, "cwbSV_LogAPIEntry()" and "cwbSV_LogAPIExit(). The suggested hierarchy is that you would define a product ID with one or many components that are defined under it.