PREV TOC HOME INDEX NEXT


1.9.20. Example of gc_SetConfigData( )

The following sample code provides examples of using the gc_SetConfigData( ) function to update and obtain ISDN parameter data.

Note: The following code applies when using Springware boards only. The gc_SetConfigData( ) function is not supported when using DM3 boards.
int SetConfigDataChan(LINEDEV linedev) 
{
     int retcode;
     long request_id;
     GC_PARM_BLKP target_datap=NULL;
     PARM_INFO parm_info;
     int         gc_error;            /* Global Call Error */
     int         cclibid;             /* CC Library ID */
     long        cc_error;            /* Call Control Library error code */ 
     char        *msg;                /* pointer to error message string */ 
     strcpy(parm_info.parmdata, "12345678987");
     parm_info.parmdatalen = strlen(parm_info.parmdata); 
     gc_util_insert_parm_val(&target_datap, GCIS_ADD_EVENTMSK,
          GCIS_PARM_SETMSK, (unsigned char)sizeof(int), GCISMSK_STATUS_ENQUIRY);
     gc_util_insert_parm_val(&target_datap, GCIS_ADD_EVENTMSK,
          GCIS_PARM_SETMSK, (unsigned char)sizeof(int), GCISMSK_STATUS);
     gc_util_insert_parm_val(&target_datap, GCIS_ADD_EVENTMSK,
          GCIS_PARM_SETMSK, (unsigned char)sizeof(int), GCISMSK_TERMINATE);
     gc_util_insert_parm_val(&target_datap, GCIS_ADD_EVENTMSK,
          GCIS_PARM_SETMSK, (unsigned char)sizeof(int), GCISMSK_TMREXPEVENT); 
     gc_util_insert_parm_val(&target_datap, GCSET_CALL_CONFIG,
          GCPARM_MIN_INFO, (unsigned char)sizeof(int), 5); 
     retcode=gc_SetConfigData(GCTGT_CCLIB_CHAN, linedev target_datap, 60,
                  GCUPDATE_IMMEDIATE,&request_id, EV_SYNC);
     printf("gc_SetConfigData(GCTGT_CCLIB_CHAN, 0x%X, target_datap, 60",
                  linedev);
     gc_util_delete_parm_blk(target_datap);
     if (retcode==-1)
    {
          gc_ErrorValue( &gc_error, &cclibid, &cc_error);
          gc_ResultMsg( LIBID_GC, (long) gc_error, &msg);
          gc_ResultMsg( cclibid, cc_error, &msg);
     } 
     return retcode;
} 

PREV TOC HOME INDEX NEXT

Click here to contact Telecom Support Resources

Copyright 2003, Intel Corporation
All rights reserved
This page generated January, 2003