rclcpp  master
C++ ROS Client Library API
node_topics.hpp
Go to the documentation of this file.
1 // Copyright 2016 Open Source Robotics Foundation, Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef RCLCPP__NODE_INTERFACES__NODE_TOPICS_HPP_
16 #define RCLCPP__NODE_INTERFACES__NODE_TOPICS_HPP_
17 
18 #include <string>
19 
20 #include "rcl/publisher.h"
21 #include "rcl/subscription.h"
22 
23 #include "rclcpp/macros.hpp"
27 #include "rclcpp/publisher.hpp"
30 
31 namespace rclcpp
32 {
33 namespace node_interfaces
34 {
35 
38 {
39 public:
41 
43  NodeTopics(
46 
48  ~NodeTopics() override;
49 
51  rclcpp::PublisherBase::SharedPtr
53  const std::string & topic_name,
54  const rclcpp::PublisherFactory & publisher_factory,
55  const rclcpp::QoS & qos) override;
56 
58  void
60  rclcpp::PublisherBase::SharedPtr publisher,
61  rclcpp::CallbackGroup::SharedPtr callback_group) override;
62 
64  rclcpp::SubscriptionBase::SharedPtr
66  const std::string & topic_name,
67  const rclcpp::SubscriptionFactory & subscription_factory,
68  const rclcpp::QoS & qos) override;
69 
71  void
73  rclcpp::SubscriptionBase::SharedPtr subscription,
74  rclcpp::CallbackGroup::SharedPtr callback_group) override;
75 
78  get_node_base_interface() const override;
79 
82  get_node_timers_interface() const override;
83 
86  resolve_topic_name(const std::string & name, bool only_expand = false) const override;
87 
88 private:
90 
93 };
94 
95 } // namespace node_interfaces
96 } // namespace rclcpp
97 
98 #endif // RCLCPP__NODE_INTERFACES__NODE_TOPICS_HPP_
std::string
rclcpp::node_interfaces::NodeTopics::NodeTopics
NodeTopics(rclcpp::node_interfaces::NodeBaseInterface *node_base, rclcpp::node_interfaces::NodeTimersInterface *node_timers)
RCLCPP_DISABLE_COPY
#define RCLCPP_DISABLE_COPY(...)
Definition: macros.hpp:26
rclcpp::PublisherFactory
Factory with functions used to create a MessageT specific PublisherT.
Definition: publisher_factory.hpp:50
RCLCPP_SMART_PTR_ALIASES_ONLY
#define RCLCPP_SMART_PTR_ALIASES_ONLY(...)
Definition: macros.hpp:66
subscription.h
publisher.h
rclcpp
This header provides the get_node_base_interface() template function.
Definition: allocator_common.hpp:24
publisher.hpp
node_topics_interface.hpp
RCLCPP_PUBLIC
#define RCLCPP_PUBLIC
Definition: visibility_control.hpp:50
rclcpp::node_interfaces::NodeBaseInterface
Pure virtual interface class for the NodeBase part of the Node API.
Definition: node_base_interface.hpp:36
rclcpp::QoS
Encapsulation of Quality of Service settings.
Definition: qos.hpp:110
macros.hpp
rclcpp::node_interfaces::NodeTimersInterface
Pure virtual interface class for the NodeTimers part of the Node API.
Definition: node_timers_interface.hpp:29
rclcpp::node_interfaces::NodeTopics::create_publisher
rclcpp::PublisherBase::SharedPtr create_publisher(const std::string &topic_name, const rclcpp::PublisherFactory &publisher_factory, const rclcpp::QoS &qos) override
rclcpp::node_interfaces::NodeTopics
Implementation of the NodeTopics part of the Node API.
Definition: node_topics.hpp:37
node_base_interface.hpp
publisher_factory.hpp
rclcpp::node_interfaces::NodeTopics::resolve_topic_name
std::string resolve_topic_name(const std::string &name, bool only_expand=false) const override
Get a remapped and expanded topic name given an input name.
rclcpp::node_interfaces::NodeTopics::~NodeTopics
~NodeTopics() override
rclcpp::node_interfaces::NodeTopicsInterface
Pure virtual interface class for the NodeTopics part of the Node API.
Definition: node_topics_interface.hpp:41
rclcpp::node_interfaces::NodeTopics::add_publisher
void add_publisher(rclcpp::PublisherBase::SharedPtr publisher, rclcpp::CallbackGroup::SharedPtr callback_group) override
rclcpp::node_interfaces::NodeTopics::get_node_base_interface
rclcpp::node_interfaces::NodeBaseInterface * get_node_base_interface() const override
visibility_control.hpp
rclcpp::SubscriptionFactory
Factory containing a function used to create a Subscription<MessageT>.
Definition: subscription_factory.hpp:54
node_timers_interface.hpp
rclcpp::node_interfaces::NodeTopics::get_node_timers_interface
rclcpp::node_interfaces::NodeTimersInterface * get_node_timers_interface() const override
rclcpp::node_interfaces::NodeTopics::add_subscription
void add_subscription(rclcpp::SubscriptionBase::SharedPtr subscription, rclcpp::CallbackGroup::SharedPtr callback_group) override
rclcpp::node_interfaces::NodeTopics::create_subscription
rclcpp::SubscriptionBase::SharedPtr create_subscription(const std::string &topic_name, const rclcpp::SubscriptionFactory &subscription_factory, const rclcpp::QoS &qos) override