User`s guide

Dialogic
®
System Release 6.0 PCI for Windows
®
Release Update, Rev 62 — January 30, 2008 124
Dialogic Corporation
/* Insert new definition for CDP variable signals, dependent on the value data type */
switch (t_ValType)
{
case GC_VALUE_SHORT:
gc_util_insert_parm_val(&t_pParmBlk, t_SetID, t_ParmID, sizeof(unsigned short),
0);
break;
case GC_VALUE_STRING:
gc_util_insert_parm_ref(&t_pParmBlk, t_SetID, t_ParmID, 30, "");
break;
case GC_VALUE_ULONG:
gc_util_insert_parm_val(&t_pParmBlk, t_SetID, t_ParmID, sizeof(unsigned long),
0);
break;
case GC_VALUE_UCHAR:
gc_util_insert_parm_val(&t_pParmBlk, t_SetID, t_ParmID, sizeof(unsigned char),
0);
break;
default:
/* Process the error here */
printf("!!!!Invalid value type for protocolID:%d to CDP variable(name:%s,
set_id:0x%x, parm_id:0x%x, valtype:%d)",
a_PDKProtocolID, a_CDPVarParms[index1].name, t_SetID, t_ParmID,
t_ValType);
gc_util_delete_parm_blk(t_pParmBlk);
return -1;
break;
}
}
/* Get the values of multiple CDP variables */
*a_pRequestID = 0;
t_result = gc_GetConfigData(GCTGT_PROTOCOL_SYSTEM, a_PDKProtocolID, t_pParmBlk, 0,
a_pRequestID, EV_ASYNC);
if (t_result)
{
/* Process the error */
printf("gc_GetConfigData(protocol_id:%d) failed on setting CDP parameters()",
a_PDKProtocolID);
*a_pRequestID = 0;
}
else
{
printf("gc_GetConfigData(protocol_id:%d, req_id:0x%x) succeed on setting CDP
parameters",
a_PDKProtocolID, *a_pRequestID);
}
gc_util_delete_parm_blk(t_pParmBlk);
return t_result;
}
int SetCDPVarParms(long a_PDKProtocolID, int a_NumParms, CDP_PARM * a_CDPVarParms, long *
a_pRequestID)
{
GC_PARM_BLK * t_pParmBlk = NULL;
unsigned short t_SetID;
unsigned short t_ParmID;
unsigned char t_ValType = 0;
int t_result = 0;
int t_IntVal = 0;
unsigned long t_ULongVal = 0;
unsigned char t_UCharVal = 0;
unsigned char t_StrSize = 0;
int index1 = 0;
if (!a_PDKProtocolID)
{
/* Process the error */