Intel 05-1832-002 IP Phone User Manual


 
222 Voice API for Windows Operating Systems Library Reference — November 2003
dx_getctinfo( ) — get information about a voice device
EDX_SH_CMDBLOCK
Blocking command is in progress
EDX_SH_LIBBSY
Switch Handler library is busy
EDX_SH_LIBNOTINIT
Switch Handler library is uninitialized
EDX_SH_MISSING
Switch Handler is not present
EDX_SH_NOCLK
Switch Handler clock fallback failed
EDX_SYSTEM
Error from operating system; use dx_fileerrno( ) to obtain error value
!
!!
! Example
#include <srllib.h>
#include <dxxxlib.h>
main()
{
int chdev; /* Channel device handle */
CT_DEVINFO ct_devinfo; /* Device information structure */
/* Open board 1 channel 1 devices */
if ((chdev = dx_open("dxxxB1C1", 0)) == -1) {
/* process error */
}
/* Get Device Information */
if (
dx_getctinfo(chdev, &ct_devinfo)
== -1) {
printf("Error message = %s", ATDV_ERRMSGP(chdev));
exit(1);
}
printf("%s Product Id = 0x%x, Family = %d, Mode = %d, Network = %d, Bus
...mode = %d, Encoding = %d", ATDV_NAMEP(chdev), ct_devinfo.ct_prodid,
...ct_devinfo.ct_devfamily, ct_devinfo.ct_devmode, ct_devinfo.ct_nettype,
...ct_devinfo.ct_busmode, ct_devinfo.ct_busencoding);
}
!
!!
! See Also
ag_getctinfo( )
dt_getctinfo( ) in the Digital Network Interface Software Reference