rcl_action  master
C API providing common functionality for ROS actions.
goal_handle.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 
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 
24 #include "rcl_action/types.h"
26 #include "rcl/allocator.h"
27 
28 
30 struct rcl_action_goal_handle_impl_t;
31 
34 {
35  struct rcl_action_goal_handle_impl_t * impl;
37 
39 
47 
49 
84  rcl_action_goal_handle_t * goal_handle,
85  const rcl_action_goal_info_t * goal_info,
86  rcl_allocator_t allocator);
87 
89 
114 rcl_ret_t
116 
118 
137 rcl_ret_t
139  rcl_action_goal_handle_t * goal_handle,
140  const rcl_action_goal_event_t goal_event);
141 
143 
162 rcl_ret_t
164  const rcl_action_goal_handle_t * goal_handle,
165  rcl_action_goal_info_t * goal_info);
166 
168 
187 rcl_ret_t
189  const rcl_action_goal_handle_t * goal_handle,
190  rcl_action_goal_state_t * status);
191 
193 
211 bool
213 
215 
233 bool
235 
237 
260 bool
262 
263 #ifdef __cplusplus
264 }
265 #endif
266 
267 #endif // RCL_ACTION__GOAL_HANDLE_H_
RCL_ACTION_PUBLIC rcl_ret_t rcl_action_update_goal_state(rcl_action_goal_handle_t *goal_handle, const rcl_action_goal_event_t goal_event)
Update a goal state with a rcl_action_goal_handle_t and an event.
int8_t rcl_action_goal_state_t
Goal states.
Definition: types.h:86
#define RCL_ACTION_PUBLIC
Definition: visibility_control.h:50
rmw_ret_t rcl_ret_t
struct rcl_action_goal_handle_t rcl_action_goal_handle_t
Goal handle for an action.
RCL_ACTION_PUBLIC rcl_ret_t rcl_action_goal_handle_fini(rcl_action_goal_handle_t *goal_handle)
Finalize a rcl_action_goal_handle_t.
RCL_ACTION_PUBLIC bool rcl_action_goal_handle_is_valid(const rcl_action_goal_handle_t *goal_handle)
Check if a rcl_action_goal_handle_t is valid.
#define RCL_WARN_UNUSED
RCL_ACTION_PUBLIC rcl_action_goal_handle_t rcl_action_get_zero_initialized_goal_handle(void)
Return a rcl_action_goal_handle_t struct with members set to NULL.
RCL_ACTION_PUBLIC rcl_ret_t rcl_action_goal_handle_get_info(const rcl_action_goal_handle_t *goal_handle, rcl_action_goal_info_t *goal_info)
Get the ID of a goal using a rcl_action_goal_handle_t.
RCL_ACTION_PUBLIC bool rcl_action_goal_handle_is_active(const rcl_action_goal_handle_t *goal_handle)
Check if a goal is active using a rcl_action_goal_handle_t.
action_msgs__msg__GoalInfo rcl_action_goal_info_t
Definition: types.h:66
struct rcl_action_goal_handle_impl_t * impl
Definition: goal_handle.h:35
rcl_action_goal_event_t
Goal state transition events.
Definition: types.h:102
Goal handle for an action.
Definition: goal_handle.h:33
RCL_ACTION_PUBLIC bool rcl_action_goal_handle_is_cancelable(const rcl_action_goal_handle_t *goal_handle)
Check if a goal can be transitioned to CANCELING in its current state.
RCL_ACTION_PUBLIC rcl_ret_t rcl_action_goal_handle_get_status(const rcl_action_goal_handle_t *goal_handle, rcl_action_goal_state_t *status)
Get the status of a goal.
RCL_ACTION_PUBLIC rcl_ret_t rcl_action_goal_handle_init(rcl_action_goal_handle_t *goal_handle, const rcl_action_goal_info_t *goal_info, rcl_allocator_t allocator)
Initialize a rcl_action_goal_handle_t.