Platform-independent definition of Wait objects.
More...
#include <Wait.h>
Platform-independent definition of Wait objects.
◆ pfnWaitNotification_t
typedef void(* OpenZWave::Internal::Platform::Wait::pfnWaitNotification_t) (void *_context) |
◆ anonymous enum
Enumerator |
---|
Timeout_Immediate | |
Timeout_Infinite | |
◆ Wait()
OpenZWave::Internal::Platform::Wait::Wait |
( |
| ) |
|
|
protected |
◆ ~Wait()
OpenZWave::Internal::Platform::Wait::~Wait |
( |
| ) |
|
|
protectedvirtual |
◆ AddWatcher()
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.
- 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::Internal::Platform::Wait::IsSignalled |
( |
| ) |
|
|
protectedpure virtual |
◆ Multiple()
int32 OpenZWave::Internal::Platform::Wait::Multiple |
( |
Wait ** |
_objects, |
|
|
uint32 |
_numObjects, |
|
|
int32 |
_timeout = -1 |
|
) |
| |
|
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.
- 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()
void OpenZWave::Internal::Platform::Wait::Notify |
( |
| ) |
|
|
protected |
Notify the watchers that the object is signalled.
◆ RemoveWatcher()
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.
- 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::Internal::Platform::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: