#include <timer.hpp>
Public Member Functions | |
MonotonicTime | getDeadline () const |
MonotonicDuration | getPeriod () const |
Scheduler & | getScheduler () const |
virtual void | handleTimerEvent (const TimerEvent &event)=0 |
bool | isRunning () const |
void | startOneShotWithDeadline (MonotonicTime deadline) |
void | startOneShotWithDelay (MonotonicDuration delay) |
void | startPeriodic (MonotonicDuration period) |
void | stop () |
TimerBase (INode &node) | |
Private Member Functions | |
virtual void | handleDeadline (MonotonicTime current) |
![]() | |
void | generateDeadlineImmediately () |
MonotonicTime | getDeadline () const |
Scheduler & | getScheduler () const |
bool | isRunning () const |
void | startWithDeadline (MonotonicTime deadline) |
void | startWithDelay (MonotonicDuration delay) |
void | stop () |
DeadlineHandler (Scheduler &scheduler) | |
virtual | ~DeadlineHandler () |
![]() | |
DeadlineHandler * | getNextListNode () const |
void | setNextListNode (DeadlineHandler *node) |
LinkedListNode () | |
~LinkedListNode () | |
Private Attributes | |
MonotonicDuration | period_ |
![]() | |
Scheduler & | scheduler_ |
Inherit this class if you need a timer callback method in your class.
|
inlineexplicit |
|
inline |
Definition at line 41 of file scheduler.hpp.
|
inline |
|
inline |
Definition at line 42 of file scheduler.hpp.
|
privatevirtual |
Implements uavcan::DeadlineHandler.
Definition at line 13 of file uc_timer.cpp.
|
pure virtual |
Implement this method in your class to receive callbacks.
Implemented in BackgroundSpinner, uavcan::TimerEventForwarder< Callback_ >, uavcan::TimerEventForwarder< uavcan::MethodBinder >, uavcan::dynamic_node_id_server::distributed::RaftCore, uavcan::FirmwareUpdateTrigger, uavcan::dynamic_node_id_server::NodeDiscoverer, uavcan::NodeInfoRetriever, uavcan::dynamic_node_id_server::distributed::ClusterManager, uavcan::NodeStatusProvider, uavcan::DynamicNodeIDClient, and uavcan::PanicBroadcaster.
bool uavcan::DeadlineHandler::isRunning |
Definition at line 32 of file uc_scheduler.cpp.
void uavcan::TimerBase::startOneShotWithDeadline | ( | MonotonicTime | deadline | ) |
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.
void uavcan::TimerBase::startOneShotWithDelay | ( | MonotonicDuration | delay | ) |
Definition at line 35 of file uc_timer.cpp.
void uavcan::TimerBase::startPeriodic | ( | MonotonicDuration | period | ) |
Definition at line 42 of file uc_timer.cpp.
void uavcan::DeadlineHandler::stop |
Definition at line 27 of file uc_scheduler.cpp.
|
private |