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 
15 #ifndef RCL__REMAP_H_
16 #define RCL__REMAP_H_
17 
18 #include "rcl/allocator.h"
19 #include "rcl/arguments.h"
20 #include "rcl/macros.h"
21 #include "rcl/types.h"
22 #include "rcl/visibility_control.h"
23 
24 #ifdef __cplusplus
25 extern "C"
26 {
27 #endif
28 
29 struct rcl_remap_impl_t;
30 
32 typedef struct rcl_remap_t
33 {
35  struct rcl_remap_impl_t * impl;
36 } rcl_remap_t;
37 
43 
44 // TODO(sloretz) add documentation about rostopic:// when it is supported
46 
109 rcl_ret_t
111  const rcl_arguments_t * local_arguments,
112  const rcl_arguments_t * global_arguments,
113  const char * topic_name,
114  const char * node_name,
115  const char * node_namespace,
116  rcl_allocator_t allocator,
117  char ** output_name);
118 
119 // TODO(sloretz) add documentation about rosservice:// when it is supported
121 
154 rcl_ret_t
156  const rcl_arguments_t * local_arguments,
157  const rcl_arguments_t * global_arguments,
158  const char * service_name,
159  const char * node_name,
160  const char * node_namespace,
161  rcl_allocator_t allocator,
162  char ** output_name);
163 
165 
201 rcl_ret_t
203  const rcl_arguments_t * local_arguments,
204  const rcl_arguments_t * global_arguments,
205  const char * node_name,
206  rcl_allocator_t allocator,
207  char ** output_name);
208 
210 
242 rcl_ret_t
244  const rcl_arguments_t * local_arguments,
245  const rcl_arguments_t * global_arguments,
246  const char * node_name,
247  rcl_allocator_t allocator,
248  char ** output_namespace);
249 
251 
267 rcl_ret_t
269  rcl_remap_t * remap);
270 
271 #ifdef __cplusplus
272 }
273 #endif
274 
275 #endif // RCL__REMAP_H_
rmw_ret_t rcl_ret_t
Definition: types.h:20
struct rcl_remap_t rcl_remap_t
Hold remapping rules.
Hold output of parsing command line arguments.
Definition: arguments.h:31
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_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.
#define RCL_WARN_UNUSED
Ignored return values of functions with this macro will emit a warning.
Definition: macros.h:25
#define RCL_PUBLIC
Definition: visibility_control.h:48
rcl_remap_t rcl_get_zero_initialized_remap(void)
Return a rcl_remap_t struct with members initialized to NULL.
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.
Hold remapping rules.
Definition: remap.h:32
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.
struct rcl_remap_impl_t * impl
Private implementation pointer.
Definition: remap.h:35
rcl_ret_t rcl_remap_fini(rcl_remap_t *remap)
Reclaim resources held inside rcl_remap_t structure.