Skip to main content

resolve_backend

Function resolve_backend 

Source
pub fn resolve_backend(selector: Option<&[u8]>) -> BackendResolution
Expand description

Phase 128.A.3 — selection policy for the single-backend Executor::open / nros::init path.

Algorithm:

  1. If selector is Some(name) (typically from $NROS_RMW), look it up in the registry. Hit → BackendResolution::Single; miss → BackendResolution::Unknown.
  2. Otherwise, if exactly one backend is registered, return it.
  3. Otherwise, if zero, BackendResolution::NoBackend; if more than one, BackendResolution::Ambiguous.

Callers convert the resolution to a NrosRmwRet via backend_resolution_to_ret.

Bridge consumers (Executor::open_multi) bypass this function and call nros_rmw_cffi_lookup per spec instead.