# include <CA_header.h>
...
int RC;
int detailed_trace_flag = FALSE;
#define STR_LEN 132
char trace_string[STR_LEN];
int queue_id;
unsigned long mtype;
unsigned long length;
void * data;
int msg_id;
...
ret = msgrcv( queue_id , data , length , mtype , IPD_NOWAIT );
/* A significant event has occurred */
if (TRC_ISON (CA_TRACE_CHANNEL))
{
/* check tracing enabled before formatting string */
sprintf( trace_string, "Msg id %d len %d on queue %d\n" ,
mtype, length, queue_id );
RC = CA_TRACE_STRING( trace_string );
if (detailed_trace_flag)
{
/* trace the received message
RC = CA_TRACE_DATA( (length > 128) ? 128 : length , data );
}
}