Go to the documentation of this file.
28 #include "ros/timer.h"
29 #include "ros/timer_manager.h"
41 ROS_DEBUG(
"Timer deregistering callbacks.");
47 return !period_.isZero();
55 if (has_tracked_object_)
57 tracked_object = tracked_object_.lock();
77 if (!
isValid() || timer_handle_ == -1)
131 return impl_->hasPending();
141 impl_->setPeriod(period, reset);
void setPeriod(const Duration &period, bool reset=true)
Encapsulates all options available for starting a timer.
void start()
Start the timer. Does nothing if the timer is already started.
void stop()
Stop the timer. Once this call returns, no more callbacks will be called. Does nothing if the timer i...
bool hasPending(int32_t handle)
static TimerManager & global()
void remove(int32_t handle)
Manages a timer callback.
Duration period
The period to call the callback at.
VoidConstPtr tracked_object
Duration representation for use with the Time class.
void setPeriod(int32_t handle, const D &period, bool reset=true)
int32_t add(const D &period, const std::function< void(const E &)> &callback, CallbackQueueInterface *callback_queue, const VoidConstPtr &tracked_object, bool oneshot)
void setPeriod(const Duration &period, bool reset=true)
Set the period of this timer.
CallbackQueueInterface * callback_queue
Queue to add callbacks to. If NULL, the global callback queue will be used.
bool hasPending()
Returns whether or not the timer has any pending events to call.
std::shared_ptr< void const > VoidConstPtr
TimerCallback callback
The callback to call.
sick_scan_xd
Author(s): Michael Lehning
, Jochen Sprickerhof , Martin Günther
autogenerated on Fri Oct 25 2024 02:47:12