
Description | Cautions | Example | Errors
Name: |
int d42_getver(devh, bufferp, flag) | |
Inputs: |
int devh |
|
char *bufferp |
| |
int flag |
| |
Returns: |
ED42_NOERROR |
|
Includes: |
D42LIB.H | |
Mode: |
synchronous | |
Supports: |
all D/42 boards | |
The d42_getver( ) function retrieves the D/42-xx board firmware or library version and places it in an application buffer pointed to by bufferp. The flag specifies what should be returned (firmware or library version number).The application buffer is at least 100 bytes long and returns version number information in the following formats:
Firmware |
Firmware Version: X.XX <type> YYYY or Firmware Version: X.XX <type> Y.YY where: X.XX represents the version number <type> represents the type of release (Production, Beta, Alpha, Experimental, Special, Build, Unknown) Y.YY or YYYY represents a special release number (e.g., experimental number) |
Library |
File Version: YY.MM.XX.XX Product Version: YY.MM.XX.XX where: YY represents the year MM represents the month XX.XX represents a version number |
Parameter |
Description |
devh: |
specifies the valid board device descriptor obtained by a call to dx_open( ) |
bufferp: |
pointer to the application buffer that will contain the version data as a null-terminated ASCII string |
flag: |
determines if the firmware or library version number is placed in the application buffer. VER_D42FIRMWARE - returns the D/42-xx firmware version VER_D42LIB - returns the D42 library(LIBD42MT.DLL) version |
The application buffer must be at least 100 bytes long.
void main(void)
{
int devh;
int rc = 0;
char bufferp[100];
/* Open Board Device */
if ( (devh = dx_open("dxxxB1",NULL))==-1)
{
printf("Error dx_open( )\n");
exit(-1);
} /* End dx_open */
/* Get the Firmware Version */
if ( (rc = d42_getver(devh, bufferp, VER_D42FIRMWARE)) == -1)
{
printf("Error d42_getver( )\n");
dx_close(devh);
exit(-1);
} /* End d42_getver */
/* Print the Firmware Version /*
printf("%s",bufferp);
dx_close(devh);
} /* End main */
If this function returns -1 to indicate a failure, use ATDV_LASTERR( ) and ATDV_ERRMSGP( ) to retrieve one of the following (most common) errors. For a complete list of error codes and definitions, refer to Appendix C.
ED42_FWREQFAILURE |
Firmware error |
ED42_BADDEVICE |
Invalid or wrong device handle |
ED42_UNSUPPORTED |
Function not supported on this board |
ED42_RDFWVER |
Error reading firmware version |
ED42_INVALARG |
Invalid argument passed to function |
EDX_SYSTEM |
System level error |
DXLIB_INVNRB |
Internal voice library error |
Click here to contact Dialogic Customer Engineering
Copyright 2000, Dialogic Corporation