ROS 2 rclcpp + rcl - humble  humble
ROS 2 C++ Client Library with ROS Client Library
remap_impl.h
1 // Copyright 2018 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 RCL__REMAP_IMPL_H_
16 #define RCL__REMAP_IMPL_H_
17 
18 #include "rcl/allocator.h"
19 #include "rcl/macros.h"
20 #include "rcl/remap.h"
21 #include "rcl/types.h"
22 #include "rcl/visibility_control.h"
23 
24 #ifdef __cplusplus
25 extern "C"
26 {
27 #endif
28 
30 typedef enum rcl_remap_type_t
31 {
32  RCL_UNKNOWN_REMAP = 0,
33  RCL_TOPIC_REMAP = 1u << 0,
34  RCL_SERVICE_REMAP = 1u << 1,
35  RCL_NODENAME_REMAP = 1u << 2,
36  RCL_NAMESPACE_REMAP = 1u << 3
37 } rcl_remap_type_t;
38 
40 {
42  rcl_remap_type_t type;
44  char * node_name;
46  char * match;
48  char * replacement;
49 
52 };
53 
54 RCL_LOCAL
56 rcl_remap_name(
57  const rcl_arguments_t * local_arguments,
58  const rcl_arguments_t * global_arguments,
59  rcl_remap_type_t type_bitmask,
60  const char * name,
61  const char * node_name,
62  const char * node_namespace,
63  const rcutils_string_map_t * substitutions,
64  rcl_allocator_t allocator,
65  char ** output_name);
66 
67 #ifdef __cplusplus
68 }
69 #endif
70 
71 #endif // RCL__REMAP_IMPL_H_
rcutils_allocator_t rcl_allocator_t
Encapsulation of an allocator.
Definition: allocator.h:31
Hold output of parsing command line arguments.
Definition: arguments.h:36
char * replacement
Replacement portion of a rule.
Definition: remap_impl.h:48
char * node_name
A node name that this rule is limited to, or NULL if it applies to any node.
Definition: remap_impl.h:44
rcl_allocator_t allocator
Allocator used to allocate objects in this struct.
Definition: remap_impl.h:51
char * match
Match portion of a rule, or NULL if node name or namespace replacement.
Definition: remap_impl.h:46
rcl_remap_type_t type
Bitmask indicating what type of rule this is.
Definition: remap_impl.h:42
rmw_ret_t rcl_ret_t
The type that holds an rcl return code.
Definition: types.h:23