rclcpp_lifecycle
master
C++ ROS Lifecycle Library API
|
Interface class for a managed node. More...
#include <lifecycle_node_interface.hpp>
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 () | |
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.
|
strong |
|
inlineprotected |
|
inlinevirtual |
|
virtual |
Callback function for configure transition.
|
virtual |
Callback function for cleanup transition.
|
virtual |
Callback function for shutdown transition.
|
virtual |
Callback function for activate transition.
|
virtual |
Callback function for deactivate transition.
|
virtual |
Callback function for errorneous transition.