ROS 2 rclcpp + rcl - rolling
rolling-4d14414d
ROS 2 C++ Client Library with ROS Client Library
rclcpp
src
rclcpp
detail
resolve_intra_process_buffer_type.cpp
1
// Copyright 2023 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/detail/resolve_intra_process_buffer_type.hpp>
16
17
namespace
rclcpp
18
{
19
20
namespace
detail
21
{
22
rclcpp::IntraProcessBufferType
23
resolve_intra_process_buffer_type(
24
const
rclcpp::IntraProcessBufferType
buffer_type)
25
{
26
if
(buffer_type ==
IntraProcessBufferType::CallbackDefault
) {
27
throw
std::invalid_argument(
28
"IntraProcessBufferType::CallbackDefault is not allowed "
29
"when there is no callback function"
);
30
}
31
32
return
buffer_type;
33
}
34
35
}
// namespace detail
36
37
}
// namespace rclcpp
rclcpp
Versions of rosidl_typesupport_cpp::get_message_type_support_handle that handle adapted types.
Definition:
allocator_common.hpp:26
rclcpp::IntraProcessBufferType
IntraProcessBufferType
Definition:
intra_process_buffer_type.hpp:24
rclcpp::IntraProcessBufferType::CallbackDefault
@ CallbackDefault
Set the data type used in the intra-process buffer as the same used in the callback.
Generated by
1.9.1