distortos
v0.7.0
object-oriented C++ RTOS for microcontrollers
|
SoftwareTimerCommon class implements common functionality of software timers. More...
#include "distortos/SoftwareTimerCommon.hpp"
Public Member Functions | |
constexpr | SoftwareTimerCommon () |
SoftwareTimerCommon's constructor. More... | |
~SoftwareTimerCommon () override | |
SoftwareTimerCommon's destructor. More... | |
bool | isRunning () const override |
int | start (TickClock::time_point timePoint, TickClock::duration period={}) override |
Starts the timer. More... | |
int | stop () override |
Stops the timer. More... | |
SoftwareTimerCommon (const SoftwareTimerCommon &)=delete | |
SoftwareTimerCommon (SoftwareTimerCommon &&)=default | |
const SoftwareTimerCommon & | operator= (const SoftwareTimerCommon &)=delete |
SoftwareTimerCommon & | operator= (SoftwareTimerCommon &&)=delete |
int | start (TickClock::duration duration, TickClock::duration period={}) |
Starts the timer. More... | |
template<typename Rep1 , typename Period1 , typename Rep2 = TickClock::rep, typename Period2 = TickClock::period> | |
int | start (const std::chrono::duration< Rep1, Period1 > duration, const std::chrono::duration< Rep2, Period2 > period={}) |
Starts the timer. More... | |
virtual int | start (TickClock::time_point timePoint, TickClock::duration period={})=0 |
Starts the timer. More... | |
template<typename Duration , typename Rep = TickClock::rep, typename Period = TickClock::period> | |
int | start (const std::chrono::time_point< TickClock, Duration > timePoint, const std::chrono::duration< Rep, Period > period={}) |
Starts the timer. More... | |
![]() | |
virtual | ~SoftwareTimer ()=default |
SoftwareTimer's destructor. More... | |
int | start (TickClock::duration duration, TickClock::duration period={}) |
Starts the timer. More... | |
template<typename Rep1 , typename Period1 , typename Rep2 = TickClock::rep, typename Period2 = TickClock::period> | |
int | start (const std::chrono::duration< Rep1, Period1 > duration, const std::chrono::duration< Rep2, Period2 > period={}) |
Starts the timer. More... | |
template<typename Duration , typename Rep = TickClock::rep, typename Period = TickClock::period> | |
int | start (const std::chrono::time_point< TickClock, Duration > timePoint, const std::chrono::duration< Rep, Period > period={}) |
Starts the timer. More... | |
Private Attributes | |
internal::SoftwareTimerControlBlock | softwareTimerControlBlock_ |
internal SoftwareTimerControlBlock object More... | |
Additional Inherited Members | |
![]() | |
static void | softwareTimerRunner (SoftwareTimer &softwareTimer) |
Software timer's function runner. More... | |
SoftwareTimerCommon class implements common functionality of software timers.
|
inline |
|
override |
SoftwareTimerCommon's destructor.
|
overridevirtual |
Implements distortos::SoftwareTimer.
|
overridevirtual |
Starts the timer.
[in] | timePoint | is the time point at which the function will be executed |
[in] | period | is the period used to restart repetitive software timer, 0 for one-shot software timers, default - 0 |
Implements distortos::SoftwareTimer.
|
inline |
Starts the timer.
Rep1 | is type of tick counter used in duration |
Period1 | is std::ratio type representing the tick period of the clock used in duration, seconds |
Rep2 | is type of tick counter used in period |
Period2 | is std::ratio type representing the tick period of the clock used in period, seconds |
[in] | duration | is the duration after which the function will be executed |
[in] | period | is the period used to restart repetitive software timer, 0 for one-shot software timers, default - 0 |
|
inline |
Starts the timer.
Duration | is a std::chrono::duration type used to measure duration |
Rep | is type of tick counter used in period |
Period | is std::ratio type representing the tick period of the clock used in period, seconds |
[in] | timePoint | is the time point at which the function will be executed |
[in] | period | is the period used to restart repetitive software timer, 0 for one-shot software timers, default - 0 |
virtual int distortos::SoftwareTimer::start |
Starts the timer.
[in] | timePoint | is the time point at which the function will be executed |
[in] | period | is the period used to restart repetitive software timer, 0 for one-shot software timers, default - 0 |
int distortos::SoftwareTimer::start |
Starts the timer.
[in] | duration | is the duration after which the function will be executed |
[in] | period | is the period used to restart repetitive software timer, 0 for one-shot software timers, default - 0 |
|
overridevirtual |
Stops the timer.
Implements distortos::SoftwareTimer.
|
private |
internal SoftwareTimerControlBlock object