rmw_dds_common  master
Define a common interface between DDS implementations of ROS middleware.
context.hpp
Go to the documentation of this file.
1 // Copyright 2019 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 RMW_DDS_COMMON__CONTEXT_HPP_
16 #define RMW_DDS_COMMON__CONTEXT_HPP_
17 
18 #include <atomic>
19 #include <mutex>
20 #include <thread>
21 
22 #include "rmw/types.h"
23 
26 
27 namespace rmw_dds_common
28 {
29 
30 struct Context
31 {
38  std::atomic_bool thread_is_running;
41 };
42 
43 } // namespace rmw_dds_common
44 
45 #endif // RMW_DDS_COMMON__CONTEXT_HPP_
rmw_dds_common::Context::gid
rmw_gid_t gid
Definition: context.hpp:32
rmw_dds_common::Context::graph_guard_condition
rmw_guard_condition_t * graph_guard_condition
Definition: context.hpp:40
rmw_dds_common::GraphCache
Graph cache data structure.
Definition: graph_cache.hpp:50
rmw_guard_condition_t
rmw_dds_common::Context
Definition: context.hpp:30
rmw_dds_common
Definition: context.hpp:27
rmw_dds_common::Context::graph_cache
GraphCache graph_cache
Definition: context.hpp:35
rmw_dds_common::Context::thread_is_running
std::atomic_bool thread_is_running
Definition: context.hpp:38
rmw_dds_common::Context::listener_thread_gc
rmw_guard_condition_t * listener_thread_gc
Definition: context.hpp:39
rmw_subscription_t
rmw_dds_common::Context::listener_thread
std::thread listener_thread
Definition: context.hpp:37
std::thread
rmw_dds_common::Context::node_update_mutex
std::mutex node_update_mutex
Definition: context.hpp:36
rmw_publisher_t
visibility_control.h
rmw_gid_t
graph_cache.hpp
std::mutex
rmw_dds_common::Context::sub
rmw_subscription_t * sub
Definition: context.hpp:34
types.h
rmw_dds_common::Context::pub
rmw_publisher_t * pub
Definition: context.hpp:33