Dialogic 05-0867-005 Table Top Game User Manual


 
configures a logical link cc_SetDLinkCfg( )
229
#include "cclib.h"
/* Global variables */
LINEDEV ldev; /* Board device handle */
main()
{
DLINK dlink;
DLINK_CFG cfg;
.
.
.
dlink.sapi = 0;
dlink.ces = 1;
cfg.tei = AUTO_TEI;
cfg.state = DATA_LINK_UP;
cfg.protocol = DATA_LINK_PROTOCOL_Q931;
if ( cc_SetDLinkCfg(ldev, &dlink, &cfg) < 0) {
printf("error");
} else {
.
.
.
}
}
!
! !
!
Errors
If the function returns < 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.
Error codes from the cc_SetDLinkCfg( ) function include the following:
Error Code Description
E_BADDEV | ERR_ISDN_LIB Bad Device Descriptor
E_INVNDIINTERFACE | ERR_ISDN_LIB Invalid NDI Interface
E_INVNRB | ERR_ISDN_LIB Invalid NRB
!
! !
!
See Also
cc_GetDLinkCfg( )