User`s guide

Dialogic
®
System Release 6.0 PCI for Windows
®
Release Update, Rev 62 — January 30, 2008 131
Dialogic Corporation
target_datap = GC_PARM_BLKP parameter pointer, as constructed by the utility
function gc_util_insert_parm_val( )
time_out = time interval (in seconds) during which the target object must be updated
with the data. If the interval is exceeded, the update request is ignored. This
parameter is supported in synchronous mode only, and it is ignored when set to 0.
update_cond = GCUPDATE_IMMEDIATE
request_idp = pointer to the location for storing the request ID
mode = EV_ASYNC for asynchronous execution or EV_SYNC for synchronous
execution
The application receives one of the following events:
GCEV_SETCONFIGDATA to indicate that the request to dynamically change the line
type and/or coding has been successfully initiated.
GCEV_SETCONFIGDATA_FAIL to indicate that the request to dynamically change
the line type and/or coding failed. More information is available from the
GC_RTCM_EVTDATA structure associated with the event.
The following code example shows how to dynamically configure a T1 trunk to operate
with the Extended Superframe (ESF) line type and the B8ZS coding type.
GC_PARM_BLKP ParmBlkp = NULL;
long id;
/* configure Line Type = Extended Superframe for a T1 trunk */
gc_util_insert_parm_val(&ParmBlkp, CCSET_LINE_CONFIG, CCPARM_LINE_TYPE, sizeof(int),
Enum_LineType_dsx1_ESF);
/* configure Coding Type = B8ZS for a T1 trunk */
gc_util_insert_parm_val(&ParmBlkp, CCSET_LINE_CONFIG, CCPARM_CODING_TYPE, sizeof(int),
Enum_CodingType_B8ZS);
gc_SetConfigData(GCTGT_CCLIB_NETIF, bdev, ParmBlkp, 0, GCUPDATE_IMMEDIATE, &id, EV_ASYNC);
gc_util_delete_parm_blk(ParmBlkp);
if (sr_waitevt(-1) >= 0)
{
METAEVENT meta;
gc_GetMetaEvent(&meta);
switch(sr_getevttype())
{
case GCEV_SETCONFIGDATA:
printf("Received event GCEV_SETCONFIGDATA(ReqID=%d) on device %s
\n",((GC_RTCM_EVTDATA *)(meta.evtdatap))->request_ID,
ATDV_NAMEP(sr_getevtdev()));
break;
case GCEV_SETCONFIGDATA_FAIL:
printf("Received event GCEV_SETCONFIGDATA_FAIL(ReqID=%d) on device
%s, Error=%s\n",((GC_RTCM_EVTDATA *)(meta.evtdatap))->request_ID,
ATDV_NAMEP(sr_getevtdev()),
((GC_RTCM_EVTDATA *)(meta.evtdatap))->additional_msg);
break;
default:
printf("Received event 0x%x on device %s\n", sr_getevttype(),
ATDV_NAMEP(sr_getevtdev()));
break;
}
}