Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: UAVCAN UAVCAN_Subscriber
TimerEventForwarder< Callback_ > Class Template Reference
Wrapper over TimerBase that forwards callbacks into arbitrary handlers, like functor objects, member functions or static functions. More...
#include <timer.hpp>
Inherits uavcan::TimerBase.
Public Member Functions | |
| const Callback & | getCallback () const |
| Get/set the callback object. | |
| void | startOneShotWithDeadline (MonotonicTime deadline) |
| Various ways to start the timer - periodically or once. | |
| MonotonicDuration | getPeriod () const |
| Returns period if the timer is in periodic mode. | |
Detailed Description
template<typename Callback_>
class uavcan::TimerEventForwarder< Callback_ >
Wrapper over TimerBase that forwards callbacks into arbitrary handlers, like functor objects, member functions or static functions.
Callback must be set before the first event; otherwise the event will generate a fatal error.
Also take a look at MethodBinder<>, which may come useful if C++11 features are not available.
- Template Parameters:
-
Callback_ Callback type. Shall accept const reference to TimerEvent as its argument.
Definition at line 96 of file timer.hpp.
Member Function Documentation
| const Callback& getCallback | ( | ) | const |
| MonotonicDuration getPeriod | ( | ) | const [inherited] |
| void startOneShotWithDeadline | ( | MonotonicTime | deadline ) | [inherited] |
Various ways to start the timer - periodically or once.
If it is running already, it will be restarted. If the deadline is in the past, the event will fire immediately. In periodic mode the timer does not accumulate error over time.
Definition at line 28 of file uc_timer.cpp.
Generated on Tue Jul 12 2022 17:17:37 by
1.7.2