15 #ifndef RCL_ACTION__TYPES_H_
16 #define RCL_ACTION__TYPES_H_
23 #include "rcl_action/visibility_control.h"
25 #include "action_msgs/msg/goal_info.h"
26 #include "action_msgs/msg/goal_status.h"
27 #include "action_msgs/msg/goal_status_array.h"
28 #include "action_msgs/srv/cancel_goal.h"
31 #include "rcl/macros.h"
34 #include "rosidl_runtime_c/action_type_support_struct.h"
38 #define RCL_RET_ACTION_NAME_INVALID 2000
39 #define RCL_RET_ACTION_GOAL_ACCEPTED 2100
41 #define RCL_RET_ACTION_GOAL_REJECTED 2101
43 #define RCL_RET_ACTION_CLIENT_INVALID 2102
45 #define RCL_RET_ACTION_CLIENT_TAKE_FAILED 2103
47 #define RCL_RET_ACTION_SERVER_INVALID 2200
49 #define RCL_RET_ACTION_SERVER_TAKE_FAILED 2201
51 #define RCL_RET_ACTION_GOAL_HANDLE_INVALID 2300
53 #define RCL_RET_ACTION_GOAL_EVENT_INVALID 2301
58 #define uuidcmp(uuid0, uuid1) (0 == memcmp(uuid0, uuid1, UUID_SIZE))
59 #define zerouuid (uint8_t[UUID_SIZE]) {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
60 #define uuidcmpzero(uuid) uuidcmp(uuid, (zerouuid))
66 typedef action_msgs__msg__GoalInfo rcl_action_goal_info_t;
67 typedef action_msgs__msg__GoalStatus rcl_action_goal_status_t;
72 action_msgs__msg__GoalStatusArray
msg;
76 typedef action_msgs__srv__CancelGoal_Request rcl_action_cancel_request_t;
81 action_msgs__srv__CancelGoal_Response
msg;
90 typedef int8_t rcl_action_goal_state_t;
91 #define GOAL_STATE_UNKNOWN action_msgs__msg__GoalStatus__STATUS_UNKNOWN
92 #define GOAL_STATE_ACCEPTED action_msgs__msg__GoalStatus__STATUS_ACCEPTED
93 #define GOAL_STATE_EXECUTING action_msgs__msg__GoalStatus__STATUS_EXECUTING
94 #define GOAL_STATE_CANCELING action_msgs__msg__GoalStatus__STATUS_CANCELING
95 #define GOAL_STATE_SUCCEEDED action_msgs__msg__GoalStatus__STATUS_SUCCEEDED
96 #define GOAL_STATE_CANCELED action_msgs__msg__GoalStatus__STATUS_CANCELED
97 #define GOAL_STATE_ABORTED action_msgs__msg__GoalStatus__STATUS_ABORTED
98 #define GOAL_STATE_NUM_STATES 7
102 extern const char * goal_state_descriptions[];
103 extern const char * goal_event_descriptions[];
106 typedef enum rcl_action_goal_event_t
108 GOAL_EVENT_EXECUTE = 0,
109 GOAL_EVENT_CANCEL_GOAL,
113 GOAL_EVENT_NUM_EVENTS
114 } rcl_action_goal_event_t;
119 rcl_action_goal_info_t
120 rcl_action_get_zero_initialized_goal_info(
void);
130 rcl_action_get_zero_initialized_goal_status_array(
void);
140 rcl_action_cancel_request_t
141 rcl_action_get_zero_initialized_cancel_request(
void);
151 rcl_action_get_zero_initialized_cancel_response(
void);
199 rcl_action_goal_status_array_init(
201 const size_t num_status,
272 rcl_action_cancel_response_init(
274 const size_t num_goals_canceling,
303 #endif // RCL_ACTION__TYPES_H_