rclcpp_action  master
C++ ROS Action Client Library
Public Member Functions | Protected Member Functions | List of all members
rclcpp_action::ServerBase Class Referenceabstract

#include <server.hpp>

Inheritance diagram for rclcpp_action::ServerBase:
Inheritance graph
[legend]
Collaboration diagram for rclcpp_action::ServerBase:
Collaboration graph
[legend]

Public Member Functions

virtual RCLCPP_ACTION_PUBLIC ~ServerBase ()
 
RCLCPP_ACTION_PUBLIC size_t get_number_of_ready_subscriptions () override
 
RCLCPP_ACTION_PUBLIC size_t get_number_of_ready_timers () override
 
RCLCPP_ACTION_PUBLIC size_t get_number_of_ready_clients () override
 
RCLCPP_ACTION_PUBLIC size_t get_number_of_ready_services () override
 
RCLCPP_ACTION_PUBLIC size_t get_number_of_ready_guard_conditions () override
 
RCLCPP_ACTION_PUBLIC bool add_to_wait_set (rcl_wait_set_t *wait_set) override
 
RCLCPP_ACTION_PUBLIC bool is_ready (rcl_wait_set_t *) override
 
RCLCPP_ACTION_PUBLIC void execute () override
 
- Public Member Functions inherited from rclcpp::Waitable
virtual ~Waitable ()=default
 
virtual size_t get_number_of_ready_events ()
 
bool exchange_in_use_by_wait_set_state (bool in_use_state)
 

Protected Member Functions

RCLCPP_ACTION_PUBLIC ServerBase (rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_base, rclcpp::node_interfaces::NodeClockInterface::SharedPtr node_clock, rclcpp::node_interfaces::NodeLoggingInterface::SharedPtr node_logging, const std::string &name, const rosidl_action_type_support_t *type_support, const rcl_action_server_options_t &options)
 
virtual RCLCPP_ACTION_PUBLIC std::pair< GoalResponse, std::shared_ptr< void > > call_handle_goal_callback (GoalUUID &, std::shared_ptr< void > request)=0
 
virtual RCLCPP_ACTION_PUBLIC CancelResponse call_handle_cancel_callback (const GoalUUID &uuid)=0
 
virtual RCLCPP_ACTION_PUBLIC GoalUUID get_goal_id_from_goal_request (void *message)=0
 
virtual RCLCPP_ACTION_PUBLIC std::shared_ptr< void > create_goal_request ()=0
 
virtual RCLCPP_ACTION_PUBLIC void call_goal_accepted_callback (std::shared_ptr< rcl_action_goal_handle_t > rcl_goal_handle, GoalUUID uuid, std::shared_ptr< void > goal_request_message)=0
 
virtual RCLCPP_ACTION_PUBLIC GoalUUID get_goal_id_from_result_request (void *message)=0
 
virtual RCLCPP_ACTION_PUBLIC std::shared_ptr< void > create_result_request ()=0
 
virtual RCLCPP_ACTION_PUBLIC std::shared_ptr< void > create_result_response (decltype(action_msgs::msg::GoalStatus::status) status)=0
 
RCLCPP_ACTION_PUBLIC void publish_status ()
 
RCLCPP_ACTION_PUBLIC void notify_goal_terminal_state ()
 
RCLCPP_ACTION_PUBLIC void publish_result (const GoalUUID &uuid, std::shared_ptr< void > result_msg)
 
RCLCPP_ACTION_PUBLIC void publish_feedback (std::shared_ptr< void > feedback_msg)
 

Detailed Description

Base Action Server implementation This class should not be used directly by users writing an action server. Instead users should use rclcpp_action::Server.

Internally, this class is responsible for interfacing with the rcl_action API.

Constructor & Destructor Documentation

◆ ~ServerBase()

virtual RCLCPP_ACTION_PUBLIC rclcpp_action::ServerBase::~ServerBase ( )
virtual

◆ ServerBase()

RCLCPP_ACTION_PUBLIC rclcpp_action::ServerBase::ServerBase ( rclcpp::node_interfaces::NodeBaseInterface::SharedPtr  node_base,
rclcpp::node_interfaces::NodeClockInterface::SharedPtr  node_clock,
rclcpp::node_interfaces::NodeLoggingInterface::SharedPtr  node_logging,
const std::string name,
const rosidl_action_type_support_t *  type_support,
const rcl_action_server_options_t options 
)
protected

Member Function Documentation

◆ get_number_of_ready_subscriptions()

RCLCPP_ACTION_PUBLIC size_t rclcpp_action::ServerBase::get_number_of_ready_subscriptions ( )
overridevirtual

Return the number of subscriptions used to implement an action server

Reimplemented from rclcpp::Waitable.

◆ get_number_of_ready_timers()

RCLCPP_ACTION_PUBLIC size_t rclcpp_action::ServerBase::get_number_of_ready_timers ( )
overridevirtual

Return the number of timers used to implement an action server

