![]() |
OpenZWave Library 1.6.1914
|
Platform-independent definition of Wait objects. More...
#include <Wait.h>
Public Types | |
| enum | { Timeout_Immediate = 0 , Timeout_Infinite = -1 } |
| typedef void(* | pfnWaitNotification_t) (void *_context) |
Public Member Functions | |
| void | AddWatcher (pfnWaitNotification_t _callback, void *_context) |
| void | RemoveWatcher (pfnWaitNotification_t _callback, void *_context) |
| Public Member Functions inherited from OpenZWave::Internal::Platform::Ref | |
| Ref () | |
| void | AddRef () |
| int32 | Release () |
Static Public Member Functions | |
| static int32 | Single (Wait *_object, int32 _timeout=-1) |
| static int32 | Multiple (Wait **_objects, uint32 _numObjects, int32 _timeout=-1) |
Protected Member Functions | |
| Wait () | |
| virtual | ~Wait () |
| void | Notify () |
| virtual bool | IsSignalled ()=0 |
| Protected Member Functions inherited from OpenZWave::Internal::Platform::Ref | |
| virtual | ~Ref () |
Friends | |
| class | WaitImpl |
| class | ThreadImpl |
Platform-independent definition of Wait objects.
| typedef void(* OpenZWave::Internal::Platform::Wait::pfnWaitNotification_t) (void *_context) |
|
protected |
|
protectedvirtual |
| void OpenZWave::Internal::Platform::Wait::AddWatcher | ( | pfnWaitNotification_t | _callback, |
| void * | _context ) |
Add a watcher to our object. The watcher will be triggered by the derived class, when it enters a certain state.
| _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. |
|
protectedpure virtual |
Test whether an object is signalled.
Implemented in OpenZWave::Internal::Platform::Event, OpenZWave::Internal::Platform::Mutex, OpenZWave::Internal::Platform::Stream, and OpenZWave::Internal::Platform::Thread.
|
static |
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.
| _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. |
|
protected |
Notify the watchers that the object is signalled.
| void OpenZWave::Internal::Platform::Wait::RemoveWatcher | ( | pfnWaitNotification_t | _callback, |
| void * | _context ) |
Remove a watcher from our object. Both the _callback and _context pointers must match those used in a previous call to AddWatcher.
| _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. |
|
inlinestatic |
Wait for a single object to become signalled.
| _object | pointer to the object to wait on. |
| _timeout | optional maximum time to wait. Defaults to -1, which means wait forever. |
|
friend |
|
friend |