0.01.00
ot::TimerScheduler Class Reference

This class implements the base timer scheduler. More...

#include <src/core/common/timer.hpp>

Inheritance diagram for ot::TimerScheduler:
ot::InstanceLocator ot::TimerMilliScheduler

Classes

struct  AlarmApi
 The Alarm APIs definition. More...
 

Protected Member Functions

 TimerScheduler (otInstance &aInstance)
 This constructor initializes the object. More...
 
void Add (Timer &aTimer, const AlarmApi &aAlarmApi)
 This method adds a timer instance to the timer scheduler. More...
 
void Remove (Timer &aTimer, const AlarmApi &aAlarmApi)
 This method removes a timer instance to the timer scheduler. More...
 
void ProcessTimers (const AlarmApi &aAlarmApi)
 This method processes the running timers. More...
 
void SetAlarm (const AlarmApi &aAlarmApi)
 This method sets the platform alarm based on timer at front of the list. More...
 
- Protected Member Functions inherited from ot::InstanceLocator
 InstanceLocator (otInstance &aInstance)
 This constructor initializes the object. More...
 

Static Protected Member Functions

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...
 

Protected Attributes

TimermHead
 

Friends

class Timer
 

Additional Inherited Members

- Public Member Functions inherited from ot::InstanceLocator
otInstanceGetInstance (void) const
 This method returns a reference to the parent otInstance structure. More...
 
Ip6::Ip6GetIp6 (void) const
 This method returns a reference to the Ip6. More...
 
ThreadNetifGetNetif (void) const
 This method returns a reference to the thread network interface. More...
 

Detailed Description

This class implements the base timer scheduler.

Constructor & Destructor Documentation

§ TimerScheduler()

ot::TimerScheduler::TimerScheduler ( otInstance aInstance)
inlineprotected

This constructor initializes the object.

Parameters
[in]aInstanceA reference to the instance object.

Member Function Documentation

§ Add()

void ot::TimerScheduler::Add ( Timer aTimer,
const AlarmApi aAlarmApi 
)
protected

This method adds a timer instance to the timer scheduler.

Parameters
[in]aTimerA reference to the timer instance.
[in]aAlarmApiA 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]aTimerAThe first time for comparison.
[in]aTimerBThe 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]aAlarmApiA 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]aTimerA reference to the timer instance.
[in]aAlarmApiA 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]aAlarmApiA reference to the Alarm APIs.

The documentation for this class was generated from the following files: