ROS 2 rclcpp + rcl - rolling  rolling-e7363f10
ROS 2 C++ Client Library with ROS Client Library
init_options.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__INIT_OPTIONS_H_
18 #define RCL__INIT_OPTIONS_H_
19 
20 #ifdef __cplusplus
21 extern "C"
22 {
23 #endif
24 
25 #include <stddef.h>
26 
27 #include "rmw/init.h"
28 
29 #include "rcl/allocator.h"
30 #include "rcl/macros.h"
31 #include "rcl/types.h"
32 #include "rcl/visibility_control.h"
33 
35 
37 typedef struct rcl_init_options_s
38 {
42 
44 RCL_PUBLIC
45 RCL_WARN_UNUSED
48 
50 
74 RCL_PUBLIC
75 RCL_WARN_UNUSED
78 
80 
106 RCL_PUBLIC
107 RCL_WARN_UNUSED
108 rcl_ret_t
110 
112 
129 RCL_PUBLIC
130 RCL_WARN_UNUSED
131 rcl_ret_t
133 
135 
151 RCL_PUBLIC
152 RCL_WARN_UNUSED
153 rcl_ret_t
154 rcl_init_options_get_domain_id(const rcl_init_options_t * init_options, size_t * domain_id);
155 
157 
173 RCL_PUBLIC
174 RCL_WARN_UNUSED
175 rcl_ret_t
176 rcl_init_options_set_domain_id(rcl_init_options_t * init_options, size_t domain_id);
177 
179 
198 RCL_PUBLIC
199 RCL_WARN_UNUSED
200 rmw_init_options_t *
202 
204 
223 RCL_PUBLIC
224 RCL_WARN_UNUSED
225 const rcl_allocator_t *
227 
228 #ifdef __cplusplus
229 }
230 #endif
231 
232 #endif // RCL__INIT_OPTIONS_H_
rcutils_allocator_t rcl_allocator_t
Encapsulation of an allocator.
Definition: allocator.h:31
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t rcl_init_options_init(rcl_init_options_t *init_options, rcl_allocator_t allocator)
Initialize given init_options with the default values and implementation specific values.
Definition: init_options.c:62
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t rcl_init_options_set_domain_id(rcl_init_options_t *init_options, size_t domain_id)
Set a domain id in the init options provided.
Definition: init_options.c:166
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t rcl_init_options_copy(const rcl_init_options_t *src, rcl_init_options_t *dst)
Copy the given source init_options to the destination init_options.
Definition: init_options.c:96
RCL_PUBLIC RCL_WARN_UNUSED rcl_init_options_t rcl_get_zero_initialized_init_options(void)
Return a zero initialized rcl_init_options_t struct.
Definition: init_options.c:38
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t rcl_init_options_get_domain_id(const rcl_init_options_t *init_options, size_t *domain_id)
Return the domain_id stored in the init options.
Definition: init_options.c:156
RCL_PUBLIC RCL_WARN_UNUSED const rcl_allocator_t * rcl_init_options_get_allocator(const rcl_init_options_t *init_options)
Return the allocator stored in the init_options.
Definition: init_options.c:183
struct rcl_init_options_s rcl_init_options_t
Encapsulation of init options and implementation defined init options.
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t rcl_init_options_fini(rcl_init_options_t *init_options)
Finalize the given init_options.
Definition: init_options.c:140
RCL_PUBLIC RCL_WARN_UNUSED rmw_init_options_t * rcl_init_options_get_rmw_init_options(rcl_init_options_t *init_options)
Return the rmw init options which are stored internally.
Definition: init_options.c:175
Encapsulation of init options and implementation defined init options.
Definition: init_options.h:38
rcl_init_options_impl_t * impl
Implementation specific pointer.
Definition: init_options.h:40
rmw_ret_t rcl_ret_t
The type that holds an rcl return code.
Definition: types.h:25