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

@ -290,6 +290,18 @@ LifecycleNode::count_subscribers(const std::string & topic_name) const
return node_graph_->count_subscribers(topic_name);
}
std::vector<rclcpp::TopicEndpointInfo>
LifecycleNode::get_publishers_info_by_topic(const std::string & topic_name, bool no_mangle) const
{
return node_graph_->get_publishers_info_by_topic(topic_name, no_mangle);
}
std::vector<rclcpp::TopicEndpointInfo>
LifecycleNode::get_subscriptions_info_by_topic(const std::string & topic_name, bool no_mangle) const
{
return node_graph_->get_subscriptions_info_by_topic(topic_name, no_mangle);
}
const std::vector<rclcpp::callback_group::CallbackGroup::WeakPtr> &
LifecycleNode::get_callback_groups() const
{