Dialogic 05-0867-005 Table Top Game User Manual


 
start the capture of all D channel information cc_StartTrace( )
269
!
! !
!
Example
#include <windows.h> /* For Windows applications only */
#include <stdio.h>
#include <errno.h>
#include srllib.h
#include dtilib.h
#include cclib.h
void main()
{
LINEDEV brddevhdl; /* device handle for D channel */
LINEDEV devhdl = 0;
CRN crn = 0;
char *devname = dtiB1;
.
.
.
if ( cc_Open(brddevhdl, devname,0)<0)
exit(1);
if ( cc_Open( &devhdl, devname,0)<0)
{
printf(Error opening device: errno = %d\n, errno);
exit(1);
}
/*
using cc_StartTrace() to begin
the trace function and save it on file istrace.log.
Note that the brddevhdl is a board level device.
*/
if ( cc_StartTrace(brddevhdl, istrace.log) <0)
procdevfail(brddevhdl);
if ( cc_WaitCall(devhdl, &crn, NULL, -1, EV_SYNC)<0)
procdevfail(devhdl);
if ( cc_AnswerCall(crn, 0, EV_SYNC)<0)
callfail(crn);
.
.
.
.
.
/* Drop the call */
if ( cc_DropCall(crn, NORMAL_CLEARING, EV_SYNC)<0)
callfail(crn);
if ( cc_ReleaseCall(crn)<0)
callfail(crn);
/*
using cc_StopTrace() to stop
the trace function and close the file.
Note that the brddevhdl is a board level device.
*/
if ( cc_StopTrace(brddevhdl)<0)
procdevfail(brddevhdl);
/* Close the device */
if ( cc_Close( devhdl)<0)
printf(Error closing device, errno = %d\n, errno);