This class implements the base timer scheduler.
More...
#include <src/core/common/timer.hpp>
|
static bool | IsStrictlyBefore (uint32_t aTimeA, uint32_t aTimeB) |
| This static method compares two times and indicates if the first time is strictly before (earlier) than the second time. More...
|
|
This class implements the base timer scheduler.
§ TimerScheduler()
ot::TimerScheduler::TimerScheduler |
( |
otInstance & |
aInstance | ) |
|
|
inlineprotected |
This constructor initializes the object.
- Parameters
-
[in] | aInstance | A reference to the instance object. |
§ Add()
void ot::TimerScheduler::Add |
( |
Timer & |
aTimer, |
|
|
const AlarmApi & |
aAlarmApi |
|
) |
| |
|
protected |
This method adds a timer instance to the timer scheduler.
- Parameters
-
[in] | aTimer | A reference to the timer instance. |
[in] | aAlarmApi | A reference to the Alarm APIs. |
§ IsStrictlyBefore()
bool ot::TimerScheduler::IsStrictlyBefore |
( |
uint32_t |
aTimeA, |
|
|
uint32_t |
aTimeB |
|
) |
| |
|
staticprotected |
This static method compares two times and indicates if the first time is strictly before (earlier) than the second time.
This method requires that the difference between the two given times to be smaller than kMaxDt.
- Parameters
-
[in] | aTimerA | The first time for comparison. |
[in] | aTimerB | The second time for comparison. |
- Returns
- TRUE if aTimeA is before aTimeB.
-
FALSE if aTimeA is same time or after aTimeB.
§ ProcessTimers()
void ot::TimerScheduler::ProcessTimers |
( |
const AlarmApi & |
aAlarmApi | ) |
|
|
protected |
This method processes the running timers.
- Parameters
-
[in] | aAlarmApi | A reference to the Alarm APIs. |
§ Remove()
void ot::TimerScheduler::Remove |
( |
Timer & |
aTimer, |
|
|
const AlarmApi & |
aAlarmApi |
|
) |
| |
|
protected |
This method removes a timer instance to the timer scheduler.
- Parameters
-
[in] | aTimer | A reference to the timer instance. |
[in] | aAlarmApi | A reference to the Alarm APIs. |
§ SetAlarm()
void ot::TimerScheduler::SetAlarm |
( |
const AlarmApi & |
aAlarmApi | ) |
|
|
protected |
This method sets the platform alarm based on timer at front of the list.
- Parameters
-
[in] | aAlarmApi | A reference to the Alarm APIs. |
The documentation for this class was generated from the following files: