Class State
Defined in File state.hpp
Class Documentation
-
class State
Abstract class for the Lifecycle’s states.
There are 4 primary states: Unconfigured, Inactive, Active and Finalized.
Public Functions
-
explicit 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.
- Parameters:
id – [in] of the state
label – [in] of the state
allocator – [in] a valid allocator used to initialized the state.
-
explicit State(const rcl_lifecycle_state_t *rcl_lifecycle_state_handle, rcutils_allocator_t allocator = rcutils_get_default_allocator())
State constructor.
- Parameters:
rcl_lifecycle_state_handle – [in] structure with the state details
allocator – [in] a valid allocator used to initialized the state.
-
virtual ~State()
-
uint8_t id() const
Return the id.
- Returns:
id of the state
-
std::string label() const
Return the label.
- Returns:
label of state
Protected Functions
-
void reset() noexcept
-
explicit State(rcutils_allocator_t allocator = rcutils_get_default_allocator())