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

Abstract class for the Lifecycle's states. More...

#include <state.hpp>

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

Public Member Functions

 State (rcutils_allocator_t allocator=rcutils_get_default_allocator())
 
 State (uint8_t id, const std::string &label, rcutils_allocator_t allocator=rcutils_get_default_allocator())
 State constructor. More...
 
 State (const rcl_lifecycle_state_t *rcl_lifecycle_state_handle, rcutils_allocator_t allocator=rcutils_get_default_allocator())
 State constructor. More...
 
 State (const State &rhs)
 
virtual ~State ()
 
Stateoperator= (const State &rhs)
 
uint8_t id () const
 Return the id. More...
 
std::string label () const
 Return the label. More...
 

Protected Member Functions

void reset ()
 

Protected Attributes

rcutils_allocator_t allocator_
 
bool owns_rcl_state_handle_
 
rcl_lifecycle_state_tstate_handle_
 

Detailed Description

Abstract class for the Lifecycle's states.

There are 4 primary states: Unconfigured, Inactive, Active and Finalized.

Constructor & Destructor Documentation

◆ State() [1/4]

rclcpp_lifecycle::State::State ( rcutils_allocator_t  allocator = rcutils_get_default_allocator())
explicit

◆ State() [2/4]

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

State constructor.

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

◆ State() [3/4]

rclcpp_lifecycle::State::State ( const rcl_lifecycle_state_t rcl_lifecycle_state_handle,
rcutils_allocator_t  allocator = rcutils_get_default_allocator() 
)
explicit

State constructor.

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

◆ State() [4/4]

rclcpp_lifecycle::State::State ( const State rhs)

◆ ~State()

virtual rclcpp_lifecycle::State::~State ( )
virtual

Member Function Documentation

◆ operator=()

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

◆ id()

uint8_t rclcpp_lifecycle::State::id ( ) const

Return the id.

Returns
id of the state

◆ label()

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

Return the label.

Returns
label of state

◆ reset()

void rclcpp_lifecycle::State::reset ( )
protected

Member Data Documentation

◆ allocator_

rcutils_allocator_t rclcpp_lifecycle::State::allocator_
protected

◆ owns_rcl_state_handle_

bool rclcpp_lifecycle::State::owns_rcl_state_handle_
protected

◆ state_handle_

rcl_lifecycle_state_t* rclcpp_lifecycle::State::state_handle_
protected

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