Intel 05-1832-002 User Manual

Page of 564
234
Voice API for Windows Operating Systems Library Reference — November 2003
dx_getevt( ) — monitor channel events synchronously
dx_getevt( )
monitor channel events synchronously
!
!
!
Description
The dx_getevt( ) function monitors channel events synchronously for possible call status transition 
events in conjunction with 
. The dx_getevt( ) function blocks and returns control 
to the program after one of the events set by dx_setevtmsk( ) occurs on the channel specified in the 
chdev parameter. The 
 structure contains the event that ended the blocking.
Note:
When the time specified in timeout expires, dx_getevt( ) will terminate and return an error. Use 
the Standard Attribute function ATDV_LASTERR( ) to determine the cause of the error, which in 
this case is EDX_TIMEOUT.
!
!
!
Cautions
It is recommended that you enable only one process per channel. The event that dx_getevt( ) is 
waiting for may change if another process sets a different event for that channel. See 
 for more information.
Name:
int dx_getevt(chdev, eblkp, timeout)
Inputs:
int chdev
valid channel device handle
DX_EBLK *eblkp
pointer to Event Block structure
int timeout
timeout value in seconds
Returns:
0 if success
-1 if failure
Includes:
srllib.h
dxxxlib.h
Category:
Call Status Transition Event
Mode:
synchronous
Platform:
DM3, Springware 
Parameter
Description
chdev 
specifies the valid channel device handle obtained when the channel was 
opened using 
eblkp 
points to the Event Block structur
, which contains the event that 
ended the blocking 
timeout 
specifies the maximum amount of time in seconds to wait for an event to 
occur. timeout can have one of the following values:
number of seconds – maximum length of time dx_getevt( ) will wait for an 
event. When the time specified has elapsed, the function will terminate 
and return an error.
-1 – dx_getevt( ) will block until an event occurs; it will not time out.
0 – The function will return -1 immediately if no event is present.