
Description | Cautions | Example | Errors
Name: |
int ATD4_CHTYPE(devh) | |
Inputs: |
int devh |
|
Returns: |
channel type |
|
Includes: |
D42LIB.H | |
Mode: |
synchronous | |
Supports: |
D/42-SL, D/42-SX, D/42-NS, D/42-NE2 | |
The ATD4_CHTYPE( ) function returns the D/42-xx channel type of the queried device.
Channel 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 channel device descriptor obtained by a call to dx_open( ) |
None.
void main(void)
{
int devh;
int rc = 0;
/* Open Channel Device */
if ( (devh = dx_open("dxxxB1C1",NULL))==-1)
{
printf("Error dx_open( )\n");
exit(-1);
} /* End dx_open */
/* Check Channel Type */
if ( (rc = ATD4_CHTYPE(devh))== -1)
{
printf("Error ATD4_CHTYPE( )\n");
dx_close(devh);
exit(-1);
}
printf("Channel 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_INVALARG |
Illegal argument in function |
ED42_UNKNOWNBOARD |
Unknown D/42 board type |
DXLIB_INVNRB |
Internal voice library error |
Click here to contact Dialogic Customer Engineering
Copyright 2000, Dialogic Corporation