cwbSV_SetSPIComponent

Purpose

This function allows setting of a unique component identifier in trace entry that is provided. Along with setting the product ID (see cwbSV_SetSPIProduct), 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_SetSPIComponent(
                             cwbSV_TraceSPIHandle  traceSPIHandle,
                             char                 *componentID);

Parameters

cwbSV_TraceSPIHandle traceSPIHandle - input
Handle that was returned by a previous call to cwbSV_CreateTraceSPIHandle().
char * componentID - input
Points to a null-terminated string that contains a component identifier to be used on this trace entry. NOTE: A maximum of CWBSV_MAX_COMP_ID characters will be logged for the component 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.