Function rcl_lifecycle_trigger_transition_by_id
Defined in File rcl_lifecycle.h
Function Documentation
-
rcl_ret_t rcl_lifecycle_trigger_transition_by_id(rcl_lifecycle_state_machine_t *state_machine, uint8_t id, bool publish_notification)
Trigger a state by id.
This function will trigger a transition based on the
id
. If the argumentpublish_notification
istrue
then a message will be published in the ROS 2 network notifying the transition, iffalse
no message will be published.Attribute
Adherence
Allocates Memory
No
Thread-Safe
No
Uses Atomics
No
Lock-Free
Yes
- Parameters:
state_machine – [in] pointer to the state machine struct
id – [in] identifier of the transition to be triggered
publish_notification – [in] if the value is
true
a message will be published notifying the transition, otherwise no message will be published
- Returns:
RCL_RET_OK
if the transition was triggered successfully, or- Returns:
RCL_RET_INVALID_ARGUMENT
if any arguments are invalid, or- Returns:
RCL_RET_ERROR
if an unspecified error occurs.