Skip to main content

nros_rmw_cffi_register_named

Function nros_rmw_cffi_register_named 

Source
pub unsafe extern "C" fn nros_rmw_cffi_register_named(
    name: *const c_char,
    vtable: *const nros_rmw_vtable_t,
) -> rmw_ret_t
Expand description

Phase 104.B.2 — register a backend under a stable name. Multiple backends can coexist (bridge nodes); consumers select via nros_rmw_cffi_lookup or the higher-level Executor::node_builder(...).rmw(...) path.

Names: UTF-8, NUL-terminated, ≤ 31 bytes (excluding NUL). Reserved: “zenoh”, “dds”, “xrce”, “cyclonedds”, future “uorb”. “default” is the implicit name used by nros_rmw_cffi_register.

Duplicate registration of the same name overwrites the previous vtable (idempotent for ctor-fires-twice).

Returns:

  • NROS_RMW_RET_OK on success.
  • NROS_RMW_RET_INVALID_ARGUMENT if name or vtable is NULL, the name is empty, or exceeds 31 bytes.
  • NROS_RMW_RET_ERROR if the registry is full (NROS_RMW_MAX_BACKENDS reached).