rcl  master
C API providing common ROS client library functionality.
guard_condition.h
Go to the documentation of this file.
1 // Copyright 2015 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__GUARD_CONDITION_H_
18 #define RCL__GUARD_CONDITION_H_
19 
20 #ifdef __cplusplus
21 extern "C"
22 {
23 #endif
24 
25 #include "rcl/allocator.h"
26 #include "rcl/context.h"
27 #include "rcl/macros.h"
28 #include "rcl/types.h"
29 #include "rcl/visibility_control.h"
30 
32 struct rcl_guard_condition_impl_t;
33 
35 typedef struct rcl_guard_condition_t
36 {
39 
41  struct rcl_guard_condition_impl_t * impl;
43 
46 {
50 
52 RCL_PUBLIC
53 RCL_WARN_UNUSED
56 
58 
96 RCL_PUBLIC
97 RCL_WARN_UNUSED
100  rcl_guard_condition_t * guard_condition,
101  rcl_context_t * context,
102  const rcl_guard_condition_options_t options);
103 
105 
138 rcl_ret_t
140  rcl_guard_condition_t * guard_condition,
141  const rmw_guard_condition_t * rmw_guard_condition,
142  rcl_context_t * context,
143  const rcl_guard_condition_options_t options);
144 
146 
164 RCL_PUBLIC
165 RCL_WARN_UNUSED
166 rcl_ret_t
168 
170 
177 RCL_PUBLIC
178 RCL_WARN_UNUSED
181 
183 
204 RCL_PUBLIC
205 RCL_WARN_UNUSED
206 rcl_ret_t
208 
210 
229 RCL_PUBLIC
230 RCL_WARN_UNUSED
233 
235 
260 RCL_PUBLIC
261 RCL_WARN_UNUSED
264 
265 #ifdef __cplusplus
266 }
267 #endif
268 
269 #endif // RCL__GUARD_CONDITION_H_
rcl_guard_condition_t::impl
struct rcl_guard_condition_impl_t * impl
Pointer to the guard condition implementation.
Definition: guard_condition.h:41
rcl_trigger_guard_condition
rcl_ret_t rcl_trigger_guard_condition(rcl_guard_condition_t *guard_condition)
Trigger a rcl guard condition.
types.h
rcl_ret_t
rmw_ret_t rcl_ret_t
The type that holds an rcl return code.
Definition: types.h:23
rcl_guard_condition_options_t
Options available for a rcl guard condition.
Definition: guard_condition.h:45
rmw_guard_condition_t
rcl_guard_condition_t
Handle for a rcl guard condition.
Definition: guard_condition.h:35
rcl_guard_condition_init_from_rmw
rcl_ret_t rcl_guard_condition_init_from_rmw(rcl_guard_condition_t *guard_condition, const rmw_guard_condition_t *rmw_guard_condition, rcl_context_t *context, const rcl_guard_condition_options_t options)
Same as rcl_guard_condition_init(), but reusing an existing rmw handle.
rcl_guard_condition_options_t::allocator
rcl_allocator_t allocator
Custom allocator for the guard condition, used for internal allocations.
Definition: guard_condition.h:48
rcl_guard_condition_get_default_options
rcl_guard_condition_options_t rcl_guard_condition_get_default_options(void)
Return the default options in a rcl_guard_condition_options_t struct.
rcl_guard_condition_init
rcl_ret_t rcl_guard_condition_init(rcl_guard_condition_t *guard_condition, rcl_context_t *context, const rcl_guard_condition_options_t options)
Initialize a rcl guard_condition.
rcl_get_zero_initialized_guard_condition
rcl_guard_condition_t rcl_get_zero_initialized_guard_condition(void)
Return a rcl_guard_condition_t struct with members set to NULL.
rcl_guard_condition_options_t
struct rcl_guard_condition_options_t rcl_guard_condition_options_t
Options available for a rcl guard condition.
rcl_guard_condition_get_options
const rcl_guard_condition_options_t * rcl_guard_condition_get_options(const rcl_guard_condition_t *guard_condition)
Return the guard condition options.
rcl_guard_condition_get_rmw_handle
rmw_guard_condition_t * rcl_guard_condition_get_rmw_handle(const rcl_guard_condition_t *guard_condition)
Return the rmw guard condition handle.
rcutils_allocator_t
allocator.h
rcl_guard_condition_fini
rcl_ret_t rcl_guard_condition_fini(rcl_guard_condition_t *guard_condition)
Finalize a rcl_guard_condition_t.
rcl_context_t
Encapsulates the non-global state of an init/shutdown cycle.
Definition: context.h:113
context.h
rcl_guard_condition_t
struct rcl_guard_condition_t rcl_guard_condition_t
Handle for a rcl guard condition.
rcl_guard_condition_t::context
rcl_context_t * context
Context associated with this guard condition.
Definition: guard_condition.h:38