Platform-independent definition of Wait objects.
More...
#include <Wait.h>
Platform-independent definition of Wait objects.
◆ pfnWaitNotification_t
| typedef void(* OpenZWave::Wait::pfnWaitNotification_t) (void *_context) |
◆ anonymous enum
| Enumerator |
|---|
| Timeout_Immediate | |
| Timeout_Infinite | |
◆ Wait()
◆ ~Wait()
◆ AddWatcher()
Add a watcher to our object. The watcher will be triggered by the derived class, when it enters a certain state.
- Parameters
-
| _callback | pointer to the function that will be called when the wait is over. |
| _context | pointer to custom data that will be sent with the callback. |
◆ IsSignalled()
| virtual bool OpenZWave::Wait::IsSignalled |
( |
| ) |
|
|
protectedpure virtual |
◆ Multiple()
Wait for one of multiple objects to become signalled. If more than one object is in a signalled state, the lowest array index will be returned.
- Parameters
-
| _objects | array of pointers to objects to wait on. |
| _numObjects | number of objects in the array. |
| _timeout | optional maximum time to wait. Defaults to -1, which means wait forever. |
- Returns
- index into the array of the object that was signalled, -1 if the wait timed out.
◆ Notify()
Notify the watchers that the object is signalled.
◆ RemoveWatcher()
Remove a watcher from our object. Both the _callback and _context pointers must match those used in a previous call to AddWatcher.
- Parameters
-
| _callback | pointer to the function that will be called when the wait is over. |
| _context | pointer to custom data that will be sent with the callback. |
◆ Single()
| static int32 OpenZWave::Wait::Single |
( |
Wait * | _object, |
|
|
int32 | _timeout = -1 ) |
|
inlinestatic |
Wait for a single object to become signalled.
- Parameters
-
| _object | pointer to the object to wait on. |
| _timeout | optional maximum time to wait. Defaults to -1, which means wait forever. |
- Returns
- zero if the object was signalled, -1 if the wait timed out.
◆ ThreadImpl
◆ WaitImpl
The documentation for this class was generated from the following files: