rcl  master
C API providing common ROS client library functionality.
remap.h
Go to the documentation of this file.
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 
16 
17 #ifndef RCL__REMAP_H_
18 #define RCL__REMAP_H_
19 
20 #include "rcl/allocator.h"
21 #include "rcl/arguments.h"
22 #include "rcl/macros.h"
23 #include "rcl/types.h"
24 #include "rcl/visibility_control.h"
25 
26 #ifdef __cplusplus
27 extern "C"
28 {
29 #endif
30 
31 struct rcl_remap_impl_t;
32 
34 typedef struct rcl_remap_t
35 {
37  struct rcl_remap_impl_t * impl;
38 } rcl_remap_t;
39 
41 RCL_PUBLIC
42 RCL_WARN_UNUSED
45 
46 // TODO(sloretz) add documentation about rostopic:// when it is supported
48 
109 RCL_PUBLIC
110 RCL_WARN_UNUSED
111 rcl_ret_t
113  const rcl_arguments_t * local_arguments,
114  const rcl_arguments_t * global_arguments,
115  const char * topic_name,
116  const char * node_name,
117  const char * node_namespace,
118  rcl_allocator_t allocator,
119  char ** output_name);
120 
121 // TODO(sloretz) add documentation about rosservice:// when it is supported
123 
154 RCL_PUBLIC
155 RCL_WARN_UNUSED
156 rcl_ret_t
158  const rcl_arguments_t * local_arguments,
159  const rcl_arguments_t * global_arguments,
160  const char * service_name,
161  const char * node_name,
162  const char * node_namespace,
163  rcl_allocator_t allocator,
164  char ** output_name);
165 
167 
201 RCL_PUBLIC
202 RCL_WARN_UNUSED
203 rcl_ret_t
205  const rcl_arguments_t * local_arguments,
206  const rcl_arguments_t * global_arguments,
207  const char * node_name,
208  rcl_allocator_t allocator,
209  char ** output_name);
210 
212 
242 RCL_PUBLIC
243 RCL_WARN_UNUSED
244 rcl_ret_t
246  const rcl_arguments_t * local_arguments,
247  const rcl_arguments_t * global_arguments,
248  const char * node_name,
249  rcl_allocator_t allocator,
250  char ** output_namespace);
251 
253 
270 RCL_PUBLIC
271 RCL_WARN_UNUSED
272 rcl_ret_t
274  const rcl_remap_t * rule,
275  rcl_remap_t * rule_out);
276 
278 
292 RCL_PUBLIC
293 RCL_WARN_UNUSED
294 rcl_ret_t
296  rcl_remap_t * remap);
297 
298 #ifdef __cplusplus
299 }
300 #endif
301 
302 #endif // RCL__REMAP_H_
types.h
rcl_ret_t
rmw_ret_t rcl_ret_t
The type that holds an rcl return code.
Definition: types.h:23
rcl_remap_topic_name
rcl_ret_t rcl_remap_topic_name(const rcl_arguments_t *local_arguments, const rcl_arguments_t *global_arguments, const char *topic_name, const char *node_name, const char *node_namespace, rcl_allocator_t allocator, char **output_name)
Remap a topic name based on given rules.
rcl_remap_t
struct rcl_remap_t rcl_remap_t
Hold remapping rules.
rcl_arguments_t
Hold output of parsing command line arguments.
Definition: arguments.h:35
arguments.h
rcl_remap_copy
rcl_ret_t rcl_remap_copy(const rcl_remap_t *rule, rcl_remap_t *rule_out)
Copy one remap structure into another.
rcl_remap_t
Hold remapping rules.
Definition: remap.h:34
rcutils_allocator_t
rcl_remap_fini
rcl_ret_t rcl_remap_fini(rcl_remap_t *remap)
Reclaim resources held inside rcl_remap_t structure.
allocator.h
rcl_remap_node_namespace
rcl_ret_t rcl_remap_node_namespace(const rcl_arguments_t *local_arguments, const rcl_arguments_t *global_arguments, const char *node_name, rcl_allocator_t allocator, char **output_namespace)
Remap a namespace based on given rules.
rcl_get_zero_initialized_remap
rcl_remap_t rcl_get_zero_initialized_remap(void)
Return a rcl_remap_t struct with members initialized to NULL.
rcl_remap_service_name
rcl_ret_t rcl_remap_service_name(const rcl_arguments_t *local_arguments, const rcl_arguments_t *global_arguments, const char *service_name, const char *node_name, const char *node_namespace, rcl_allocator_t allocator, char **output_name)
Remap a service name based on given rules.
rcl_remap_node_name
rcl_ret_t rcl_remap_node_name(const rcl_arguments_t *local_arguments, const rcl_arguments_t *global_arguments, const char *node_name, rcl_allocator_t allocator, char **output_name)
Remap a node name based on given rules.
rcl_remap_t::impl
struct rcl_remap_impl_t * impl
Private implementation pointer.
Definition: remap.h:37