COSA
An Object-Oriented Platform for Arduino Programming
|
#include <Clock.hh>
Public Member Functions | |
Clock () | |
virtual uint32_t | time () |
void | time (uint32_t sec) |
uint32_t | await () |
void | tick (uint16_t ms) |
void | calibration (int16_t ms) |
int16_t | calibration () |
void | adjust (int16_t ms) |
virtual bool | start (Job *job) |
virtual bool | stop (Job *job) |
virtual void | dispatch () |
Protected Attributes | |
int16_t | m_msec |
Milli-seconds fraction. More... | |
uint32_t | m_sec |
Seconds counter. More... | |
int16_t | m_cal |
Milli-seconds calibration. More... | |
Head | m_queue |
Clock for job scheduling with a time unit of seconds. The clock is updated by periodically calling the tick() member function with the clock update in milli-seconds. Started jobs/alarms are dispatched When the clock seconds counter is update.
|
inline |
|
inline |
|
inline |
|
inline |
|
virtualinherited |
Dispatch expired jobs. This member function is typically called from an interrupt service routine.
Reimplemented in RTT::Scheduler.
Definition at line 53 of file Job_Scheduler.cpp.
|
virtualinherited |
Start given job. Returns true(1) if successful otherwise false(0).
[in] | job | to start. |
Reimplemented in RTT::Scheduler.
Definition at line 24 of file Job_Scheduler.cpp.
|
virtualinherited |
Stop given job. Returns true(1) if successful otherwise false(0).
[in] | job | to stop. |
Definition at line 44 of file Job_Scheduler.cpp.
|
inline |
|
inlinevirtual |
|
inline |