#include <internal_timer_manager.h>
Classes | |
| struct | TimerInfo |
| class | TimerQueueCallback |
Public Member Functions | |
| int32_t | add (const D &period, const std::function< void(const E &)> &callback, CallbackQueueInterface *callback_queue, const VoidConstPtr &tracked_object, bool oneshot) |
| bool | hasPending (int32_t handle) |
| void | remove (int32_t handle) |
| void | setPeriod (int32_t handle, const D &period, bool reset=true) |
| TimerManager () | |
| ~TimerManager () | |
Static Public Member Functions | |
| static TimerManager & | global () |
Private Types | |
| typedef std::list< int32_t > | L_int32 |
| typedef std::shared_ptr< TimerInfo > | TimerInfoPtr |
| typedef std::weak_ptr< TimerInfo > | TimerInfoWPtr |
| typedef std::vector< TimerInfoPtr > | V_TimerInfo |
Private Member Functions | |
| TimerInfoPtr | findTimer (int32_t handle) |
| void | schedule (const TimerInfoPtr &info) |
| void | threadFunc () |
| void | updateNext (const TimerInfoPtr &info, const T ¤t_time) |
| bool | waitingCompare (int32_t lhs, int32_t rhs) |
Private Attributes | |
| uint32_t | id_counter_ |
| std::mutex | id_mutex_ |
| volatile bool | new_timer_ |
| bool | quit_ |
| std::thread | thread_ |
| bool | thread_started_ |
| V_TimerInfo | timers_ |
| std::condition_variable | timers_cond_ |
| std::mutex | timers_mutex_ |
| L_int32 | waiting_ |
| std::mutex | waiting_mutex_ |
Definition at line 39 of file internal_timer_manager.h.
|
private |
Definition at line 87 of file timer_manager.h.
|
private |
Definition at line 83 of file timer_manager.h.
|
private |
Definition at line 84 of file timer_manager.h.
|
private |
Definition at line 85 of file timer_manager.h.
| roswrap::TimerManager< T, D, E >::TimerManager |
Definition at line 209 of file timer_manager.h.
| roswrap::TimerManager< T, D, E >::~TimerManager |
Definition at line 216 of file timer_manager.h.
| int32_t roswrap::TimerManager< T, D, E >::add | ( | const D & | period, |
| const std::function< void(const E &)> & | callback, | ||
| CallbackQueueInterface * | callback_queue, | ||
| const VoidConstPtr & | tracked_object, | ||
| bool | oneshot | ||
| ) |
Definition at line 283 of file timer_manager.h.
|
private |
Definition at line 243 of file timer_manager.h.
|
inlinestatic |
Definition at line 99 of file timer_manager.h.
| bool roswrap::TimerManager< T, D, E >::hasPending | ( | int32_t | handle | ) |
Definition at line 259 of file timer_manager.h.
| void roswrap::TimerManager< T, D, E >::remove | ( | int32_t | handle | ) |
Definition at line 332 of file timer_manager.h.
|
private |
Definition at line 373 of file timer_manager.h.
| void roswrap::TimerManager< T, D, E >::setPeriod | ( | int32_t | handle, |
| const D & | period, | ||
| bool | reset = true |
||
| ) |
Definition at line 423 of file timer_manager.h.
|
private |
Definition at line 470 of file timer_manager.h.
|
private |
Definition at line 396 of file timer_manager.h.
|
private |
Definition at line 230 of file timer_manager.h.
|
private |
Definition at line 121 of file timer_manager.h.
|
private |
Definition at line 122 of file timer_manager.h.
|
private |
Definition at line 116 of file timer_manager.h.
|
private |
Definition at line 128 of file timer_manager.h.
|
private |
Definition at line 126 of file timer_manager.h.
|
private |
Definition at line 124 of file timer_manager.h.
|
private |
Definition at line 113 of file timer_manager.h.
|
private |
Definition at line 115 of file timer_manager.h.
|
private |
Definition at line 114 of file timer_manager.h.
|
private |
Definition at line 119 of file timer_manager.h.
|
private |
Definition at line 118 of file timer_manager.h.