rclcpp
master
C++ ROS Client Library API
|
Go to the documentation of this file.
15 #ifndef RCLCPP__GRAPH_LISTENER_HPP_
16 #define RCLCPP__GRAPH_LISTENER_HPP_
24 #include "rcl/guard_condition.h"
34 namespace graph_listener
170 rclcpp::Context::WeakPtr parent_context_;
174 std::atomic_bool is_shutdown_;
177 mutable std::mutex node_graph_interfaces_barrier_mutex_;
178 mutable std::mutex node_graph_interfaces_mutex_;
189 #endif // RCLCPP__GRAPH_LISTENER_HPP_
virtual void start_if_not_started()
Start the graph listener's listen thread if it hasn't been started.
#define RCLCPP_DISABLE_COPY(...)
Definition: macros.hpp:26
NodeAlreadyAddedError()
Definition: graph_listener.hpp:49
virtual void shutdown()
Stop the listening thread.
NodeNotFoundError()
Definition: graph_listener.hpp:57
This header provides the get_node_base_interface() template function.
Definition: allocator_common.hpp:24
#define RCLCPP_PUBLIC
Definition: visibility_control.hpp:50
virtual void add_node(rclcpp::node_interfaces::NodeGraphInterface *node_graph)
Add a node to the graph listener's list of nodes.
virtual bool has_node(rclcpp::node_interfaces::NodeGraphInterface *node_graph)
Return true if the given node is in the graph listener's list of nodes.
Thrown when a node has already been added to the GraphListener.
Definition: graph_listener.hpp:46
Notifies many nodes of graph changes by listening in a thread.
Definition: graph_listener.hpp:62
virtual void remove_node(rclcpp::node_interfaces::NodeGraphInterface *node_graph)
Remove a node from the graph listener's list of nodes.
virtual void run()
Main function for the listening thread.
GraphListenerShutdownError()
Definition: graph_listener.hpp:41
Pure virtual interface class for the NodeGraph part of the Node API.
Definition: node_graph_interface.hpp:136
GraphListener(std::shared_ptr< rclcpp::Context > parent_context)
virtual bool is_shutdown()
Return true if shutdown() has been called, else false.
Thrown when the given node is not in the GraphListener.
Definition: graph_listener.hpp:54
Thrown when a function is called on a GraphListener that is already shutdown.
Definition: graph_listener.hpp:38