Specifications
System Software Diagnostics Guide — September 2006 59
Tracing Multiple ISDN Trunks Using Global Call
typedef struct {
unsigned long seq_no; /* the sequence number of tracing data*/
unsigned short data_size; /* the size of tracing data */
char data_buf[GCVAL_TRACEDATA_SIZE]; /* memory buffer for tracing data */
} GC_TRACEDATA, * GC_TRACEDTAP;
A new result value GCRV_QUEUE_OVERFLOW associated with GCEV_TRACEDATA event is
defined in gcerr.h:
#define GCRV_QUEUE_OVERFLOW (GCRV_RESULT | 0x65) /* Queue overflow occurred - data overwritten
*/
Sample application code
Note: The following sample code was written for an application running on a system in which an Intel
NetStructure DMT160TEC board was used as the network interface, an Intel NetStructure
DMV2400A board was used as a play/record resource board, and the boards were connected via a
CT Bus.
/*
* Do SRL event processing
*/
int evttype;
char tracedata[2048];
hdlcnt = 0;
hdls[ hdlcnt++ ] = GetGlobalCallHandle();
hdls[ hdlcnt++ ] = GetVoiceHandle();
/* Wait selectively for devices that belong to this thread */
rc = sr_waitevtEx( hdls, hdlcnt, PollTimeout_ms, &evtHdl);
if (rc != SR_TMOUT)
{
/*
* Update
*/
rc = gc_GetMetaEventEx(&g_Metaevent, evtHdl);
if (rc != GC_SUCCESS)
{
/* process error return */
gc_ErrorInfo( &gc_error_info );
printf ("Error: gc_GetMetaEventEx() on linedev: 0x%lx,
GC ErrorValue: 0x%hx - %s, CCLibID: %i - %s, CC ErrorValue: 0x%lx - %s\n",
metaevent.evtdev, gc_error_info.gcValue, gc_error_info.gcMsg,
gc_error_info.ccLibId, gc_error_info.ccLibName,
gc_error_info.ccValue, gc_error_info.ccMsg);
return (gc_error_info.gcValue);
}
evttype = metaevent.evttype;
rc = vProcessCallEvents( );
switch (evttype)
{
case GCEV_TRACEDATA:
{
memcpy((tracedata, metaevent.extevtdatap, sizeof(GC_TRACEDATA) );
/* decode the trace data */
break;
}
.
.
.
}
}










