Blueprint Help Send comments on this topic.
DBX WaitEvent
See Also

Glossary Item Box

Description

This manual connection member function requests an event from the connected distributor.  If there is an event available then it is opened and TRUE returned.  If there are no events available, and the distributor's reentrancy has not been exceeded (see Object Reentrancy) then the distributor will issue another request to its provider.  If this request completes within the specified timeout then the distributor will provide the event and TRUE will be returned, otherwise FALSE will be returned.  Before reading this topic, we would recommend familiarity with Manual Connections  and Distributors.

Prototype

Uns WaitEvent( Uns timeout );

Parameters

timeout

This parameter determines whether the connection will poll or block (see Connection Timeout).  It can be set to poll (CLP_POLL), block (CLP_WAIT) but does not support a millisecond timeout.

Return Value

This function returns logical TRUE if an event is successfully retrieved within the timeout period; or FALSE otherwise.

Notes

If an event is successfully retrieved then it can be inspected using the following member functions;

Status()

This member function returns the connection's event status.  Following a successful request the function will return CLP_EVENT_OPEN.  If the request timed out it will return CLP_EVENT_TIMED_OUT.

IsOpen()

This member function returns TRUE if the connection is 'Open' or FALSE otherwise.

EventNum()

This member function returns the retrieved event's sequence number.  Numbering starts from zero (the first retrieved event).

LinkNum()

This member function returns the consuming connection's link number.

See Also