Class ActionTransport

Inheritance Relationships

Derived Type

Class Documentation

class ActionTransport

Subclassed by ros2_medkit_gateway::ros2::Ros2ActionTransport

Public Types

using StatusCallback = std::function<void(const std::string &action_path, const std::string &goal_id, ActionGoalStatus status)>

Status update from a status-topic subscription. The action_path and the new status for one tracked goal. Manager updates its own tracking map.

Public Functions

ActionTransport() = default
ActionTransport(const ActionTransport&) = delete
ActionTransport &operator=(const ActionTransport&) = delete
ActionTransport(ActionTransport&&) = delete
ActionTransport &operator=(ActionTransport&&) = delete
virtual ~ActionTransport() = default
virtual ActionSendGoalResult send_goal(const std::string &action_path, const std::string &action_type, const json &goal, std::chrono::duration<double> timeout) = 0
virtual ActionCancelResult cancel_goal(const std::string &action_path, const std::string &goal_id, std::chrono::duration<double> timeout) = 0
virtual ActionGetResultResult get_result(const std::string &action_path, const std::string &action_type, const std::string &goal_id, std::chrono::duration<double> timeout) = 0
virtual void subscribe_status(const std::string &action_path, StatusCallback callback) = 0

Subscribe to status updates for an action path. The callback fires when any tracked goal’s status changes. Subsequent calls for the same path are no-ops (idempotent).

virtual void unsubscribe_status(const std::string &action_path) = 0