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_
34 namespace graph_listener
66 explicit GraphListener(
const rclcpp::Context::SharedPtr & parent_context);
183 std::atomic_bool is_shutdown_;
186 mutable std::mutex node_graph_interfaces_barrier_mutex_;
187 mutable std::mutex node_graph_interfaces_mutex_;
197 #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
GraphListener(const rclcpp::Context::SharedPtr &parent_context)
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.
rcl_guard_condition_t rcl_get_zero_initialized_guard_condition(void)
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
rcl_wait_set_t rcl_get_zero_initialized_wait_set(void)
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
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