ROS 2 rclcpp + rcl - humble  humble
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 "rmw/init.h"
26 
27 #include "rcl/allocator.h"
28 #include "rcl/macros.h"
29 #include "rcl/types.h"
30 #include "rcl/visibility_control.h"
31 
33 
35 typedef struct rcl_init_options_s
36 {
40 
42 RCL_PUBLIC
43 RCL_WARN_UNUSED
46 
48 
72 RCL_PUBLIC
73 RCL_WARN_UNUSED
76 
78 
104 RCL_PUBLIC
105 RCL_WARN_UNUSED
106 rcl_ret_t
108 
110 
127 RCL_PUBLIC
128 RCL_WARN_UNUSED
129 rcl_ret_t
131 
133 
149 RCL_PUBLIC
150 RCL_WARN_UNUSED
151 rcl_ret_t
152 rcl_init_options_get_domain_id(const rcl_init_options_t * init_options, size_t * domain_id);
153 
155 
171 RCL_PUBLIC
172 RCL_WARN_UNUSED
173 rcl_ret_t
174 rcl_init_options_set_domain_id(rcl_init_options_t * init_options, size_t domain_id);
175 
177 
196 RCL_PUBLIC
197 RCL_WARN_UNUSED
198 rmw_init_options_t *
200 
202 
221 RCL_PUBLIC
222 RCL_WARN_UNUSED
223 const rcl_allocator_t *
225 
226 #ifdef __cplusplus
227 }
228 #endif
229 
230 #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:54
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:152
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:82
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:30
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:142
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:169
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:126
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:161
Encapsulation of init options and implementation defined init options.
Definition: init_options.h:36
rcl_init_options_impl_t * impl
Implementation specific pointer.
Definition: init_options.h:38
rmw_ret_t rcl_ret_t
The type that holds an rcl return code.
Definition: types.h:23