Expand description
Phase 212.M.5.a.2 — executor-backed component runtime.
Binds Node / ExecutableNode to a live
Executor so a Node pkg can actually run (versus
MetadataRecorder which
is the planner-side metadata sink).
Gated on rmw-cffi; the underlying Executor is only present
when an RMW backend is linked.
Phase 212.M.5.a.2 — Executor-backed NodeRuntime /
DeclaredNodeRuntime for nano-ros.
MetadataRecorder
(the planner sink) binds the
Node /
ExecutableNode
traits to a pure metadata target. This module is the missing twin:
it binds the same traits to a live Executor so
a Node pkg can actually run — nodes, publishers,
subscriptions, timers materialise as real executor handles, and
every fired callback dispatches into
ExecutableNode::on_callback with the right
CallbackId.
Shape:
use nros::{Executor, ExecutorConfig};
use nros::node_runtime::ExecutorNodeRuntime;
let cfg = ExecutorConfig::from_env().node_name("talker_main");
let executor = Executor::open(&cfg).unwrap();
let mut runtime = ExecutorNodeRuntime::from_executor(executor);
let _handle = runtime.register_node::<Talker>().unwrap();
runtime.spin().unwrap();Owned-spin / board consumer: the macro-emitted <pkg>::register(runtime)
wrapper (Phase 258, Track 2) installs each Node onto the runtime’s executor
through the uniform install_node_typed seam — the same seam the C/C++
typed entries use. The codegen run_plan(runtime) body + nros::main!
owned-spin loop drive one register(runtime)? per launch-XML <node>,
then runtime.spin(). (The retired Phase 212.M.5.a four-fn-ptr BSP-baker
ABI — register_dispatch_slot / nros_run_components — is gone.)
§Coverage today (Phase 212.M.5.a.2)
Publishers, subscriptions, and repeating timers wire end-to-end:
the live executor delivers callbacks; the bound
ExecutableNode::on_callback body runs with a
CallbackCtx backed by the per-component publisher resolver.
Service servers / clients and action servers / clients wire
end-to-end too (Phase 212.M-F.23): create_entity registers them on
the executor with C-ABI trampolines that route inbound requests /
goals into the component’s on_callback, and the tick-time client /
action surface (TickCtx) is backed by RuntimeClientDispatch /
RuntimeActions over the live executor. Parameters are still a
follow-up (registration succeeds; param callbacks don’t fire yet).
Structs§
- Executor
Node Runtime - Executor-backed component runtime.
- Registered
Node - Opaque handle returned by
ExecutorNodeRuntime::register_node.
Enums§
- Executor
Error - Errors returned by the runtime entry points.
Functions§
- install_
node_ ⚠typed - Phase 257 (W0-B) — C-ABI typed component install. Recovers the shared
Executorfrom the foreign typed entry’s handle (global_handle()/Node::executor_handle()= the_opaque*mut Executor; cf. nros-cget_executor_from_ptr) and registersCon it via [register_node_borrowed]. The component’sComponentCellis kept alive by the executor’s own callbackArcclones (phase-257 D1), so this drops the returned cell. Returns0on success,-1on a null handle or a registration error.