User`s guide

Dialogic
®
System Release 6.0 PCI for Windows
®
Release Update, Rev 62 — January 30, 2008 120
Dialogic Corporation
target_datap = GC_PARM_BLKP parameter pointer, as constructed by the utility
function gc_util_insert_parm_val( ) for the CDP integer value and
gc_util_insert_parm_ref( ) for the CDP string value.
time_out = time interval (in seconds) during which the parameter value must be
updated. 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 = ignored for DM3 PDK protocol parameters
request_idp = pointer to the location for storing the request ID, output from Global
Call
mode = EV_ASYNC for asynchronous execution or EV_SYNC for synchronous
execution. EV_ASYNC mode is recommended.
See Section 1.42.1.5, “Sample Code for Getting and Setting CAS Signal Definitions and
CDP Variable Values”, on page 120, specifically the SetCDPVarParms( ) function, for
example code that demonstrates how to set new values of multiple CDP variables.
1.42.1.5 Sample Code for Getting and Setting CAS Signal Definitions and CDP
Variable Values
/* Dialogic Header Files */
#include <gcip.h>
#include <gclib.h>
#include <gcisdn.h>
#include <srllib.h>
#include <dm3cc_parm.h>
int ObtainProtocolIDAndName(LINEDEV a_GCLineDevH, char *a_pProtName, long *a_pProtID)
{
GC_PARM_BLK * t_pParmBlk = NULL;
GC_PARM_DATA * t_pParmData = NULL;
char * t_ProtName[20];
long t_RequestID = 0;
int t_result;
/* Reserve the space for protocol ID */
*a_pProtID = 0;
gc_util_insert_parm_val(&t_pParmBlk, GCSET_PROTOCOL, GCPARM_PROTOCOL_ID, sizeof(long),
*a_pProtID);
/* Reserve the space for protocol Name */
gc_util_insert_parm_ref(&t_pParmBlk, GCSET_PROTOCOL, GCPARM_PROTOCOL_NAME,
sizeof(t_ProtName), t_ProtName);
/* Since the protocol information has already been stored in GC library during gc_OpenEx(),
it is recommended to call gc_GetConfigData() in SYNC mode */
t_result = gc_GetConfigData(GCTGT_GCLIB_CHAN, a_GCLineDevH, t_pParmBlk, 0, & t_RequestID,
EV_SYNC);
if (t_result)
{
/* Process the error */
gc_util_delete_parm_blk(t_pParmBlk);
return t_result;
}
/* Obtain the protocol ID */
t_pParmData = gc_util_find_parm(t_pParmBlk, GCSET_PROTOCOL, GCPARM_PROTOCOL_ID);
if (NULL != t_pParmData)
{
memcpy(a_pProtID, t_pParmData->value_buf, t_pParmData->value_size);
}