RSP_waitNextEvent

Name

RSP_waitNextEvent -- Waits the specified number of seconds, or until an event occurs.

Synopsis

int RSP_waitNextEvent(RSP_moduleBackend *mod, int secs);

Description

Waits the specified number of seconds for an event. If the RSPD is down or is in the process of shutting down, the function returns immediately and sets the error code. Otherwise, this function returns with no event (0) and lets your module do an update.

Returns

This functions returns 0 if no event happened and the program may continue. If the RSPD has shutdown or if there is another error, -1 is returned. In this case your module should clean up its memory and exit as soon as possible.

Error Conditions

If an error occurs, this function will return -1 and set rsp_error appropriately. Valid error codes are: