Public Member Functions | |
AsyncOp () | |
Construct a new AsyncOp object. More... | |
AsyncOp (mbed::Callback< void()> &callback) | |
Construct a new AsyncOp object. More... | |
virtual | ~AsyncOp () |
Cleanup resources used by this AsyncOp. More... | |
void | wait (rtos::Mutex *host_mutex, uint32_t milliseconds=osWaitForever) |
Wait for this asynchronous operation to complete. More... | |
void | abort () |
Abort this asynchronous operation. More... | |
bool | timeout () |
Check if this operation timed out. More... | |
bool | aborted () |
Check if this operation was aborted. More... | |
Protected Member Functions | |
virtual bool | process ()=0 |
Callback indicating that something changed. More... | |
virtual void | complete () |
Callback indicating that this event finished. More... | |
AsyncOp | ( | mbed::Callback< void()> & | callback | ) |
Construct a new AsyncOp object.
callback | Completion callback |
void abort | ( | ) |
Abort this asynchronous operation.
This function has no effect if the operation is complete. Otherwise the aborted flag is set.
bool aborted | ( | ) |
Check if this operation was aborted.
|
protectedvirtual |
Callback indicating that this event finished.
|
protectedpure virtual |
Callback indicating that something changed.
bool timeout | ( | ) |
Check if this operation timed out.
void wait | ( | rtos::Mutex * | host_mutex, |
uint32_t | milliseconds = osWaitForever |
||
) |
Wait for this asynchronous operation to complete.
If the timeout expires then this asynchronous operation is aborted and the timeout flag is set.