Intel 05-1832-002 User Manual
226
Voice API for Windows Operating Systems Library Reference — November 2003
dx_getdig( ) — collect digits from a channel digit buffer
dx_getdig( )
collect digits from a channel digit buffer
!
!
!
! Description
The dx_getdig( ) function initiates the collection of digits from an open channel’s digit buffer.
Upon termination of the function, the collected digits are written in ASCIIZ format into the local
buffer, which is arranged as a
Upon termination of the function, the collected digits are written in ASCIIZ format into the local
buffer, which is arranged as a
structure.
The type of digits collected depends on the digit detection mode set by the
function (for standard voice board digits) or by the
function (for user-defined
digits).
Note:
The channel must be idle, or the function will return an EDX_BUSY error.
Name:
int dx_getdig(chdev, tptp, digitp, mode)
Inputs:
int chdev
•
valid channel device handle
DV_TPT *tptp
•
pointer to Termination Parameter Table structure
DV_DIGIT *digitp
•
pointer to User Digit Buffer structure
unsigned short mode
•
asynchronous/synchronous setting
Returns:
0 to indicate successful initiation (asynchronous)
number of digits (+1 for NULL) if successful (synchronous)
-1 if failure
number of digits (+1 for NULL) if successful (synchronous)
-1 if failure
Includes:
srllib.h
dxxxlib.h
dxxxlib.h
Category:
I/O
Mode:
asynchronous or synchronous
Platform:
DM3, Springware
Parameter
Description
chdev
specifies the valid channel device handle obtained when the channel was
opened using
opened using
tptp
points to the Termination Parameter Table structure, DV_TPT, which specifies
termination conditions for this function. For a list of possible termination
conditions, see
termination conditions for this function. For a list of possible termination
conditions, see
digitp
points to the User Digit Buffer structure, DV_DIGIT, where collected digits
and their types are stored in arrays. For a list of digit types, see
and their types are stored in arrays. For a list of digit types, see
For more information about creating user-defined digits, see
.
mode
specifies whether to run dx_getdig( ) asynchronously or synchronously.
Specify one of the following:
Specify one of the following:
•
EV_ASYNC – run asynchronously
•
EV_SYNC – run synchronously (default)