Function rcl_lifecycle_get_transition_by_id

Function Documentation

const rcl_lifecycle_transition_t *rcl_lifecycle_get_transition_by_id(const rcl_lifecycle_state_t *state, uint8_t id)

Get a state by id.

A pointer to the internally transition struct is returned based on the id. If the id is not set in the state then returns NULL.

Attribute

Adherence

Allocates Memory

No

Thread-Safe

No

Uses Atomics

No

Lock-Free

Yes

Parameters:
  • state[in] pointer to the state struct

  • id[in] identifier to be find in the valid transitions

Returns:

a pointer to the lifecycle transition if the id exists or otherwise it return NULL