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"
26 #include "rclcpp/publisher.hpp"
29 
30 namespace rclcpp
31 {
32 namespace node_interfaces
33 {
34 
37 {
38 public:
40 
43 
45  ~NodeTopics() override;
46 
50  const std::string & topic_name,
51  const rclcpp::PublisherFactory & publisher_factory,
52  const rclcpp::QoS & qos) override;
53 
55  void
58  rclcpp::callback_group::CallbackGroup::SharedPtr callback_group) override;
59 
63  const std::string & topic_name,
64  const rclcpp::SubscriptionFactory & subscription_factory,
65  const rclcpp::QoS & qos) override;
66 
68  void
71  rclcpp::callback_group::CallbackGroup::SharedPtr callback_group) override;
72 
75  get_node_base_interface() const override;
76 
77 private:
78  RCLCPP_DISABLE_COPY(NodeTopics)
79 
81 };
82 
83 } // namespace node_interfaces
84 } // namespace rclcpp
85 
86 #endif // RCLCPP__NODE_INTERFACES__NODE_TOPICS_HPP_
void add_subscription(rclcpp::SubscriptionBase::SharedPtr subscription, rclcpp::callback_group::CallbackGroup::SharedPtr callback_group) override
#define RCLCPP_DISABLE_COPY(...)
Definition: macros.hpp:26
Encapsulation of Quality of Service settings.
Definition: qos.hpp:55
#define RCLCPP_SMART_PTR_ALIASES_ONLY(...)
Definition: macros.hpp:66
rclcpp::node_interfaces::NodeBaseInterface * get_node_base_interface() const override
This header provides the get_node_base_interface() template function.
Definition: allocator_common.hpp:24
Factory with functions used to create a MessageT specific PublisherT.
Definition: publisher_factory.hpp:50
void add_publisher(rclcpp::PublisherBase::SharedPtr publisher, rclcpp::callback_group::CallbackGroup::SharedPtr callback_group) override
NodeTopics(rclcpp::node_interfaces::NodeBaseInterface *node_base)
rclcpp::SubscriptionBase::SharedPtr create_subscription(const std::string &topic_name, const rclcpp::SubscriptionFactory &subscription_factory, const rclcpp::QoS &qos) override
Pure virtual interface class for the NodeBase part of the Node API.
Definition: node_base_interface.hpp:36
Factory containing a function used to create a Subscription<MessageT>.
Definition: subscription_factory.hpp:53
#define RCLCPP_PUBLIC
Definition: visibility_control.hpp:50
Set the data type used in the intra-process buffer as std::shared_ptr<MessageT>
Pure virtual interface class for the NodeTopics part of the Node API.
Definition: node_topics_interface.hpp:38
Implementation of the NodeTopics part of the Node API.
Definition: node_topics.hpp:36
rclcpp::PublisherBase::SharedPtr create_publisher(const std::string &topic_name, const rclcpp::PublisherFactory &publisher_factory, const rclcpp::QoS &qos) override