distortos  v0.4.0
object-oriented C++ RTOS for microcontrollers
distortos::SoftwareTimerCommon Class Reference

SoftwareTimerCommon class implements common functionality of software timers. More...

#include <SoftwareTimerCommon.hpp>

Inheritance diagram for distortos::SoftwareTimerCommon:
[legend]
Collaboration diagram for distortos::SoftwareTimerCommon:
[legend]

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 SoftwareTimerCommonoperator= (const SoftwareTimerCommon &)=delete
 
SoftwareTimerCommonoperator= (SoftwareTimerCommon &&)=delete
 
- Public Member Functions inherited from distortos::SoftwareTimer
virtual ~SoftwareTimer ()=0
 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 Protected Member Functions inherited from distortos::SoftwareTimer
static void softwareTimerRunner (SoftwareTimer &softwareTimer)
 Software timer's function runner. More...
 

Detailed Description

SoftwareTimerCommon class implements common functionality of software timers.

Constructor & Destructor Documentation

◆ SoftwareTimerCommon()

constexpr distortos::SoftwareTimerCommon::SoftwareTimerCommon ( )
inline

SoftwareTimerCommon's constructor.

Here is the call graph for this function:

◆ ~SoftwareTimerCommon()

distortos::SoftwareTimerCommon::~SoftwareTimerCommon ( )
override

SoftwareTimerCommon's destructor.

Here is the caller graph for this function:

Member Function Documentation

◆ isRunning()

bool distortos::SoftwareTimerCommon::isRunning ( ) const
overridevirtual
Returns
true if the timer is running, false otherwise

Implements distortos::SoftwareTimer.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start()

int distortos::SoftwareTimerCommon::start ( TickClock::time_point  timePoint,
TickClock::duration  period = {} 
)
overridevirtual

Starts the timer.

Parameters
[in]timePointis the time point at which the function will be executed
[in]periodis the period used to restart repetitive software timer, 0 for one-shot software timers, default - 0
Returns
0 on success, error code otherwise

Implements distortos::SoftwareTimer.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stop()

int distortos::SoftwareTimerCommon::stop ( )
overridevirtual

Stops the timer.

Returns
0 on success, error code otherwise

Implements distortos::SoftwareTimer.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ softwareTimerControlBlock_

internal::SoftwareTimerControlBlock distortos::SoftwareTimerCommon::softwareTimerControlBlock_
private

internal SoftwareTimerControlBlock object


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