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

The Transition class abstract the Lifecycle's states. More...

#include <transition.hpp>

Collaboration diagram for rclcpp_lifecycle::Transition:
Collaboration graph
[legend]

Public Member Functions

 Transition ()=delete
 
 Transition (uint8_t id, const std::string &label="", rcutils_allocator_t allocator=rcutils_get_default_allocator())
 Transition constructor. More...
 
 Transition (uint8_t id, const std::string &label, State &&start, State &&goal, rcutils_allocator_t allocator=rcutils_get_default_allocator())
 Transition constructor. More...
 
 Transition (const rcl_lifecycle_transition_t *rcl_lifecycle_transition_handle, rcutils_allocator_t allocator=rcutils_get_default_allocator())
 Transition constructor. More...
 
 Transition (const Transition &rhs)
 
virtual ~Transition ()
 
Transitionoperator= (const Transition &rhs)
 
uint8_t id () const
 Return the id. More...
 
std::string label () const
 Return the label. More...
 
State start_state () const
 Return the start state of the transition. More...
 
State goal_state () const
 Return the goal state of the transition. More...
 

Protected Member Functions

void reset ()
 

Protected Attributes

rcutils_allocator_t allocator_
 
bool owns_rcl_transition_handle_
 
rcl_lifecycle_transition_ttransition_handle_
 

Detailed Description

The Transition class abstract the Lifecycle's states.

There are 7 transitions exposed to a supervisory process, they are: create, configure, cleanup, activate, deactivate, shutdown and destroy.

Constructor & Destructor Documentation

◆ Transition() [1/5]

rclcpp_lifecycle::Transition::Transition ( )
delete

◆ Transition() [2/5]

rclcpp_lifecycle::Transition::Transition ( uint8_t  id,
const std::string label = "",
rcutils_allocator_t  allocator = rcutils_get_default_allocator() 
)
explicit

Transition constructor.

Parameters
[in]idof the transition
[in]labelof the transition
[in]allocatora valid allocator used to initialized the state.

◆ Transition() [3/5]

rclcpp_lifecycle::Transition::Transition ( uint8_t  id,
const std::string label,
State &&  start,
State &&  goal,
rcutils_allocator_t  allocator = rcutils_get_default_allocator() 
)

Transition constructor.

Parameters
[in]idof the transition
[in]labelof the transition
[in]startstate of the transition
[in]goalstate of the transition
[in]allocatora valid allocator used to initialized the state.

◆ Transition() [4/5]

rclcpp_lifecycle::Transition::Transition ( const rcl_lifecycle_transition_t rcl_lifecycle_transition_handle,
rcutils_allocator_t  allocator = rcutils_get_default_allocator() 
)
explicit

Transition constructor.

Parameters
[in]rcl_lifecycle_transition_handlestructure with the transition details
[in]allocatora valid allocator used to initialized the state.

◆ Transition() [5/5]

rclcpp_lifecycle::Transition::Transition ( const Transition rhs)

◆ ~Transition()

virtual rclcpp_lifecycle::Transition::~Transition ( )
virtual

Member Function Documentation

◆ operator=()

Transition& rclcpp_lifecycle::Transition::operator= ( const Transition rhs)

◆ id()

uint8_t rclcpp_lifecycle::Transition::id ( ) const

Return the id.

Returns
id of the state

◆ label()

std::string rclcpp_lifecycle::Transition::label ( ) const

Return the label.

Returns
label of the transition

◆ start_state()

State rclcpp_lifecycle::Transition::start_state ( ) const

Return the start state of the transition.

Returns
start state of the transition.

◆ goal_state()

State rclcpp_lifecycle::Transition::goal_state ( ) const

Return the goal state of the transition.

Returns
goal state of the transition.

◆ reset()

void rclcpp_lifecycle::Transition::reset ( )
protected

Member Data Documentation

◆ allocator_

rcutils_allocator_t rclcpp_lifecycle::Transition::allocator_
protected

◆ owns_rcl_transition_handle_

bool rclcpp_lifecycle::Transition::owns_rcl_transition_handle_
protected

◆ transition_handle_

rcl_lifecycle_transition_t* rclcpp_lifecycle::Transition::transition_handle_
protected

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