
Description | Cautions | Example | Errors
Name: |
long ATDX_STATE(chdev) | |
Inputs: |
int chdev |
|
Returns: |
current state of channel if successful | |
Includes: |
srllib.h | |
Category: |
Extended Attribute | |
The ATDX_STATE( ) function returns the current state of the channel chdev.
The function parameter is defined as follows:
Parameter |
Description |
chdev |
specifies the valid channel device handle obtained when the channel was opened using dx_open( ). |
Possible return values are the following:
| |
| |
| |
| |
| |
| |
None.
#include <stdio.h>
#include <srllib.h>
#include <dxxxlib.h>
m#include <windows.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);
.
.
}
This function will fail and return AT_FAILURE if an invalid channel device handle is specified in chdev.
Click here to contact Dialogic Customer Engineering
Copyright 2002, Dialogic Corporation