Purpose
This function will log an API exit point to the currently active entry/exit
trace file. The product and component ID's set in the entry will be written
along with the date and time of the when the data was logged. The API ID,
along with any optional data that is passed on the request, will also be logged.
Syntax
unsigned int CWB_ENTRY cwbSV_LogAPIExit(
cwbSV_TraceAPIHandle traceAPIHandle,
unsigned char apiID,
char *apiData,
unsigned long apiDataLength);
Parameters
- cwbSV_TraceAPIHandle traceAPIHandle - input
- Handle that was returned by a previous call to cwbSV_CreateTraceAPIHandle().
- unsigned char apiID - input
- A unique one-byte code that will distinguish this API trace point from
others that are logged by your program. Definition of these codes are left
up to the caller of this API. The recommended approach is to use the defined
range (0x00 - 0xFF) for each unique component in your product (that is, start
at 0x00 for each component)
- char * apiData - input
- Points to a buffer that contains additional data (for example, output
parameter values passed back to your caller) that you want to log along with
this exit point. Parameter is optional, it is ignored if the address is NULL
or the data length is zero. This buffer can contain binary data because the
length parameter is used in determining the amount to trace.
- unsigned long apiDataLength - input
- Specifies the number of bytes in the API data buffer to log for this
trace entry.
Return Codes
The following list shows common return values.
- CWB_OK
- Successful completion.
- CWB_INVALID_HANDLE
- Handle is not valid.
Usage
This call should allows be used in conjunction with a corresponding "cwbSV_LogAPIEntry()".
It is recommended that these calls would be put at the beginning and end of
an API routine that you write. The other method would be to use these log
functions around calls to external routines that are not written by you.