Dialogic 05-0867-005 Table Top Game User Manual


 
cc_GetFrame( ) retrieves the frame
120
!
! !
!
Example
#include <windows.h> /* For Windows applications only */
#include <stdio.h>
#include <errno.h>
#include "srllib.h"
#include "dtilib.h"
#include "cclib.h"
/* Global variables */
int size = 8;
LINEDEV lbuf;
L2_BLK; rcvfrmptr;
typedef long int (*EVTHDLRTYP)( );
.
.
.
int evt_hdlr( )
{
int rc = 0;
int ldev = sr_getevtdev( );
unsigned long *ev_datap = (unsigned long *)sr_getevtdatap( );
int len = sr_getevtlen( );
switch(sr_getevttype( ))
{
.
.
.
case CCEV_L2FRAME: /* New frame received */
if (rc = cc_GetFrame(ldev, &rcvfrmptr) != 0)
{
/* Process error condition */
}
else
/* Process the frame and call control function */
.
.
.
break;
.
.
}
}
!
! !
!
Errors
If the function returns a value < 0 to indicate failure, use the cc_CauseValue( )
function to retrieve the reason code for the failure. The cc_ResultMsg( ) function
can be used to interpret the reason code. Error codes are defined in the files
ccerr.h, isdnerr.h, and isdncmd.h.