rclcpp  master
C++ ROS Client Library API
executable_list.hpp
Go to the documentation of this file.
1 // Copyright 2019 Nobleo Technology
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__EXPERIMENTAL__EXECUTABLE_LIST_HPP_
16 #define RCLCPP__EXPERIMENTAL__EXECUTABLE_LIST_HPP_
17 
18 #include <memory>
19 #include <vector>
20 
21 #include "rclcpp/client.hpp"
22 #include "rclcpp/service.hpp"
24 #include "rclcpp/timer.hpp"
26 #include "rclcpp/waitable.hpp"
27 
28 namespace rclcpp
29 {
30 namespace experimental
31 {
32 
34 class ExecutableList final
35 {
36 public:
39 
42 
44  void
45  clear();
46 
48  void
49  add_subscription(rclcpp::SubscriptionBase::SharedPtr subscription);
50 
52  void
53  add_timer(rclcpp::TimerBase::SharedPtr timer);
54 
56  void
57  add_service(rclcpp::ServiceBase::SharedPtr service);
58 
60  void
61  add_client(rclcpp::ClientBase::SharedPtr client);
62 
64  void
65  add_waitable(rclcpp::Waitable::SharedPtr waitable);
66 
67  // Vector containing the SubscriptionBase of all the subscriptions added to the executor.
69  // Contains the count of added subscriptions
71  // Vector containing the TimerBase of all the timers added to the executor.
73  // Contains the count of added timers
75  // Vector containing the ServiceBase of all the services added to the executor.
77  // Contains the count of added services
79  // Vector containing the ClientBase of all the clients added to the executor.
81  // Contains the count of added clients
83  // Vector containing all the waitables added to the executor.
85  // Contains the count of added waitables
87 };
88 
89 } // namespace experimental
90 } // namespace rclcpp
91 
92 #endif // RCLCPP__EXPERIMENTAL__EXECUTABLE_LIST_HPP_
client.hpp
rclcpp::experimental::ExecutableList::add_timer
void add_timer(rclcpp::TimerBase::SharedPtr timer)
rclcpp::experimental::ExecutableList::add_client
void add_client(rclcpp::ClientBase::SharedPtr client)
rclcpp::experimental::ExecutableList::waitable
std::vector< rclcpp::Waitable::SharedPtr > waitable
Definition: executable_list.hpp:84
rclcpp::experimental::ExecutableList::add_waitable
void add_waitable(rclcpp::Waitable::SharedPtr waitable)
std::vector< rclcpp::SubscriptionBase::SharedPtr >
rclcpp::experimental::ExecutableList::number_of_clients
size_t number_of_clients
Definition: executable_list.hpp:82
rclcpp::experimental::ExecutableList::add_subscription
void add_subscription(rclcpp::SubscriptionBase::SharedPtr subscription)
subscription_base.hpp
rclcpp
This header provides the get_node_base_interface() template function.
Definition: allocator_common.hpp:24
timer.hpp
rclcpp::experimental::ExecutableList::service
std::vector< rclcpp::ServiceBase::SharedPtr > service
Definition: executable_list.hpp:76
RCLCPP_PUBLIC
#define RCLCPP_PUBLIC
Definition: visibility_control.hpp:50
rclcpp::experimental::ExecutableList
This class contains subscriptionbase, timerbase, etc. which can be used to run callbacks.
Definition: executable_list.hpp:34
rclcpp::experimental::ExecutableList::client
std::vector< rclcpp::ClientBase::SharedPtr > client
Definition: executable_list.hpp:80
rclcpp::experimental::ExecutableList::subscription
std::vector< rclcpp::SubscriptionBase::SharedPtr > subscription
Definition: executable_list.hpp:68
rclcpp::experimental::ExecutableList::ExecutableList
ExecutableList()
rclcpp::experimental::ExecutableList::clear
void clear()
rclcpp::experimental::ExecutableList::number_of_waitables
size_t number_of_waitables
Definition: executable_list.hpp:86
rclcpp::experimental::ExecutableList::add_service
void add_service(rclcpp::ServiceBase::SharedPtr service)
visibility_control.hpp
rclcpp::experimental::ExecutableList::number_of_timers
size_t number_of_timers
Definition: executable_list.hpp:74
rclcpp::experimental::ExecutableList::number_of_services
size_t number_of_services
Definition: executable_list.hpp:78
rclcpp::experimental::ExecutableList::~ExecutableList
~ExecutableList()
service.hpp
waitable.hpp
rclcpp::experimental::ExecutableList::timer
std::vector< rclcpp::TimerBase::SharedPtr > timer
Definition: executable_list.hpp:72
rclcpp::experimental::ExecutableList::number_of_subscriptions
size_t number_of_subscriptions
Definition: executable_list.hpp:70