distortos  v0.4.0
object-oriented C++ RTOS for microcontrollers
SoftwareTimerCommon.hpp
Go to the documentation of this file.
1 
12 #ifndef INCLUDE_DISTORTOS_SOFTWARETIMERCOMMON_HPP_
13 #define INCLUDE_DISTORTOS_SOFTWARETIMERCOMMON_HPP_
14 
16 
18 
19 namespace distortos
20 {
21 
29 {
30 public:
31 
36  constexpr SoftwareTimerCommon() :
38  {
39 
40  }
41 
46  ~SoftwareTimerCommon() override;
47 
52  bool isRunning() const override;
53 
64  int start(TickClock::time_point timePoint, TickClock::duration period = {}) override;
65 
67 
74  int stop() override;
75 
78  const SoftwareTimerCommon& operator=(const SoftwareTimerCommon&) = delete;
79  SoftwareTimerCommon& operator=(SoftwareTimerCommon&&) = delete;
80 
81 private:
82 
85 };
86 
87 } // namespace distortos
88 
89 #endif // INCLUDE_DISTORTOS_SOFTWARETIMERCOMMON_HPP_
~SoftwareTimerCommon() override
SoftwareTimerCommon's destructor.
Definition: SoftwareTimerCommon.cpp:24
int stop() override
Stops the timer.
Definition: SoftwareTimerCommon.cpp:40
int start(TickClock::time_point timePoint, TickClock::duration period={}) override
Starts the timer.
Definition: SoftwareTimerCommon.cpp:34
constexpr SoftwareTimerCommon()
SoftwareTimerCommon's constructor.
Definition: SoftwareTimerCommon.hpp:36
std::chrono::time_point< TickClock > time_point
basic time_point type of clock
Definition: TickClock.hpp:42
int start(TickClock::duration duration, TickClock::duration period={})
Starts the timer.
Definition: SoftwareTimer.cpp:26
internal::SoftwareTimerControlBlock softwareTimerControlBlock_
internal SoftwareTimerControlBlock object
Definition: SoftwareTimerCommon.hpp:84
Top-level namespace of distortos project.
bool isRunning() const override
Definition: SoftwareTimerCommon.cpp:29
std::chrono::duration< rep, period > duration
basic duration type of clock
Definition: TickClock.hpp:39
static void softwareTimerRunner(SoftwareTimer &softwareTimer)
Software timer&#39;s function runner.
Definition: SoftwareTimer.cpp:36
SoftwareTimerCommon class implements common functionality of software timers.
Definition: SoftwareTimerCommon.hpp:28
SoftwareTimer class header.
SoftwareTimerControlBlock class header.
SoftwareTimerControlBlock class is a control block of software timer.
Definition: SoftwareTimerControlBlock.hpp:28
SoftwareTimer class is an abstract interface for software timers.
Definition: SoftwareTimer.hpp:26