C++ YASMIN (Yet Another State MachINe)
Loading...
Searching...
No Matches
FibonacciActionServer Class Reference

A ROS 2 action server node for calculating Fibonacci sequences. More...

Inheritance diagram for FibonacciActionServer:
Collaboration diagram for FibonacciActionServer:

Public Types

using Fibonacci = example_interfaces::action::Fibonacci
 Alias for the Fibonacci action type.
 
using GoalHandleFibonacci = rclcpp_action::ServerGoalHandle<Fibonacci>
 Alias for the goal handle of the Fibonacci action.
 

Public Member Functions

 FibonacciActionServer ()
 Constructor for the FibonacciActionServer.
 

Private Member Functions

void execute (const std::shared_ptr< GoalHandleFibonacci > goal_handle)
 Executes the Fibonacci calculation for a given goal.
 

Private Attributes

rclcpp_action::Server< Fibonacci >::SharedPtr action_server_
 The action server instance for Fibonacci calculations.
 

Detailed Description

A ROS 2 action server node for calculating Fibonacci sequences.

Member Typedef Documentation

◆ Fibonacci

using FibonacciActionServer::Fibonacci = example_interfaces::action::Fibonacci

Alias for the Fibonacci action type.

◆ GoalHandleFibonacci

using FibonacciActionServer::GoalHandleFibonacci = rclcpp_action::ServerGoalHandle<Fibonacci>

Alias for the goal handle of the Fibonacci action.

Constructor & Destructor Documentation

◆ FibonacciActionServer()

FibonacciActionServer::FibonacciActionServer ( )
inlineexplicit

Constructor for the FibonacciActionServer.

Initializes the action server and sets up the goal, cancel, and accepted callbacks.

Parameters
optionsNode options for initialization.

Member Function Documentation

◆ execute()

void FibonacciActionServer::execute ( const std::shared_ptr< GoalHandleFibonacci > goal_handle)
inlineprivate

Executes the Fibonacci calculation for a given goal.

Generates the Fibonacci sequence up to the requested order, providing feedback to the client and handling cancellation requests.

Parameters
goal_handleShared pointer to the goal handle.

Member Data Documentation

◆ action_server_

rclcpp_action::Server<Fibonacci>::SharedPtr FibonacciActionServer::action_server_
private

The action server instance for Fibonacci calculations.


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