|
nros C API
Lightweight ROS 2 client for embedded real-time systems
|
Action server and client API. More...
#include "rclc/types.h"

Go to the source code of this file.
Functions | |
| static rcl_ret_t | rclc_action_client_init_default (struct rcl_action_client_t *action_client, const struct rcl_node_t *node, const struct rclc_action_type_t *type_info, const char *action_name) |
| rclc's default preset constructor for an action client. | |
Action server and client API.
Actions provide long-running goal-oriented communication with feedback and cancellation support.
|
inlinestatic |
rclc's default preset constructor for an action client.
phase-417 W5.d. Ledger row c:action_client_init_default was declined on "`rcl_action_client_init` takes no QoS and IS the default form" — which says the CAPABILITY corresponds, not that the name may be missing. RFC-0089 is explicit that a correspondence is a reason to take the spelling, so a ported rclc_action file compiles on this line instead of on a diff.
The argument order is rclc's, and that is the whole reason this exists as a separate name rather than as a rename of rcl_action_client_init(): rclc puts the typesupport third and the action name fourth, ours has them the other way round. Both are pointers, so a caller who guessed wrong gets a WARNING and a client initialised with a type descriptor as its name — the silent-reorder hazard RFC-0089 records, which is exactly why phase-417 pairs every reorder with a rename. The forwarder below is where the swap happens, once, and tests/compile/preset_constructors.c promotes -Wincompatible-pointer-types to an error so a mis-wired swap cannot ship.
This is the CALLBACK-mode client (rclc registers the goal/feedback/result callbacks later, at rclc_executor_add_action_client), so it forwards to rcl_action_client_init() and not to rclc_polling_action_client_init(), which builds the separate polled type (phase-487 W4).
static inline: no symbol, no writable data.
| [out] | action_client | Zero-initialised action client to fill in. |
| [in] | node | An initialised node. |
| [in] | type_info | Generated action type descriptor. |
| [in] | action_name | Action name, null-terminated. |