Previous PageTable Of Contents../index.htmlIndexNext Page

dx_getevt( )

Description | Cautions | Example | Errors | See Also

Name:

int dx_getevt(chdev,eblkp,timeout)

Inputs:

int chdev

  valid Dialogic 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

Top Of PageDescription

The dx_getevt( ) function monitors channel events synchronously for possible call status transition events in conjunction with dx_setevtmsk( ). dx_getevt( ) 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 DX_EBLK structure contains the event that ended the blocking.

The function parameters are defined as follows:

Parameter

Description

chdev

specifies the valid channel device handle obtained when the channel was opened using dx_open( ).

eblkp

points to the Event Block Structure DX_EBLK, which will contain 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:

 

# 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.

NOTE:
When the time specified in timeout expires, dx_getevt( ) will terminate and return an error. The Standard Attribute function ATDV_LASTERR( ) can be used to determine the cause of the error, which in this case is EDX_TIMEOUT.

Top Of PageCautions

We recommend enabling 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 dx_setevtmsk( ) for more details.

Top Of PageExample

Top Of PageErrors

If this function returns -1 to indicate failure, use ATDV_LASTERR( ) and ATDV_ERRMSGP( ) to retrieve one of the following error reasons:

EDX_BADPARM

  • Invalid Parameter

EDX_SYSTEM

EDX_TIMEOUT

  • Timeout time limit is reached

Top Of PageSee Also


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2002, Dialogic Corporation
All rights reserved
This page generated February, 2002