rcl_action  master
C API providing common functionality for ROS actions.
goal_handle.h
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_ACTION__GOAL_HANDLE_H_
16 #define RCL_ACTION__GOAL_HANDLE_H_
17 
18 #ifdef __cplusplus
19 extern "C"
20 {
21 #endif
22 
23 #include "rcl_action/goal_state_machine.h"
24 #include "rcl_action/types.h"
25 #include "rcl_action/visibility_control.h"
26 #include "rcl/allocator.h"
27 
28 
30 struct rcl_action_goal_handle_impl_t;
31 
34 {
36  struct rcl_action_goal_handle_impl_t * impl;
38 
40 
44 RCL_ACTION_PUBLIC
45 RCL_WARN_UNUSED
47 rcl_action_get_zero_initialized_goal_handle(void);
48 
50 
81 RCL_ACTION_PUBLIC
82 RCL_WARN_UNUSED
84 rcl_action_goal_handle_init(
85  rcl_action_goal_handle_t * goal_handle,
86  const rcl_action_goal_info_t * goal_info,
87  rcl_allocator_t allocator);
88 
90 
113 RCL_ACTION_PUBLIC
114 RCL_WARN_UNUSED
115 rcl_ret_t
116 rcl_action_goal_handle_fini(rcl_action_goal_handle_t * goal_handle);
117 
119 
136 RCL_ACTION_PUBLIC
137 RCL_WARN_UNUSED
138 rcl_ret_t
139 rcl_action_update_goal_state(
140  rcl_action_goal_handle_t * goal_handle,
141  const rcl_action_goal_event_t goal_event);
142 
144 
161 RCL_ACTION_PUBLIC
162 RCL_WARN_UNUSED
163 rcl_ret_t
164 rcl_action_goal_handle_get_info(
165  const rcl_action_goal_handle_t * goal_handle,
166  rcl_action_goal_info_t * goal_info);
167 
169 
186 RCL_ACTION_PUBLIC
187 RCL_WARN_UNUSED
188 rcl_ret_t
189 rcl_action_goal_handle_get_status(
190  const rcl_action_goal_handle_t * goal_handle,
191  rcl_action_goal_state_t * status);
192 
194 
210 RCL_ACTION_PUBLIC
211 RCL_WARN_UNUSED
212 bool
213 rcl_action_goal_handle_is_active(const rcl_action_goal_handle_t * goal_handle);
214 
216 
232 RCL_ACTION_PUBLIC
233 RCL_WARN_UNUSED
234 bool
235 rcl_action_goal_handle_is_cancelable(const rcl_action_goal_handle_t * goal_handle);
236 
238 
259 RCL_ACTION_PUBLIC
260 RCL_WARN_UNUSED
261 bool
262 rcl_action_goal_handle_is_valid(const rcl_action_goal_handle_t * goal_handle);
263 
264 #ifdef __cplusplus
265 }
266 #endif
267 
268 #endif // RCL_ACTION__GOAL_HANDLE_H_
rcl_action_goal_handle_t::impl
struct rcl_action_goal_handle_impl_t * impl
Pointer to the action goal handle implementation.
Definition: goal_handle.h:36
rcl_ret_t
rmw_ret_t rcl_ret_t
allocator.h
rcutils_allocator_t
rcl_action_goal_handle_t
Goal handle for an action.
Definition: goal_handle.h:33