rcl_action  master
C API providing common functionality for ROS actions.
action_client.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__ACTION_CLIENT_H_
16 #define RCL_ACTION__ACTION_CLIENT_H_
17 
18 #ifdef __cplusplus
19 extern "C"
20 {
21 #endif
22 
23 #include "rcl_action/types.h"
24 #include "rcl_action/visibility_control.h"
25 #include "rcl/macros.h"
26 #include "rcl/node.h"
27 
28 
30 struct rcl_action_client_impl_t;
31 
33 typedef struct rcl_action_client_t
34 {
36  struct rcl_action_client_impl_t * impl;
38 
41 {
54 
57 
59 
63 RCL_ACTION_PUBLIC
64 RCL_WARN_UNUSED
66 rcl_action_get_zero_initialized_client(void);
67 
69 
177 RCL_ACTION_PUBLIC
178 RCL_WARN_UNUSED
179 rcl_ret_t
180 rcl_action_client_init(
181  rcl_action_client_t * action_client,
182  rcl_node_t * node,
183  const rosidl_action_type_support_t * type_support,
184  const char * action_name,
185  const rcl_action_client_options_t * options);
186 
188 
217 RCL_ACTION_PUBLIC
218 RCL_WARN_UNUSED
219 rcl_ret_t
220 rcl_action_client_fini(rcl_action_client_t * action_client, rcl_node_t * node);
221 
223 
233 RCL_ACTION_PUBLIC
234 RCL_WARN_UNUSED
236 rcl_action_client_get_default_options(void);
237 
239 
274 RCL_ACTION_PUBLIC
275 RCL_WARN_UNUSED
276 rcl_ret_t
277 rcl_action_server_is_available(
278  const rcl_node_t * node,
279  const rcl_action_client_t * client,
280  bool * is_available);
281 
283 
323 RCL_ACTION_PUBLIC
324 RCL_WARN_UNUSED
325 rcl_ret_t
326 rcl_action_send_goal_request(
327  const rcl_action_client_t * action_client,
328  const void * ros_goal_request,
329  int64_t * sequence_number);
330 
332 
370 RCL_ACTION_PUBLIC
371 RCL_WARN_UNUSED
372 rcl_ret_t
373 rcl_action_take_goal_response(
374  const rcl_action_client_t * action_client,
375  rmw_request_id_t * response_header,
376  void * ros_goal_response);
377 
379 
419 RCL_ACTION_PUBLIC
420 RCL_WARN_UNUSED
421 rcl_ret_t
422 rcl_action_take_feedback(
423  const rcl_action_client_t * action_client,
424  void * ros_feedback);
425 
427 
465 RCL_ACTION_PUBLIC
466 RCL_WARN_UNUSED
467 rcl_ret_t
468 rcl_action_take_status(
469  const rcl_action_client_t * action_client,
470  void * ros_status_array);
471 
473 
513 RCL_ACTION_PUBLIC
514 RCL_WARN_UNUSED
515 rcl_ret_t
516 rcl_action_send_result_request(
517  const rcl_action_client_t * action_client,
518  const void * ros_result_request,
519  int64_t * sequence_number);
520 
522 
567 RCL_ACTION_PUBLIC
568 RCL_WARN_UNUSED
569 rcl_ret_t
570 rcl_action_take_result_response(
571  const rcl_action_client_t * action_client,
572  rmw_request_id_t * response_header,
573  void * ros_result);
574 
576 
611 RCL_ACTION_PUBLIC
612 RCL_WARN_UNUSED
613 rcl_ret_t
614 rcl_action_send_cancel_request(
615  const rcl_action_client_t * action_client,
616  const void * ros_cancel_request,
617  int64_t * sequence_number);
618 
620 
659 RCL_ACTION_PUBLIC
660 RCL_WARN_UNUSED
661 rcl_ret_t
662 rcl_action_take_cancel_response(
663  const rcl_action_client_t * action_client,
664  rmw_request_id_t * response_header,
665  void * ros_cancel_response);
666 
668 
689 RCL_ACTION_PUBLIC
690 RCL_WARN_UNUSED
691 const char *
692 rcl_action_client_get_action_name(const rcl_action_client_t * action_client);
693 
695 
716 RCL_ACTION_PUBLIC
717 RCL_WARN_UNUSED
719 rcl_action_client_get_options(const rcl_action_client_t * action_client);
720 
722 
739 RCL_ACTION_PUBLIC
740 bool
741 rcl_action_client_is_valid(
742  const rcl_action_client_t * action_client);
743 
744 #ifdef __cplusplus
745 }
746 #endif
747 
748 #endif // RCL_ACTION__ACTION_CLIENT_H_
rcl_action_client_options_t::status_topic_qos
rmw_qos_profile_t status_topic_qos
Status topic quality of service.
Definition: action_client.h:52
rcl_action_client_options_t::cancel_service_qos
rmw_qos_profile_t cancel_service_qos
Cancel service quality of service.
Definition: action_client.h:48
rcl_node_t
rcl_action_client_t::impl
struct rcl_action_client_impl_t * impl
Pointer to the action client implementation.
Definition: action_client.h:36
rcl_ret_t
rmw_ret_t rcl_ret_t
rcl_action_client_options_t::result_service_qos
rmw_qos_profile_t result_service_qos
Result service quality of service.
Definition: action_client.h:46
rcl_action_client_options_t::feedback_topic_qos
rmw_qos_profile_t feedback_topic_qos
Feedback topic quality of service.
Definition: action_client.h:50
rcl_action_client_options_t::goal_service_qos
rmw_qos_profile_t goal_service_qos
Definition: action_client.h:44
rmw_request_id_t
rcl_action_client_options_t
Options available for a rcl_action_client_t.
Definition: action_client.h:40
rcutils_allocator_t
node.h
rmw_qos_profile_t
rcl_action_client_options_t::allocator
rcl_allocator_t allocator
Custom allocator for the action client, used for incidental allocations.
Definition: action_client.h:55
rcl_action_client_t
Structure which encapsulates a ROS action client.
Definition: action_client.h:33