ROS 2 rclcpp + rcl - rolling  rolling-e7363f10
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/remap.h"
20 #include "rcl/types.h"
21 #include "rcl/visibility_control.h"
22 
23 #include "rcutils/types/string_map.h"
24 
25 #ifdef __cplusplus
26 extern "C"
27 {
28 #endif
29 
31 typedef enum rcl_remap_type_t
32 {
33  RCL_UNKNOWN_REMAP = 0,
34  RCL_TOPIC_REMAP = 1u << 0,
35  RCL_SERVICE_REMAP = 1u << 1,
36  RCL_NODENAME_REMAP = 1u << 2,
37  RCL_NAMESPACE_REMAP = 1u << 3
38 } rcl_remap_type_t;
39 
41 {
43  rcl_remap_type_t type;
45  char * node_name;
47  char * match;
49  char * replacement;
50 
53 };
54 
55 RCL_LOCAL
57 rcl_remap_name(
58  const rcl_arguments_t * local_arguments,
59  const rcl_arguments_t * global_arguments,
60  rcl_remap_type_t type_bitmask,
61  const char * name,
62  const char * node_name,
63  const char * node_namespace,
64  const rcutils_string_map_t * substitutions,
65  rcl_allocator_t allocator,
66  char ** output_name);
67 
68 #ifdef __cplusplus
69 }
70 #endif
71 
72 #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:49
char * node_name
A node name that this rule is limited to, or NULL if it applies to any node.
Definition: remap_impl.h:45
rcl_allocator_t allocator
Allocator used to allocate objects in this struct.
Definition: remap_impl.h:52
char * match
Match portion of a rule, or NULL if node name or namespace replacement.
Definition: remap_impl.h:47
rcl_remap_type_t type
Bitmask indicating what type of rule this is.
Definition: remap_impl.h:43
rmw_ret_t rcl_ret_t
The type that holds an rcl return code.
Definition: types.h:25