
Description | Cautions | Example | Errors
Name: |
||
Inputs: |
int devh |
|
char *bufferp |
| |
int flag |
| |
Returns: |
0 |
|
Includes: |
D42LIB.H | |
Mode: |
synchronous | |
The d42_getver( ) function retrieves the board firmware or library version and places it in an application buffer. The application buffer is at least 100 bytes long and will contain either the firmware or library version number in the following format:
Firmware |
Firmware Version: XX.XX type YY.YY where: X.XX is the version number type is the type of release (Alpha, Beta, Experimental, or Production) Y.YY is the alpha or experimental number |
Library |
File Version: YY.MM.XX.XX Product Version: YY.MM.XX.XX where: YY is the year MM is the month X is a 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 |
flag: |
determines if the firmware or library version number is placed in the application buffer. VER_D42FIRMWARE - returns the D/42-xx or PBX Integration board firmware version VER_D42LIB - returns the D42 library (D42LIB) version |
The application buffer must be at least 100 bytes.
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, one of the following (most common) codes will be contained in dx_errno. For a complete list of error codes and definitions, refer to Appendix C.
Click here to contact Dialogic Customer Engineering
Copyright 2001, Dialogic Corporation