
Description | Cautions | Example | Errors
Function Header |
Located at the beginning of each function and contains the following information: function name, function title, function syntax, input parameters, output or returns, includes (header files required to be include), and mode. The function syntax and inputs include the data type and are shown using standard C language syntax. |
Description |
Provides a detailed description of the function operation, including parameter descriptions. |
Example |
Provides one or more C language coding examples showing how the function can be used. |
Cautions |
Provides warnings and reminders. |
Name: |
int ATD4_BDTYPE(devh) |
Inputs: |
int devh |
|
Returns: |
board type |
|
-1 |
|
Includes: |
D42LIB.H |
Mode: |
synchronous |
Supports: |
D/42-SL, D/42-SX, D/42-NS, D/42-NE2 |
The ATD4_BDTYPE( ) function returns the D/42-xx board type of the queried device.
Board Type |
Description |
TYP_SL |
for the D/42D-SL |
TYP_SX |
for the D/42D-SX |
TYP_NS |
for the D/42-NS |
TYP_NE2PBX |
for the D/42-NE2 used with the NEC NEAX 2000 IVS or NEAX 2400 IMS PBX |
TYP_NE2KTS |
for the D/42-NE2 used with the NEC Electra Professional Level II KTS |
TYP_NE2 |
for other or unknown D/42-NE2 boards |
TYP_NONE |
for non-D/42 boards |
Parameter |
Description |
devh: |
specifies the valid board device descriptor obtained by a call to dx_open( ) |
None.
void main(void)
{
int devh;
int rc = 0;
/* Open Board Device */
if ( (devh = dx_open("dxxxB1",NULL))==-1)
{
printf("Error dx_open( )\n");
exit(-1);
} /* End dx_open */
/* Check Board Type */
if ( (rc = ATD4_BDTYPE(devh)) == -1)
{
printf("Error ATD4_BDTYPE( )\n");
dx_close(devh);
exit(-1);
}
printf("Board Type = %d\n",rc);
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_UNKNOWNBOARD |
Unknown D/42 board type |
DXLIB_INVNRB |
Internal voice library error |
Click here to contact Dialogic Customer Engineering
Copyright 2000, Dialogic Corporation