ROS 2 rclcpp + rcl - rolling  rolling-a919a6e5
ROS 2 C++ Client Library with ROS Client Library
subscription_intra_process_base.cpp
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 #include "rclcpp/experimental/subscription_intra_process_base.hpp"
16 #include "rclcpp/detail/add_guard_condition_to_rcl_wait_set.hpp"
17 
19 
20 void
21 SubscriptionIntraProcessBase::add_to_wait_set(rcl_wait_set_t & wait_set)
22 {
23  detail::add_guard_condition_to_rcl_wait_set(wait_set, gc_);
24 }
25 
26 const char *
27 SubscriptionIntraProcessBase::get_topic_name() const
28 {
29  return topic_name_.c_str();
30 }
31 
33 SubscriptionIntraProcessBase::get_actual_qos() const
34 {
35  return qos_profile_;
36 }
37 
38 bool
39 SubscriptionIntraProcessBase::is_durability_transient_local() const
40 {
41  return qos_profile_.durability() == rclcpp::DurabilityPolicy::TransientLocal;
42 }
Encapsulation of Quality of Service settings.
Definition: qos.hpp:116
QoS & durability(rmw_qos_durability_policy_t durability)
Set the durability setting.
Definition: qos.cpp:184
Container for subscription's, guard condition's, etc to be waited on.
Definition: wait.h:42