Reimplemented from rclcpp::Waitable.

◆ get_number_of_ready_clients()

RCLCPP_ACTION_PUBLIC size_t rclcpp_action::ServerBase::get_number_of_ready_clients ( )
overridevirtual

Return the number of service clients used to implement an action server

Reimplemented from rclcpp::Waitable.

◆ get_number_of_ready_services()

RCLCPP_ACTION_PUBLIC size_t rclcpp_action::ServerBase::get_number_of_ready_services ( )
overridevirtual

Return the number of service servers used to implement an action server

Reimplemented from rclcpp::Waitable.

◆ get_number_of_ready_guard_conditions()

RCLCPP_ACTION_PUBLIC size_t rclcpp_action::ServerBase::get_number_of_ready_guard_conditions ( )
overridevirtual

Return the number of guard conditions used to implement an action server

Reimplemented from rclcpp::Waitable.

◆ add_to_wait_set()

RCLCPP_ACTION_PUBLIC bool rclcpp_action::ServerBase::add_to_wait_set ( rcl_wait_set_t wait_set)
overridevirtual

Add all entities to a wait set.

Implements rclcpp::Waitable.

◆ is_ready()

RCLCPP_ACTION_PUBLIC bool rclcpp_action::ServerBase::is_ready ( rcl_wait_set_t )
overridevirtual

Return true if any entity belonging to the action server is ready to be executed.

Implements rclcpp::Waitable.

◆ execute()

RCLCPP_ACTION_PUBLIC void rclcpp_action::ServerBase::execute ( )
overridevirtual

Act on entities in the wait set which are ready to be acted upon.

Implements rclcpp::Waitable.

◆ call_handle_goal_callback()

virtual RCLCPP_ACTION_PUBLIC std::pair<GoalResponse, std::shared_ptr<void> > rclcpp_action::ServerBase::call_handle_goal_callback ( GoalUUID ,
std::shared_ptr< void >  request 
)
protectedpure virtual

◆ call_handle_cancel_callback()

virtual RCLCPP_ACTION_PUBLIC CancelResponse rclcpp_action::ServerBase::call_handle_cancel_callback ( const GoalUUID uuid)
protectedpure virtual

◆ get_goal_id_from_goal_request()

virtual RCLCPP_ACTION_PUBLIC GoalUUID rclcpp_action::ServerBase::get_goal_id_from_goal_request ( void *  message)
protectedpure virtual

Given a goal request message, return the UUID contained within.

Implemented in rclcpp_action::Server< ActionT >.

◆ create_goal_request()

virtual RCLCPP_ACTION_PUBLIC std::shared_ptr<void> rclcpp_action::ServerBase::create_goal_request ( )
protectedpure virtual

Create an empty goal request message so it can be taken from a lower layer.

Implemented in rclcpp_action::Server< ActionT >.

◆ call_goal_accepted_callback()

virtual RCLCPP_ACTION_PUBLIC void rclcpp_action::ServerBase::call_goal_accepted_callback ( std::shared_ptr< rcl_action_goal_handle_t rcl_goal_handle,
GoalUUID  uuid,
std::shared_ptr< void >  goal_request_message 
)
protectedpure virtual

Call user callback to inform them a goal has been accepted.

Implemented in rclcpp_action::Server< ActionT >.

◆ get_goal_id_from_result_request()

virtual RCLCPP_ACTION_PUBLIC GoalUUID rclcpp_action::ServerBase::get_goal_id_from_result_request ( void *  message)
protectedpure virtual

Given a result request message, return the UUID contained within.

Implemented in rclcpp_action::Server< ActionT >.

◆ create_result_request()

virtual RCLCPP_ACTION_PUBLIC std::shared_ptr<void> rclcpp_action::ServerBase::create_result_request ( )
protectedpure virtual

Create an empty goal request message so it can be taken from a lower layer.

Implemented in rclcpp_action::Server< ActionT >.

◆ create_result_response()

virtual RCLCPP_ACTION_PUBLIC std::shared_ptr<void> rclcpp_action::ServerBase::create_result_response ( decltype(action_msgs::msg::GoalStatus::status)  status)
protectedpure virtual

Create an empty goal result message so it can be sent as a reply in a lower layer

Implemented in rclcpp_action::Server< ActionT >.

◆ publish_status()

RCLCPP_ACTION_PUBLIC void rclcpp_action::ServerBase::publish_status ( )
protected

◆ notify_goal_terminal_state()

RCLCPP_ACTION_PUBLIC void rclcpp_action::ServerBase::notify_goal_terminal_state ( )
protected

◆ publish_result()

RCLCPP_ACTION_PUBLIC void rclcpp_action::ServerBase::publish_result ( const GoalUUID uuid,
std::shared_ptr< void >  result_msg 
)
protected

◆ publish_feedback()

RCLCPP_ACTION_PUBLIC void rclcpp_action::ServerBase::publish_feedback ( std::shared_ptr< void >  feedback_msg)
protected

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