#include <oscl_scheduler_ao.h>
Inheritance diagram for OsclTimerObject:
Public Methods | |
OSCL_IMPORT_REF | OsclTimerObject (int32 aPriority, const char name[]) |
virtual OSCL_IMPORT_REF | ~OsclTimerObject () |
OSCL_IMPORT_REF void | AddToScheduler () |
OSCL_IMPORT_REF void | RemoveFromScheduler () |
OSCL_IMPORT_REF void | After (int32 aDelayMicrosec) |
OSCL_IMPORT_REF void | RunIfNotReady (uint32 aDelayMicrosec=0) |
OSCL_IMPORT_REF void | SetBusy () |
OSCL_IMPORT_REF bool | IsBusy () const |
OSCL_IMPORT_REF void | Cancel () |
OSCL_IMPORT_REF int32 | Priority () const |
OSCL_IMPORT_REF int32 | Status () const |
OSCL_IMPORT_REF void | SetStatus (int32) |
OSCL_IMPORT_REF OsclAOStatus & | StatusRef () |
Protected Methods | |
virtual OSCL_IMPORT_REF void | DoCancel () |
virtual OSCL_IMPORT_REF int32 | RunError (int32 aError) |
|
Constructor.
|
|
Destructor. |
|
Add this AO to the current thread's scheduler. Reimplemented from PVActiveBase. |
|
'After' sets the request ready, with request status OSCL_REQUEST_STATUS_PENDING, and starts a timer. When the timer expires, the request will complete with status OSCL_REQUEST_ERR_NONE. Must be called from the same thread in which the active object is scheduled. Will leave if the request is already readied, the object is not added to any scheduler, or the calling thread does not match the scheduling thread.
|
|
Cancel any active request. If the request is pending, this will call the DoCancel routine, wait for the request to cancel, then set the request idle. The AO will not run. If the request is not active, it does nothing. Request must be canceled from the same thread in which it is scheduled. Reimplemented from PVActiveBase. |
|
Cancel request handler. This gets called by scheduler when the request is cancelled. The default routine will cancel the timer. If any additional action is needed, the derived class may override this. If the derived class does override this, it should explicitly call OsclTimerObject::DoCancel in its own DoCancel routine. Implements PVActiveBase. |
|
Return true if this AO is active, false otherwise. |
|
Return scheduling priority of this exec object. |
|
Remove this AO from its scheduler. Will leave if the calling thread context does not match the scheduling thread. Cancels any pending request before removing. Reimplemented from PVActiveBase. |
|
Run Leave handler. This gets called by scheduler when the Run routine leaves. The default implementation simply returns the leave code. If the derived class wants to handle errors from Run, it may override this. The ExecError should return OsclErrNone if it handles the error, otherwise it should return the input error code.
Implements PVActiveBase. |
|
Complete the request after a time interval. RunIfNotReady is identical to After() except that it first checks the request status, and if it is already readied, it does nothing.
|
|
Set request ready for this AO. Will leave if the request is already readied, or the exec object is not added to any scheduler, or the calling thread context does not match the scheduler thread. |
|
|
|
Request status access |
|
|