15 #ifndef RCLCPP__CREATE_TIMER_HPP_ 16 #define RCLCPP__CREATE_TIMER_HPP_ 32 template<
typename CallbackT>
39 CallbackT && callback,
40 rclcpp::callback_group::CallbackGroup::SharedPtr group =
nullptr)
45 std::forward<CallbackT>(callback),
53 template<
typename NodeT,
typename CallbackT>
59 CallbackT && callback,
60 rclcpp::callback_group::CallbackGroup::SharedPtr group =
nullptr)
67 std::forward<CallbackT>(callback),
73 #endif // RCLCPP__CREATE_TIMER_HPP_
virtual rclcpp::Context::SharedPtr get_context()=0
Return the context of the node.
DurationT to_chrono() const
Definition: duration.hpp:105
This header provides the get_node_base_interface() template function.
Definition: allocator_common.hpp:24
rclcpp::node_interfaces::NodeTimersInterface * get_node_timers_interface(NodeType node_pointer)
Get the NodeTimersInterface as a pointer from a pointer to a "Node like" object.
Definition: get_node_timers_interface.hpp:126
virtual void add_timer(rclcpp::TimerBase::SharedPtr timer, rclcpp::callback_group::CallbackGroup::SharedPtr callback_group)=0
Add a timer to the node.
Generic timer. Periodically executes a user-specified callback.
Definition: timer.hpp:121
rclcpp::TimerBase::SharedPtr create_timer(node_interfaces::NodeBaseInterface *node_base, node_interfaces::NodeTimersInterface *node_timers, rclcpp::Clock::SharedPtr clock, rclcpp::Duration period, CallbackT &&callback, rclcpp::callback_group::CallbackGroup::SharedPtr group=nullptr)
Definition: create_timer.hpp:34
rclcpp::node_interfaces::NodeBaseInterface * get_node_base_interface(NodeType node_pointer)
Get the NodeBaseInterface as a pointer from a pointer to a "Node like" object.
Definition: get_node_base_interface.hpp:126
Definition: duration.hpp:26
Pure virtual interface class for the NodeBase part of the Node API.
Definition: node_base_interface.hpp:36
Pure virtual interface class for the NodeTimers part of the Node API.
Definition: node_timers_interface.hpp:29
Set the data type used in the intra-process buffer as std::shared_ptr<MessageT>