User`s guide

Dialogic
®
System Release 6.0 PCI for Windows
®
Release Update, Rev 62 — January 30, 2008 121
Dialogic Corporation
/* Obtain the protocol Name */
t_pParmData = gc_util_find_parm(t_pParmBlk, GCSET_PROTOCOL, GCPARM_PROTOCOL_NAME);
if (NULL != t_pParmData)
{
strcpy(a_pProtName, (const char*)t_pParmData->value_buf);
}
printf("ObtainProtocolIDAndName(linedev:%d, protocol_id:%d, protocol_name:%s)",
a_GCLineDevH, *a_pProtID, a_pProtName);
gc_util_delete_parm_blk(t_pParmBlk);
return t_result;
}
int QueryParmID(long a_PDKProtocolID, char *a_pParmName, unsigned short * a_pSetID,
unsigned short * a_pParmID, unsigned char * a_pValType)
{
GC_PARM t_SourceData;
GC_PARM t_RespData;
GC_PARM_ID t_ParmIDBlk;
int t_result = 0;
/* Pass the CDP name, which is defined in CDP file, e.g., "CAS_WINKRCV" or "CDP_ANI_ENABLED"
in pdk_us_mf_io.cdp */
t_SourceData.paddress = a_pParmName;
memset(&t_ParmIDBlk, '0', sizeof(GC_PARM_ID));
t_RespData.pstruct = & t_ParmIDBlk;
t_result = gc_QueryConfigData(GCTGT_PROTOCOL_SYSTEM, a_PDKProtocolID, &t_SourceData,
GCQUERY_PARM_NAME_TO_ID, &t_RespData);
if (t_result)
{
/* Process the error */
*a_pSetID = 0;
*a_pParmID = 0;
*a_pValType = 0;
printf("gc_QueryConfigData(parm:%s) failed on protocol:%d", a_pParmName,
a_PDKProtocolID);
}
else
{
*a_pSetID = t_ParmIDBlk.set_ID;
*a_pParmID = t_ParmIDBlk.parm_ID;
*a_pValType = t_ParmIDBlk.value_type;
printf("gc_QueryConfigData(parm:%s) succeed with {setID:0x%x, parmID:0x%x, valType:%d}
on protocol:%d",
a_pParmName, *a_pSetID, *a_pParmID, *a_pValType, a_PDKProtocolID);
}
return t_result;
}
int SetCASSignalDef(long a_PDKProtocolID)
{
GC_PARM_BLK * t_pParmBlk = NULL;
unsigned short t_SetID;
unsigned short t_ParmID;
unsigned char t_ValType;
long t_RequestID = 0;
int t_result = 0;
GC_CASPROT_TRANS t_CasTrans;
GC_CASPROT_PULSE t_CasPulse = {"00xx", "11xx", 50, 62, 0, 80, 20, 250, 300};
GC_CASPROT_TRAIN t_CasTrain;
/* Find the {setID, parmID, DataType} of CAS_WINKRCV for pdk_us_mf_io */
t_result = QueryParmID(a_PDKProtocolID, "CAS_WINKRCV", &t_SetID, &t_ParmID, &t_ValType);
if (t_result)
{
/* Process the error */
return t_result;
}
/* Insert new definition for CAS signals, dependent on the signal type */