File tree Expand file tree Collapse file tree 3 files changed +45
-0
lines changed
include/rclcpp/node_interfaces
src/rclcpp/node_interfaces Expand file tree Collapse file tree 3 files changed +45
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,18 @@ class NodeGraph : public NodeGraphInterface
8585 size_t
8686 count_subscribers (const std::string & topic_name) const override ;
8787
88+ RCLCPP_PUBLIC
89+ std::vector<rmw_topic_info_t >
90+ get_publishers_info_by_topic (
91+ const std::string & topic_name,
92+ bool no_demangle = false ) const override ;
93+
94+ RCLCPP_PUBLIC
95+ std::vector<rmw_topic_info_t >
96+ get_subscriptions_info_by_topic (
97+ const std::string & topic_name,
98+ bool no_demangle = false ) const override ;
99+
88100 RCLCPP_PUBLIC
89101
90102 const rcl_guard_condition_t *
Original file line number Diff line number Diff line change 2222#include < vector>
2323
2424#include " rcl/guard_condition.h"
25+ #include " rmw/topic_info.h"
2526
2627#include " rclcpp/event.hpp"
2728#include " rclcpp/macros.hpp"
@@ -89,6 +90,22 @@ class NodeGraphInterface
8990 size_t
9091 count_subscribers (const std::string & topic_name) const = 0 ;
9192
93+ // / Return a vector of publisher infos publishing to a given topic.
94+ RCLCPP_PUBLIC
95+ virtual
96+ std::vector<rmw_topic_info_t >
97+ get_publishers_info_by_topic (
98+ const std::string & topic_name,
99+ bool no_demangle = false ) const = 0 ;
100+
101+ // / Return a vector of subscription infos publishing to a given topic.
102+ RCLCPP_PUBLIC
103+ virtual
104+ std::vector<rmw_topic_info_t >
105+ get_subscriptions_info_by_topic (
106+ const std::string & topic_name,
107+ bool no_demangle = false ) const = 0 ;
108+
92109 // / Return the rcl guard condition which is triggered when the ROS graph changes.
93110 RCLCPP_PUBLIC
94111 virtual
Original file line number Diff line number Diff line change @@ -266,6 +266,22 @@ NodeGraph::count_subscribers(const std::string & topic_name) const
266266 return count;
267267}
268268
269+ std::vector<rmw_topic_info_t >
270+ NodeGraph::get_publishers_info_by_topic (
271+ const std::string & /* topic_name*/ ,
272+ bool /* no_demangle*/ ) const
273+ {
274+ return std::vector<rmw_topic_info_t >();
275+ }
276+
277+ std::vector<rmw_topic_info_t >
278+ NodeGraph::get_subscriptions_info_by_topic (
279+ const std::string & /* topic_name*/ ,
280+ bool /* no_demangle*/ ) const
281+ {
282+ return std::vector<rmw_topic_info_t >();
283+ }
284+
269285const rcl_guard_condition_t *
270286NodeGraph::get_graph_guard_condition () const
271287{
You can’t perform that action at this time.
0 commit comments