rcl  beta1
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 
15 #ifndef RCL__GUARD_CONDITION_H_
16 #define RCL__GUARD_CONDITION_H_
17 
18 #if __cplusplus
19 extern "C"
20 {
21 #endif
22 
23 #include "rcl/allocator.h"
24 #include "rcl/macros.h"
25 #include "rcl/types.h"
26 #include "rcl/visibility_control.h"
27 
29 struct rcl_guard_condition_impl_t;
30 
32 typedef struct rcl_guard_condition_t
33 {
34  struct rcl_guard_condition_impl_t * impl;
36 
39 {
43 
49 
51 
90  rcl_guard_condition_t * guard_condition,
91  const rcl_guard_condition_options_t options);
92 
94 
124 rcl_ret_t
126  rcl_guard_condition_t * guard_condition,
127  const rmw_guard_condition_t * rmw_guard_condition,
128  const rcl_guard_condition_options_t options);
129 
131 
151 rcl_ret_t
153 
155 
164 
166 
189 rcl_ret_t
191 
193 
222 
223 #if __cplusplus
224 }
225 #endif
226 
227 #endif // RCL__GUARD_CONDITION_H_
rcl_allocator_t allocator
Custom allocator for the guard condition, used for internal allocations.
Definition: guard_condition.h:41
rcl_guard_condition_options_t rcl_guard_condition_get_default_options(void)
Return the default options in a rcl_guard_condition_options_t struct.
rmw_ret_t rcl_ret_t
Definition: types.h:20
rmw_guard_condition_t * rcl_guard_condition_get_rmw_handle(const rcl_guard_condition_t *guard_condition)
Return the rmw guard condition handle.
struct rcl_guard_condition_impl_t * impl
Definition: guard_condition.h:34
rcl_guard_condition_t rcl_get_zero_initialized_guard_condition(void)
Return a rcl_guard_condition_t struct with members set to NULL.
rcl_ret_t rcl_guard_condition_fini(rcl_guard_condition_t *guard_condition)
Finalize a rcl_guard_condition_t.
rcl_ret_t rcl_trigger_guard_condition(rcl_guard_condition_t *guard_condition)
Trigger a rcl guard condition.
rcl_ret_t rcl_guard_condition_init_from_rmw(rcl_guard_condition_t *guard_condition, const rmw_guard_condition_t *rmw_guard_condition, const rcl_guard_condition_options_t options)
Same as rcl_guard_condition_init(), but reusing an existing rmw handle.
#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
struct rcl_guard_condition_options_t rcl_guard_condition_options_t
Options available for a rcl guard condition.
Encapsulation of an allocator.
Definition: allocator.h:40
struct rcl_guard_condition_t rcl_guard_condition_t
Handle for a rcl guard condition.
rcl_ret_t rcl_guard_condition_init(rcl_guard_condition_t *guard_condition, const rcl_guard_condition_options_t options)
Initialize a rcl guard_condition.
Handle for a rcl guard condition.
Definition: guard_condition.h:32
Options available for a rcl guard condition.
Definition: guard_condition.h:38