Mistake on this page?
Report an issue in GitHub or email us
Public Member Functions | Protected Member Functions
AsyncOp Class Referenceabstract
Inheritance diagram for AsyncOp:
LinkEntry

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, rtos::Kernel::Clock::duration_u32 rel_time=rtos::Kernel::wait_for_u32_forever)
 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...
 

Detailed Description

Definition at line 43 of file AsyncOp.h.

Constructor & Destructor Documentation

AsyncOp ( )

Construct a new AsyncOp object.

AsyncOp ( mbed::Callback< void()> &  callback)

Construct a new AsyncOp object.

Parameters
callbackCompletion callback
virtual ~AsyncOp ( )
virtual

Cleanup resources used by this AsyncOp.

Member Function Documentation

void abort ( )

Abort this asynchronous operation.

This function has no effect if the operation is complete. Otherwise the aborted flag is set.

Note
- the host object's lock MUST be held when this call is made
bool aborted ( )

Check if this operation was aborted.

Returns
true if this operation was aborted, false otherwise
virtual void complete ( )
protectedvirtual

Callback indicating that this event finished.

virtual bool process ( )
protectedpure virtual

Callback indicating that something changed.

Returns
true if finished false if not
bool timeout ( )

Check if this operation timed out.

Returns
true if this operation timed out, false otherwise
void wait ( rtos::Mutex host_mutex,
rtos::Kernel::Clock::duration_u32  rel_time = rtos::Kernel::wait_for_u32_forever 
)

Wait for this asynchronous operation to complete.

If the timeout expires then this asynchronous operation is aborted and the timeout flag is set.

Note
- the host object's lock MUST NOT be held when this call is made
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.