Skip to main content

Module lifecycle

Module lifecycle 

Source
Expand description

Re-export of the full lifecycle module so examples can reach LifecycleCallbackSlot, LifecyclePollingNodeCtx, etc.

Modules§

trampolines
Monomorphized extern "C" trampolines that recover &mut T from the FFI context pointer and dispatch to the LifecycleCallbacks method. rustc emits one per T, so there is no closure box — no_std-safe. Registered by Executor::register_lifecycle_node; not meant to be called directly.

Structs§

LifecyclePollingNode
Standalone lifecycle state machine for no_std environments.
LifecyclePollingNodeCtx
Lifecycle state machine with unsafe fn(*mut c_void) -> TransitionResult callbacks.

Enums§

LifecycleCallbackSlot
Which transition callback slot to register in LifecyclePollingNodeCtx::register.
LifecycleError
Error type for lifecycle transitions.
LifecycleState
Lifecycle state (REP-2002)
LifecycleTransition
Lifecycle transition (REP-2002)
TransitionResult
Result of a lifecycle transition callback.

Traits§

LifecycleCallbacks
Safe lifecycle-callback surface, symmetric with the C++ nros::LifecycleNode (rclcpp LifecycleNodeInterface). Implement the transitions you need; the rest default to Success (on_error to Failure), matching rclcpp’s non-pure-virtual defaults. Register the node with Executor::register_lifecycle_node, which binds the five REP-2002 services and wires each transition here — no unsafe in user code.

Type Aliases§

LifecycleCallbackFn
Lifecycle callback function pointer (no_std compatible).
LifecycleCallbackFnCtx
Lifecycle callback taking a user context pointer (no_std, C FFI shape).