The following software code demonstrates how you can determine the Global Call protocol version you are running.
#include <gclib.h>
#include <gcerr.h>
#include <srllib.h>
int main()
{
LINEDEV ldev;
GC_PARM parm;
int retcode;
METAEVENT metaevent;
parm.paddress = NULL;
int mode;
ifdef _WIN32
mode = SR_STASYNC|SR_POLLMODE;
#else
mode = SR__POLLMODE;
#endif
if (sr_setparm(SRL_DEVICE, SR_MODELTYPE, &mode) == -1)
{
// Error processing
}
gc_Start(NULL);
retcode = gc_Open(&ldev,":P_na_an_io:N_dtiB1T1:V_dxxxB1C1", 0);
if (retcode != GC_SUCCESS)
{
// Error processing
}
sr_waitevt(50);
retcode = gc_GetMetaEvent(&metaevent);
if (retcode != GC_SUCCESS)
{
// Error processing
}
if (metaevent.flags & GCME_GC_EVENT)
{
if (metaevent.evttype == GCEV_UNBLOCKED)
{
if (gc_GetParm(ldev, GCPR_PROTVER, &parm) ==
GC_SUCCESS)
{
printf("The protocol version: %s\n", parm.paddress);
}
else
{
// Error processing
}
}
}
gc_Close(ldev);
gc_Stop();
return(0);
}
Click here to contact Telecom Support Resources
Copyright 2003, Intel Corporation