nros C++ API
Lightweight ROS 2 client for embedded real-time systems (C++ headers)
Loading...
Searching...
No Matches
rclcpp_action::SendGoalOptions Struct Reference

#include <client.hpp>

Public Member Functions

 SendGoalOptions ()

Public Attributes

void * context
 User context pointer passed to all callbacks.
void(* feedback )(const uint8_t goal_id[16], const uint8_t *data, size_t len, void *ctx)
 Called when feedback is received for the goal.
detail::UpstreamCallback< void(typename GoalHandle::SharedPtr, FeedbackPtr)> feedback_callback
 Upstream's: feedback for the goal.
void(* goal_response )(bool accepted, const uint8_t goal_id[16], void *ctx)
 Called when the server accepts or rejects the goal.
detail::UpstreamCallback< void(typename GoalHandle::SharedPtr)> goal_response_callback
 Upstream's: the goal was accepted (a handle) or rejected (null).
void(* result )(const uint8_t goal_id[16], int32_t status, const uint8_t *data, size_t len, void *ctx)
 Called when the result is received.
detail::UpstreamCallback< void(const WrappedResult &)> result_callback

Detailed Description

Options for async goal sending (mirrors rclcpp SendGoalOptions).

Installed on the CLIENT with set_callbacks(), not passed per goal. Callbacks are invoked during spin_once() when the corresponding response arrives. All callbacks receive the context pointer for user state.

Issue 2015 — on a HOSTED build it ALSO carries upstream's three per-goal fields, goal_response_callback / feedback_callback / result_callback, taking upstream's shapes (GoalHandle::SharedPtr, std::shared_ptr<const Feedback>, const WrappedResult&). Those are read by async_send_goal, per goal, as upstream does; the raw pointers are read by set_callbacks, per client. A freestanding build refuses an assignment to the upstream fields.

Constructor & Destructor Documentation

◆ SendGoalOptions()

rclcpp_action::SendGoalOptions::SendGoalOptions ( )
inline

Member Data Documentation

◆ context

void* rclcpp_action::SendGoalOptions::context

User context pointer passed to all callbacks.

◆ feedback

void(* rclcpp_action::SendGoalOptions::feedback) (const uint8_t goal_id[16], const uint8_t *data, size_t len, void *ctx)

Called when feedback is received for the goal.

◆ feedback_callback

detail::UpstreamCallback<void(typename GoalHandle::SharedPtr, FeedbackPtr)> rclcpp_action::SendGoalOptions::feedback_callback

Upstream's: feedback for the goal.

◆ goal_response

void(* rclcpp_action::SendGoalOptions::goal_response) (bool accepted, const uint8_t goal_id[16], void *ctx)

Called when the server accepts or rejects the goal.

◆ goal_response_callback

detail::UpstreamCallback<void(typename GoalHandle::SharedPtr)> rclcpp_action::SendGoalOptions::goal_response_callback

Upstream's: the goal was accepted (a handle) or rejected (null).

◆ result

void(* rclcpp_action::SendGoalOptions::result) (const uint8_t goal_id[16], int32_t status, const uint8_t *data, size_t len, void *ctx)

Called when the result is received.

◆ result_callback

detail::UpstreamCallback<void(const WrappedResult&)> rclcpp_action::SendGoalOptions::result_callback

Upstream's: the goal's result. Giving one requests the result once the goal is accepted, as upstream does.


The documentation for this struct was generated from the following file: