rclcpp_lifecycle  master
C++ ROS Lifecycle Library API
Public Types | Public Member Functions | Protected Member Functions | List of all members
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface Class Reference

Interface class for a managed node. More...

#include <lifecycle_node_interface.hpp>

Inheritance diagram for rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface:
Inheritance graph
[legend]

Public Types

enum  CallbackReturn : uint8_t { CallbackReturn::SUCCESS = lifecycle_msgs::msg::Transition::TRANSITION_CALLBACK_SUCCESS, CallbackReturn::FAILURE = lifecycle_msgs::msg::Transition::TRANSITION_CALLBACK_FAILURE, CallbackReturn::ERROR = lifecycle_msgs::msg::Transition::TRANSITION_CALLBACK_ERROR }
 

Public Member Functions

virtual CallbackReturn on_configure (const State &previous_state)
 Callback function for configure transition. More...
 
virtual CallbackReturn on_cleanup (const State &previous_state)
 Callback function for cleanup transition. More...
 
virtual CallbackReturn on_shutdown (const State &previous_state)
 Callback function for shutdown transition. More...
 
virtual CallbackReturn on_activate (const State &previous_state)
 Callback function for activate transition. More...
 
virtual CallbackReturn on_deactivate (const State &previous_state)
 Callback function for deactivate transition. More...
 
virtual CallbackReturn on_error (const State &previous_state)
 Callback function for errorneous transition. More...
 
virtual ~LifecycleNodeInterface ()
 

Protected Member Functions

 LifecycleNodeInterface ()
 

Detailed Description

Interface class for a managed node.

Virtual functions as defined in http://design.ros2.org/articles/node_lifecycle.html

If the callback function returns successfully, the specified transition is completed. If the callback function fails or throws an uncaught exception, the on_error function is called. By default, all functions remain optional to overwrite and return true. Except the on_error function, which returns false and thus goes to shutdown/finalize state.

Member Enumeration Documentation

◆ CallbackReturn

Enumerator
SUCCESS 
FAILURE 
ERROR 

Constructor & Destructor Documentation

◆ LifecycleNodeInterface()

rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::LifecycleNodeInterface ( )
inlineprotected

◆ ~LifecycleNodeInterface()

virtual rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::~LifecycleNodeInterface ( )
inlinevirtual

Member Function Documentation

◆ on_configure()

virtual CallbackReturn rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::on_configure ( const State previous_state)
virtual

Callback function for configure transition.

◆ on_cleanup()

virtual CallbackReturn rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::on_cleanup ( const State previous_state)
virtual

Callback function for cleanup transition.

◆ on_shutdown()

virtual CallbackReturn rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::on_shutdown ( const State previous_state)
virtual

Callback function for shutdown transition.

◆ on_activate()

virtual CallbackReturn rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::on_activate ( const State previous_state)
virtual

Callback function for activate transition.

◆ on_deactivate()

virtual CallbackReturn rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::on_deactivate ( const State previous_state)
virtual

Callback function for deactivate transition.

◆ on_error()

virtual CallbackReturn rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::on_error ( const State previous_state)
virtual

Callback function for errorneous transition.


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