Implement functions to get publisher and subcription informations like QoS policies from topic name (#960)

Signed-off-by: Barry Xu <Barry.Xu@sony.com>
Signed-off-by: Miaofei <miaofei@amazon.com>
Co-authored-by: Miaofei Mei <ameision@hotmail.com>
This commit is contained in:
Barry Xu 2020-02-15 04:25:03 +08:00 committed by GitHub
parent 7c1721a0b3
commit 2d9c6ea3a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 530 additions and 1 deletions

View file

@ -439,6 +439,22 @@ public:
size_t
count_subscribers(const std::string & topic_name) const;
/// Return the topic endpoint information about publishers on a given topic.
/**
* \sa rclcpp::Node::get_publishers_info_by_topic
*/
RCLCPP_LIFECYCLE_PUBLIC
std::vector<rclcpp::TopicEndpointInfo>
get_publishers_info_by_topic(const std::string & topic_name, bool no_mangle = false) const;
/// Return the topic endpoint information about subscriptions on a given topic.
/**
* \sa rclcpp::Node::get_subscriptions_info_by_topic
*/
RCLCPP_LIFECYCLE_PUBLIC
std::vector<rclcpp::TopicEndpointInfo>
get_subscriptions_info_by_topic(const std::string & topic_name, bool no_mangle = false) const;
/// Return a graph event, which will be set anytime a graph change occurs.
/* The graph Event object is a loan which must be returned.
* The Event object is scoped and therefore to return the load just let it go