cc_GetVer( ) retrieves the firmware version number
160
int minnum; /* minor version number */
.
.
.
if ( cc_Open(devhdl,”dtiB1”,0)<0)
printf(“Error opening device: errno = %d\n”, errno);
/*
* Use cc_GetVer() to get the version values.
*/
if(cc_GetVer(devhdl,&majnum,&minnum) <0)
procdevfail(devhdl);
else
printf(“Major version number 0x%x, minor version number 0x%x\n”
,majnum,minnum);
/* continue the program. */
.
.
.
.
.
if ( cc_Close(devhdl)<0)
printf(“Error closing device, errno = %d\n”, errno);
}
int callfail(CRN crn)
{LINEDEV ld;
cc_CRN2LineDev(crn,&ld);
procdevfail(ld);
}
int procdevfail(LINEDEV handle)
{int reason;
char *msg;
reason = cc_CauseValue(handle);
cc_ResultMsg(handle,reason,&msg);
printf(“reason = %x - %s\n”,reason,msg);
}
!
! !
!
Errors
If the function returns < 0 to indicate failure, use the cc_CauseValue( ) functionto retrieve the reason code for the failure. The cc_ResultMsg( ) function can be
used to interpret the reason code. Error codes are defined in the files ccerr.h,
isdnerr.h, and isdncmd.h.
Typically, a < 0 return code for the cc_GetVer( ) function indicates that thefunction reference (the device handle) is not valid for the function call.!
! !
!
See Also None