38 #ifndef ROSFLIGHT_ROS_TIMER_H 39 #define ROSFLIGHT_ROS_TIMER_H 53 inline ROSTimer(std::chrono::nanoseconds period,
54 std::function<
void()> callback,
56 const bool autostart) :
77 inline std::shared_ptr<mavrosflight::TimerInterface>
create_timer(std::chrono::nanoseconds period,
78 std::function<
void()> callback,
79 const bool oneshot =
false,
80 const bool autostart =
true)
82 return std::make_shared<ROSTimer>(period, callback, oneshot, autostart);
std::function< void()> callback_
std::shared_ptr< mavrosflight::TimerInterface > create_timer(std::chrono::nanoseconds period, std::function< void()> callback, const bool oneshot=false, const bool autostart=true)
ROSTimer(std::chrono::nanoseconds period, std::function< void()> callback, const bool oneshot, const bool autostart)
Abstracts basic timer functionality.
Timer createTimer(Rate r, Handler h, Obj o, bool oneshot=false, bool autostart=true) const
Provide an interface for creating timers.
void callback_ros_(const ros::TimerEvent &event) const