Expand description
Lifecycle node API (REP-2002)
Provides managed lifecycle state machines for nros nodes.
LifecyclePollingNode— standalone state machine with plain function pointers (no_std)LifecyclePollingNodeCtx— standalone state machine withunsafe fn(*mut c_void) -> TransitionResultcallbacks, for bridging the C FFI (no_std)
Modules§
- trampolines
- Monomorphized
extern "C"trampolines that recover&mut Tfrom the FFI context pointer and dispatch to theLifecycleCallbacksmethod. rustc emits one perT, so there is no closure box —no_std-safe. Registered byExecutor::register_lifecycle_node; not meant to be called directly.
Structs§
- Lifecycle
Polling Node - Standalone lifecycle state machine for
no_stdenvironments. - Lifecycle
Polling Node Ctx - Lifecycle state machine with
unsafe fn(*mut c_void) -> TransitionResultcallbacks.
Enums§
- Lifecycle
Callback Slot - Which transition callback slot to register in
LifecyclePollingNodeCtx::register. - Lifecycle
Error - Error type for lifecycle transitions.
Traits§
- Lifecycle
Callbacks - Safe lifecycle-callback surface, symmetric with the C++
nros::LifecycleNode(rclcppLifecycleNodeInterface). Implement the transitions you need; the rest default toSuccess(on_errortoFailure), matching rclcpp’s non-pure-virtual defaults. Register the node withExecutor::register_lifecycle_node, which binds the five REP-2002 services and wires each transition here — nounsafein user code.
Type Aliases§
- Lifecycle
Callback Fn - Lifecycle callback function pointer (
no_stdcompatible). - Lifecycle
Callback FnCtx - Lifecycle callback taking a user context pointer (
no_std, C FFI shape).