Intel 05-1832-002 IP Phone User Manual


 
110 Voice API for Windows Operating Systems Library Reference — November 2003
ATDX_STATE( ) — return the current state of the channel
CS_WINK
Wink state
When a VFX combined resource board is being used to send and receive faxes the following states
may be returned:
CS_SENDFAX
Channel is in a fax transmission state.
CS_RECVFAX
Channel is in a fax reception state.
Note: A device is idle if there is no I/O function active on it.
!
!!
! Cautions
This function extracts the current state from the driver and requires the same processing resources
as many other functions. For this reason, applications should not base their state machines on this
function.
!
!!
! Errors
This function will fail and return AT_FAILURE if an invalid channel device handle is specified in
chdev.
!
!!
! Example
#include <stdio.h>
#include <srllib.h>
#include <dxxxlib.h>
main()
{
int chdev;
long chstate;
/* Open the channel device */
if ((chdev = dx_open("dxxxB1C1",NULL)) == -1) {
/* Process error */
}
.
.
/* Examine state of the channel. Perform application specific action based
* on state of the channel
*/
if((chstate =
ATDX_STATE(chdev)
) == AT_FAILURE) {
/* Process error */
}
printf("current state of channel %s = %ld\n", ATDX_NAMEP(chdev), chstate);
.
.
}
!
!!
! See Also
None.