rclcpp  master
C++ ROS Client Library API
node_topics_interface.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_INTERFACE_HPP_
16 #define RCLCPP__NODE_INTERFACES__NODE_TOPICS_INTERFACE_HPP_
17 
18 #include <functional>
19 #include <memory>
20 #include <string>
21 
22 #include "rcl/publisher.h"
23 #include "rcl/subscription.h"
24 
26 #include "rclcpp/macros.hpp"
29 #include "rclcpp/publisher.hpp"
31 #include "rclcpp/subscription.hpp"
34 
35 namespace rclcpp
36 {
37 namespace node_interfaces
38 {
39 
42 {
43 public:
45 
47  virtual
48  ~NodeTopicsInterface() = default;
49 
51  virtual
52  rclcpp::PublisherBase::SharedPtr
54  const std::string & topic_name,
55  const rclcpp::PublisherFactory & publisher_factory,
56  const rclcpp::QoS & qos) = 0;
57 
59  virtual
60  void
62  rclcpp::PublisherBase::SharedPtr publisher,
63  rclcpp::CallbackGroup::SharedPtr callback_group) = 0;
64 
66  virtual
67  rclcpp::SubscriptionBase::SharedPtr
69  const std::string & topic_name,
70  const rclcpp::SubscriptionFactory & subscription_factory,
71  const rclcpp::QoS & qos) = 0;
72 
74  virtual
75  void
77  rclcpp::SubscriptionBase::SharedPtr subscription,
78  rclcpp::CallbackGroup::SharedPtr callback_group) = 0;
79 
81  virtual
83  get_node_base_interface() const = 0;
84 
86  virtual
88  get_node_timers_interface() const = 0;
89 };
90 
91 } // namespace node_interfaces
92 } // namespace rclcpp
93 
94 #endif // RCLCPP__NODE_INTERFACES__NODE_TOPICS_INTERFACE_HPP_
callback_group.hpp
std::string
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
rclcpp::node_interfaces::NodeTopicsInterface::create_subscription
virtual rclcpp::SubscriptionBase::SharedPtr create_subscription(const std::string &topic_name, const rclcpp::SubscriptionFactory &subscription_factory, const rclcpp::QoS &qos)=0
rclcpp
This header provides the get_node_base_interface() template function.
Definition: allocator_common.hpp:24
publisher.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:59
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::NodeTopicsInterface::add_publisher
virtual void add_publisher(rclcpp::PublisherBase::SharedPtr publisher, rclcpp::CallbackGroup::SharedPtr callback_group)=0
node_base_interface.hpp
publisher_factory.hpp
rclcpp::node_interfaces::NodeTopicsInterface::get_node_base_interface
virtual rclcpp::node_interfaces::NodeBaseInterface * get_node_base_interface() const =0
rclcpp::node_interfaces::NodeTopicsInterface::get_node_timers_interface
virtual rclcpp::node_interfaces::NodeTimersInterface * get_node_timers_interface() const =0
rclcpp::node_interfaces::NodeTopicsInterface
Pure virtual interface class for the NodeTopics part of the Node API.
Definition: node_topics_interface.hpp:41
subscription_factory.hpp
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::NodeTopicsInterface::~NodeTopicsInterface
virtual ~NodeTopicsInterface()=default
subscription.hpp
rclcpp::node_interfaces::NodeTopicsInterface::create_publisher
virtual rclcpp::PublisherBase::SharedPtr create_publisher(const std::string &topic_name, const rclcpp::PublisherFactory &publisher_factory, const rclcpp::QoS &qos)=0
rclcpp::node_interfaces::NodeTopicsInterface::add_subscription
virtual void add_subscription(rclcpp::SubscriptionBase::SharedPtr subscription, rclcpp::CallbackGroup::SharedPtr callback_group)=0