
Description | Cautions | Example | Errors | See Also
Name: |
long ATDT_ROMVER(devh) | |
Inputs: |
int devh |
|
Returns: |
version of EPROM installed on Digital Network Interface device | |
Includes: |
srllib.h | |
Category: |
Extended Attribute | |
Mode: |
synchronous | |
The ATDT_ROMVER( ) function returns the version of the EPROM that is installed on the Digital Network Interface device specified in devh. This number is returned in the standard version numbering format. This function is not available on DIALOG/HD boards.
Parameter |
Description |
devh: |
Specifies the valid Digital Network Interface logical board device handle returned by a call to dt_open( ). |
Version Numbering
A version number consists of two parts that provide:
This function returns the version number as a long integer (32 bits) in BCD (binary coded decimal) format.
Figure 12 shows the format of the version number returned. Each section in the diagram represents a nibble (4 bits).
Figure 12. EPROM Version Number Format

Nibble 1 returns the type of release in BCD numbers. A converted value of 0 indicates a Production release and a converted value of 1 indicates a Beta release.
Nibbles 2, 3, and 4 return the Production Release Number.
Nibbles 5, 6, 7, and 8 return the Internal Release Number used for pre-production product releases. Nibbles 5 and 6 hold the product's Beta number. Nibbles 7 and 8 hold additional information used for internal releases.
Table 3 displays a breakdown of the values returned by each nibble in the long integer.
Table 3. ATDT_ROMVER( ) Return Values
Nibble (4 bits) | ||||
1 |
2 |
3 & 4 |
5 & 6 |
7 & 8 |
TYPE |
PRODUCTION RELEASE NUMBER |
INTERNAL NUMBER | ||
Production |
Major Release No. |
Minor Release No. |
N/A |
N/A |
Beta |
Major Release No. |
Minor Release No. |
Beta Number |
N/A |
Major and Minor Release Numbers
Major and minor release numbers distinguish major revisions from minor revisions to Production releases. The major number converts to a single digit integer that increments with each major revision to the release. The minor number converts to a two digit integer that increments with each minor revision to the release.
In decimal number format, the major number is the number before the decimal point, and the minor number is the number after the decimal point.
The following list gives examples of each type of release. The values used in these examples have been converted from the binary coded decimal numbers returned in the long integer and are displayed according to the convention.
This function will fail if an invalid Digital Network Interface logical board device handle is specified.
#include <windows.h> /* For Windows applications only */
#include <srllib.h>
#include <dtilib.h>
#include <errno.h>
main()
{
int devh; /* Board device handle */
long version; /* Version number of EPROM */
/*
* Open board 1 device
*/
if ( ( devh = dt_open( "dtiB1", 0 ) ) == -1 ) {
printf( "Cannot open board dtiB1. errno = %d", errno );
exit( 1 );
}
/*
* Get the version number of the EPROM
*/
version = ATDT_ROMVER( devh );
if ( version == AT_FAILURE ) {
printf( "Error message = %s.",ATDV_ERRMSGP( devh ) );
exit( 1 );
}
/*
* Display it
*/
printf( "DTI/2xx EPROM version number is %d.%02x\n",
(int)((version>>24)&0x0F), ((version >>16)&0xFF) );
.
.
.
}
If the function returns AT_FAILURE, use the SRL Standard Attribute function ATDV_LASTERR( ) to obtain the error code or use ATDV_ERRMSGP( ) to obtain a descriptive error message. See Appendix A - Standard Runtime Library for more information on SRL functions. The error codes returned by ATDV_LASTERR( ) are:
Error defines can be found in the file dtilib.h.
Click here to contact Dialogic Customer Engineering
Copyright 2001, Dialogic Corporation