Skip to main content

Crate nros

Crate nros 

Source
Expand description

§nros

A lightweight ROS 2 client library for embedded systems.

This crate provides a unified API for building ROS 2 nodes in Rust, with support for no_std environments and embedded targets.

§Features

  • no_std compatible: Works on bare-metal and RTOS targets
  • Zero-copy where possible: Minimizes memory allocations
  • Type-safe: Compile-time verification of message types
  • ROS 2 compatible: Interoperates with standard ROS 2 nodes via rmw_zenoh

§Quick Start

ⓘ
use nros::prelude::*;
use std_msgs::msg::Int32;

let config = ExecutorConfig::from_env().node_name("my_node");
let mut executor = Executor::open(&config)?;

let node = executor.node_builder("my_node").build()?;
let publisher = executor.node_mut(node).create_publisher::<Int32>("/my_topic")?;
publisher.publish(&Int32 { data: 42 })?;

executor.node_mut(node).create_subscription::<Int32, _>("/topic", |msg: &Int32| {
    println!("Received: {}", msg.data);
})?;

executor.spin(SpinOptions::default());

§Executor Sizing

The executor’s static memory layout is controlled via environment variables at build time:

  • NROS_EXECUTOR_MAX_CBS (default 4) — maximum number of registered callbacks (subscriptions + timers + services + guard conditions).
  • NROS_EXECUTOR_ARENA_BYTES (default 4096) — byte budget for storing callback closures inline.

A subscription’s arena receive buffer is sized from the MESSAGE TYPE’s own serialized bound, not from that knob, wherever the bound is reachable. .rx_buffer::<N>() is the opt-out: it says “give me exactly N bytes per slot” and skips the derivation, which is what a peer that pads or a .msg bound looser than the traffic needs (e.g. node_mut(id).subscription(t).typed::<M>().rx_buffer::<4096>().build(cb)).

§Transport Backends

nros is RMW- and platform-AGNOSTIC. It carries only the rmw-cffi vtable; the concrete backend (zenoh / xrce / cyclonedds) enters the link graph via the board crate (embedded), the board-less app’s own nros-rmw-* dep (native), or the nros-c/nros-cpp staticlib root (D3), and self-registers — before main on a hosted target (an .init_array ctor; the RMW_INIT_ENTRIES walker at Executor::open before that), or through the board’s explicit <backend>::register(). The concrete session type is resolved automatically; advanced users can access it via nros::internals::RmwSession.

§Crate Features

nros exposes only FUNCTIONAL features — std/alloc, the rmw-cffi vtable, lending, bridge/config, param-services, lifecycle-services, safety-e2e, stream, and the ROS edition (ros-humble/ros-iron). There are NO platform-* or concrete rmw-* selector features. Platform + RMW are selected by the board / staticlib root via dependencies, not nros features. The zephyr_component_main! entry macro is gated only on rmw-cffi (it’s framework entry codegen, like nros::main!), not a platform feature.

ROS edition (select one; the per-distro interop profile):

  • ros-humble - ROS 2 Humble (default; TypeHashNotSupported, XCDR1)
  • ros-iron - ROS 2 Iron (RIHS01 type hash)
  • ros-jazzy - ROS 2 Jazzy (RIHS01; XCDR2/appendable interop is parked)

Other:

  • std (default) - Enable standard library support
  • alloc - Enable heap allocation without full std

§Further Reading

  • guide — tutorials: getting started, services, configuration, ROS 2 interop, and troubleshooting
  • Message Generation — codegen reference (all options, output structure, bundled interfaces)
  • Environment Variables — complete buffer tuning reference
  • ROS 2 Interop — protocol details (key expressions, liveliness, attachments)
  • Examples — working examples by platform (native, QEMU, ESP32, Zephyr)

Re-exports§

pub use retired_env::RETIRED_ENV_VARS;
pub use env::ExecutorConfigEnvExt;
pub use env::rmw_selector;
pub use init::ContextSource;
pub use init::InitError;
pub use init::InitOptions;
pub use init::Context;
pub use init::init;
pub use init::init_with_args;
pub use node::Callback;
pub use node::CallbackCtx;
pub use node::EntityBounds;
pub use node::NodeActionClient;
pub use node::NodeActionServer;
pub use node::NodeDeclError;
pub use node::NodeParameter;
pub use node::NodePublisher;
pub use node::NodeResult;
pub use node::NodeRuntime;
pub use node::NodeServiceClient;
pub use node::NodeServiceServer;
pub use node::NodeSubscription;
pub use node::NodeTimer;
pub use node::TickCtx;
pub use node::CallbackEffects;
pub use node::Component;
pub use node::DeclarativeNode;
pub use node::ExecutableNode;
pub use node::NodeContext;
pub use node_metadata::SourceMetadataExport;
pub use node_metadata::CallbackEffectKind;
pub use node_metadata::CallbackEffectMetadata;
pub use node_metadata::EntityKind;
pub use node_metadata::EntityMetadata;
pub use node_metadata::MetadataRecorder;
pub use node_metadata::MetadataString;
pub use node_metadata::NodeMetadata;
pub use node_metadata::NodeMetadataError;
pub use node_metadata::ParameterDefault;
pub use node_metadata::SourceLocationMetadata;
pub use node_metadata::SourceNameKind;
pub use dispatch_tag::ActionTag;
pub use dispatch_tag::ServiceTag;
pub use dispatch_tag::SubscriptionTag;
pub use node_runtime::ComponentSlotStorage;
pub use node_runtime::ExecutorError;
pub use node_runtime::RegisteredNode;
pub use nros_core::heapless;

Modules§

cdr
CDR encapsulation constants and helpers for FFI layers that handle raw CDR bytes (e.g. nros-c, nros-cpp action and service paths).
config
Build-time runtime configuration.
contract
Contract monitors on target, and the /diagnostics reporter they publish through — ONE implementation for every language.
derive
Derive macros for message types
dispatch_tag
Tag types Node authors hold on Self::State to match against incoming Callback in ExecutableNode::on_callback.
embedded
Prelude module for convenient imports
env
The hosted edge of configuration: every env var nano-ros honours is read here, and the core takes values.
executor_handle
What a void* executor handle crossing the language seam is, and the one check every seam in this crate makes before treating it as an Executor (a C/C++ entry’s handle is an nros-cpp context, not one). What a void* executor handed across the language seam IS.
guide
Tutorials and guides for using nros.
init
Top-level init API, on every target.
internals
Backend-specific internal types.
level_wake
The run-to-completion level runner’s deadlines. The deadlines a run-to-completion level runner wakes its levels for (levels::RunToCompletionLevels), kept apart from it because this half is pure arithmetic over atomics and needs no executor or platform port, so its tests run in the lane that links none.
levels
The Rust sched task runners’ level core: one executor per core, a worker per level. The Rust sched task runners’ LEVEL core: one executor per core, a worker per level over it.
lifecycle
Re-export of the full lifecycle module so examples can reach LifecycleCallbackSlot, LifecyclePollingNodeCtx, etc.
logging
The whole logging facade — sinks, the early-record ring, the throttle primitives, init/flush/add_sink.
monitor
node
Rust component API shared by metadata discovery and generated runtimes.
node_metadata
Node source metadata recorded without opening middleware.
node_runtime
Executor-backed component runtime.
port_park
Installing a port’s park primitive, with the wake-object constraint stated once. Board entries reach it through this facade because that is the dependency they already carry.
prelude
qos
The five presets under their older, shorter names.
retired_env
The retired env aliases the hosted reader refuses. The RETIRED runtime env aliases and their canonical names.
runtime_storage
Caller-supplied storage for the component pool.
sizes
Compile-time opaque storage sizes for FFI consumers.
task_census
The boot task census of a Linux process (/proc/self/task), one reader for both Linux runners. Linux only, as env is. The boot task census of a Linux process: every thread with its scheduling policy and real-time priority, as the RTOS runners print theirs (FreeRTOS, NuttX, ThreadX):
thread_name
What a sched task’s thread is called (nros-<label>). What a sched task’s THREAD is called, for every runner that spawns one.
time
Monotonic time for portable node code.
trace_marker
Application trace markers: one (marker_id, arg) event that the APPLICATION places, emitted through the same installed sink the executor’s own callback events go to.
transport_band
Where a hosted POSIX runner places zenoh-pico’s transport tasks, one decision for both Linux runners. Where a hosted POSIX runner places zenoh-pico’s transport tasks: the floor of the priority plan’s reserved.transport band (packages/boards/linux/nros-board.toml, [90, 99]), above every sched task.

Macros§

declarative_component
Emit a no-op ExecutableNode impl for a declarative-only component (W.5.1). The generated runtime calls on_callback unconditionally, so a component instantiated into a generated binary must impl ExecutableNode; components without callback bodies use this to satisfy that contract:
force_link_backend
Define Zephyr’s rust_main for a self-bringup Rust component package.
log_debug
Emit at crate::Severity::Debug.
log_error
Emit at crate::Severity::Error.
log_fatal
Emit at crate::Severity::Fatal.
log_info
Emit at crate::Severity::Info.
log_warn
Emit at crate::Severity::Warn.
nros_debug_throttle
Emit at crate::Severity::Debug, at most once per interval_ms at this call site.
nros_debug_throttle_at
Emit at crate::Severity::Debug, at most once per interval_ms at this call site, measured against the now_ns the CALLER supplies.
nros_error_throttle
Emit at crate::Severity::Error, at most once per interval_ms at this call site.
nros_error_throttle_at
Emit at crate::Severity::Error, at most once per interval_ms at this call site, measured against the now_ns the CALLER supplies.
nros_fatal_throttle
Emit at crate::Severity::Fatal, at most once per interval_ms at this call site.
nros_fatal_throttle_at
Emit at crate::Severity::Fatal, at most once per interval_ms at this call site, measured against the now_ns the CALLER supplies.
nros_info_throttle
Emit at crate::Severity::Info, at most once per interval_ms at this call site.
nros_info_throttle_at
Emit at crate::Severity::Info, at most once per interval_ms at this call site, measured against the now_ns the CALLER supplies.
nros_trace
Emit at crate::Severity::Trace.
nros_trace_throttle
Emit at crate::Severity::Trace, at most once per interval_ms at this call site.
nros_trace_throttle_at
Emit at crate::Severity::Trace, at most once per interval_ms at this call site, measured against the now_ns the CALLER supplies.
nros_warn_throttle
Emit at crate::Severity::Warn, at most once per interval_ms at this call site.
nros_warn_throttle_at
Emit at crate::Severity::Warn, at most once per interval_ms at this call site, measured against the now_ns the CALLER supplies.
panic_halt
panic_to_platform
rx_buffer_for
Route this image’s panics to its platform — phase-366 W5.c / RFC-0077.
zephyr_component_main

Structs§

ActionClient
Typed action client handle.
ActionServer
Typed action server with goal state management.
ActionServerHandle
Handle to an action server registered in the executor’s arena.
ActiveGoal
Active goal tracking for action server.
BakedBootConfig
Build-time-baked boot config, emitted into the .nros_boot_config linker section by the entry macro / cmake. Fixed-size + pointer-free so a future post-link tool can patch it in place. The resolver reads it on embedded via BootConfig::from_baked (in nros-node).
BootConfig
Session-identity subset a caller supplies to ExecutorConfig::resolve.
CdrReader
CDR reader for deserialization
CdrWriter
Clock
A clock for querying time
CompletedGoal
Completed goal with result.
Duration
ROS Duration representation
EmbeddedPublisher
Typed publisher handle.
EmbeddedRawPublisher
Typeless publisher handle. Use when the wire format is not ROS CDR (e.g. PX4 uORB raw POD bytes, custom binary protocols).
EmbeddedServiceClient
Typed service client handle with internal buffers.
EmbeddedServiceServer
Typed service server handle with internal buffers.
Executor
ExecutorConfig
Configuration for opening an embedded executor session.
ExecutorSizing
Per-entry executor sizing — the entity counts an Executor is built to hold. Public + non-generic (the “C/C++ is a thin wrapper” principle): the entry / macro / FFI supplies these as plain usizes rather than as type/const generics C can’t name. Used to size + carve the backing.
FeedbackStream
A stream of feedback messages from an action server.
FloatingPointRange
Floating point range constraints for parameters
GoalFeedbackStream
A goal-filtered feedback stream.
GoalInfo
Information about a goal
GoalStatusStamped
Goal status with associated goal info
GoalUuid
Unique identifier for a goal – rclrs’s GoalUuid.
GuardCondition
Handle for triggering a guard condition from outside the executor.
HandleId
Opaque handle identifier returned by registration methods.
HandleSet
A set of handle IDs, represented as a bitset.
IntegerRange
Integer range constraints for parameters
LifecyclePollingNode
Standalone lifecycle state machine for no_std environments.
LogRecord
One log entry, handed to each LogSink.
Logger
A named logger with a runtime severity threshold.
MandatoryParameter
A parameter that must always have a value
MessageInfo
Metadata about a received message
Node
A ROS 2 node — rclrs’s Node, and the ONE node type.
NodeKey
Which node a parameter belongs to.
NodeOptions
Runtime-neutral node construction options.
OnSetContext
Two machine words of caller context, carried verbatim to an OnSetParameterFn.
OnSetParameterHandle
A registered OnSetParameterFn, returned by ParameterServer::add_on_set_parameters_callback and consumed by ParameterServer::remove_on_set_parameters_callback.
OptUs
Optional time field with a sentinel 0 for “absent”.
OptionalParameter
A parameter that may or may not have a value
Parameter
A named parameter with value and optional descriptor
ParameterBuilder
Builder for declaring a typed parameter
ParameterDescriptor
Parameter descriptor containing metadata
ParameterServer
Parameter server over caller-owned storage
ParameterStorage
Backing storage a caller places, then lends to a ParameterServer.
ParameterTable
The slot table a ParameterServer borrows.
Parameters
Provides access to undeclared parameters in a ParameterServer
PrimitiveOptions
rclrs’s PrimitiveOptions: an entity’s name plus the QoS policies its create site stated.
Promise
A pending reply from a non-blocking service or action call.
PublishLoan
Writable loan into a EmbeddedRawPublisher’s slot.
PublisherOptions
Options for creating a publisher
QoSOverride
One per-topic QoS override, lowered from a ROS 2 qos_overrides.<topic>.<role>.<policy> launch parameter by the planner and baked into a &'static [QoSOverride] table by the entry codegen. The node folds the matching entries into the entity’s QoSProfile at create_publisher / create_subscription time (setup-time, single linear scan, no alloc), before the backend-compat validate_against — so an override the active RMW can’t honour still errors loudly, never a silent downgrade.
QoSPolicyMask
Bitmask of QoS policies a backend can honour. See Session::supported_qos_policies.
QoSProfile
Full DDS-shaped QoS profile. Matches the field set of upstream rmw_qos_profile_t.
RawActiveGoal
Goal tracked by the core — GoalUuid, status and acceptance stamp; no typed data.
RawMessageInfo
Raw-subscription message info: MessageInfo metadata plus the sample’s wire-level attachment bytes, borrowed for the callback scope.
RawSubscription
Typeless subscription handle. Counterpart of EmbeddedRawPublisher.
ReadOnlyParameter
A parameter whose value cannot be changed after declaration
ReadinessSnapshot
Snapshot of handle readiness at the start of a spin iteration.
RecvView
Read-only view into a RawSubscription’s receive buffer.
RequestId
Identity of one service request — rclrs’s RequestId, upstream’s rmw_request_id_t.
SchedContext
First-class scheduling capability — one SC per scheduling concern, shared by every callback that should run under the same budget / period / deadline / class.
SchedContextId
Identifier for a SchedContext registered with an Executor. 110.B.b adds storage [Option<SchedContext>; MAX_SC]; this index addresses into that array.
SchedTaskBackingShort
The spawned sched tasks’ executor backing. nros::main! emits one SchedTaskExecutorBacking static per sched-task entry and hands its slots to the board’s run_sched_tasks, which refuses a short block through check_sched_task_executor_backing and opens each spawned sched task with Executor::open_with_session_slot. Gated like the module it names (has_rmw + alloc in nros-node). The sched task backing a board was handed does not cover the sched tasks it must spawn. Carries both counts so the refusal names them.
SchedTaskExecutorBacking
The spawned sched tasks’ executor backing. nros::main! emits one SchedTaskExecutorBacking static per sched-task entry and hands its slots to the board’s run_sched_tasks, which refuses a short block through check_sched_task_executor_backing and opens each spawned sched task with Executor::open_with_session_slot. Gated like the module it names (has_rmw + alloc in nros-node). The spawned sched tasks’ executor backing, N slots in ONE named static that the ENTRY owns.
SchedTaskMemory
Each spawned sched task’s TASK memory (stack + control block): nros::main! emits one SchedTaskMemory static per spawned sched task, sized from its stack_bytes, and hands the SchedTaskMemorySet rows to a board whose sched task runner creates the task over them (FreeRTOS xTaskCreateStatic). One spawned sched task’s stack and control block, as ONE named static the entry owns. STACK_U64S is the sched task’s stack in 8-byte words; TCB_U64S the control-block region, SCHED_TASK_TCB_U64S by default and 0 for a kernel whose control block the port keeps itself (Zephyr’s struct k_thread — a Rust entry cannot size it).
SchedTaskMemoryRaw
Each spawned sched task’s TASK memory (stack + control block): nros::main! emits one SchedTaskMemory static per spawned sched task, sized from its stack_bytes, and hands the SchedTaskMemorySet rows to a board whose sched task runner creates the task over them (FreeRTOS xTaskCreateStatic). One spawned sched task’s RTOS task memory as a board receives it: raw, Copy, no lifetime. The ENTRY owns the bytes (SchedTaskMemory); the handout is once-only (SchedTaskMemorySet::take), which is what makes the raw pointers exclusive.
SchedTaskMemorySet
Each spawned sched task’s TASK memory (stack + control block): nros::main! emits one SchedTaskMemory static per spawned sched task, sized from its stack_bytes, and hands the SchedTaskMemorySet rows to a board whose sched task runner creates the task over them (FreeRTOS xTaskCreateStatic). The spawned sched tasks’ task memory, N rows in spawn (chain) order, behind a once-only latch.
SchedTaskSetupGate
The spawned sched tasks’ executor backing. nros::main! emits one SchedTaskExecutorBacking static per sched-task entry and hands its slots to the board’s run_sched_tasks, which refuses a short block through check_sched_task_executor_backing and opens each spawned sched task with Executor::open_with_session_slot. Gated like the module it names (has_rmw + alloc in nros-node). The ONE gate a tier runner holds across each tier’s open-and-setup so no two sched tasks declare entities on the shared session at once.
SchedTaskSetupGuard
The spawned sched tasks’ executor backing. nros::main! emits one SchedTaskExecutorBacking static per sched-task entry and hands its slots to the board’s run_sched_tasks, which refuses a short block through check_sched_task_executor_backing and opens each spawned sched task with Executor::open_with_session_slot. Gated like the module it names (has_rmw + alloc in nros-node). Proof of holding a SchedTaskSetupGate; dropping it opens the gate.
ServiceClient
Service client handle
ServiceInfo
Metadata about one received service request — rclrs’s ServiceInfo.
ServiceServer
Service server handle
SessionHandle
An opaque, Send handle to an Executor’s RMW session.
SessionSpec
Per-backend session declaration for Executor::open_multi. Each spec names an RMW backend (must match one a backend registered under via nros_rmw_cffi_register_named, which its self-registration calls) and the locator + domain id to open against it.
ShutdownCallbackHandle
Handle to a registered shutdown hook, returned by ExecutorFfi::add_pre_shutdown_callback / ExecutorFfi::add_on_shutdown_callback (the FFI trait in executor::ffi) and consumed by the matching remove_*. rclcpp’s PreShutdownCallbackHandle / OnShutdownCallbackHandle.
SpinOnceResult
Result of a single spin iteration
SpinOptions
Options controlling a blocking spin loop — rclrs’s SpinOptions.
SpinPeriodPollingResult
Result from a single period of polling execution (no_std compatible).
SpinPeriodResult
Result from a single period with monotonic-clock measurement.
Subscription
Typed subscription handle with internal receive buffer.
SubscriptionOptions
Options for creating a subscriber
ThrottleState
Per-call-site throttle window.
Time
ROS Time representation
TimeTriggeredSchedule
Fixed-size, no_std-friendly cyclic schedule. N is the declared maximum window count; window_count is the active length (callers can build the array up to N and set window_count to the actual size used).
TimeTriggeredWindow
One slot in a time-triggered schedule.
TimerCallInfo
When a timer activation was DUE and when it actually RAN — the Jazzy rcl_timer_call_info_t / rclcpp::TimerInfo pair.
TimerDuration
Duration type for timer periods
TimerHandle
A handle to a timer stored in a node
TimerState
Internal timer state
WallClockState
What the wall-clock stamps mean right now: the answer to nros_platform_wall_clock_state(), field for field.

Enums§

BootConfigError
CancelResponse
Per-goal cancel decision returned from a server’s cancel callback.
CancelResponseCode
action_msgs/srv/CancelGoal RPC return codes.
ClockType
Type of clock to use for time queries
DeadlineAction
What the executor DOES when a dispatched callback runs past its bound SC’s deadline_us. Distinct from DeadlinePolicy (which says where the deadline COMES from); this is the miss REACTION, lowered from the sched task table’s deadline_policy string (ignore | warn | skip | fault).
DeadlinePolicy
How an EDF deadline is interpreted relative to a callback firing.
DeclarationError
Why a declaration was refused.
DeserError
Deserialization error.
DispatchStrategy
How a Node expects its callbacks to fire.
ExecutorSemantics
Data communication semantics for the executor.
GoalResponse
Goal accept/reject response codes
GoalStatusCode
Goal status states – rclrs’s GoalStatusCode.
InvocationMode
Per-callback invocation mode.
LifecycleError
Error type for lifecycle transitions.
LifecycleState
Lifecycle state (REP-2002)
LifecycleTransition
Lifecycle transition (REP-2002)
LoanError
Error type for EmbeddedRawPublisher::try_loan.
NodeError
Error type for generic embedded node operations.
ParameterError
Error type for typed parameter operations
ParameterRange
Range constraints for a parameter
ParameterType
ROS 2 parameter types
ParameterValue
Parameter value container
Priority
Criticality bucket for SchedContext. The ready set uses this to pick which RankedFifoSet / BucketedEdfSet slot a callback dispatches through; later work maps it to OS priority.
QoSDurabilityPolicy
QoS durability policy
QoSHistoryPolicy
QoS history policy
QoSLivelinessPolicy
QoS liveliness policy. Matches DDS LIVELINESS semantics.
QoSOverrideRole
Which side of a topic a QoSOverride targets. Mirrors the <role> segment of a ROS 2 qos_overrides.<topic>.<role>.<policy> launch parameter.
QoSOverrideValue
A single policy value a QoSOverride sets. A typed enum (not a string) so the codegen that bakes these from the plan catches an unknown policy / mistyped value at generation time rather than silently no-op-ing at runtime.
QoSReliabilityPolicy
QoS reliability policy
SchedClass
Scheduling class — picks the runtime queue + selection policy for the contained callbacks.
SerError
Serialization error.
SessionMode
Session mode
SetParameterResultDeprecated
Deprecated: the store answers Result<(), ParameterError>. Result of setting a parameter
Severity
REP-2012 severity levels: rcutils’s five, in rcutils’s order, plus Trace.
ShutdownPhase
Which of the two ordered shutdown phases a hook belongs to.
TimeTriggeredScheduleError
Validation errors for a TimeTriggeredSchedule.
TimerClockSource
Which clock advances a timer (this is the distinction rclcpp draws between create_wall_timer and create_timer).
TimerMode
Timer mode (repeating, one-shot, or inert)
TransitionResult
Result of a lifecycle transition callback.
TransportError
Transport error types.
Trigger
Executor-level trigger condition.
WakeSourceId
The other half of the seam, for the boards that now use it.
WallClockSource
Which source answers the wall clock (WallClockState::source); the values of NROS_WALL_CLOCK_SOURCE_* in nros/platform.h.

Constants§

BOOT_SET_DOMAIN
Bit 2 — domain_id field is set.
BOOT_SET_LOCATOR
Bit 1 — locator field is set.
BOOT_SET_NAMESPACE
Bit 3 — namespace field is set.
BOOT_SET_NODE_NAME
Bit 0 — node_name field is set.
DEFAULT_RX_BUF_SIZE
The configured default receive-buffer size (NROS_EXECUTOR_SUBSCRIPTION_BUFFER_BYTES).
DOMAIN_ID_EXPLICIT_ZERO_C_ABI
C/C++-ABI escape for an EXPLICIT domain 0.
DOMAIN_ID_MAX
Maximum valid ROS 2 domain ID. The ROS 2 / DDS convention (RTPS port arithmetic) caps usable domains at 232; values above it are a configuration error in EVERY language front-end (never a silent clamp or silent 0). Mirrored into the generated C header — keep the mirror in sync (a drifted copy is a real bug class).
EXECUTOR_BACKING_DEFAULT_U64S
The spawned sched tasks’ executor backing. nros::main! emits one SchedTaskExecutorBacking static per sched-task entry and hands its slots to the board’s run_sched_tasks, which refuses a short block through check_sched_task_executor_backing and opens each spawned sched task with Executor::open_with_session_slot. Gated like the module it names (has_rmw + alloc in nros-node). The reservation’s size when nothing overrides it: one default-sized executor’s worth.
MAX_LEVELS
Which level an executor is, and whether every level of the image is alive: what a supervisor that owns a route per level or feeds a watchdog reads, and what a board’s sched task runner states (the level count, and each sched task’s level by sched_task_level_by). Plain atomics in nros-node, so ungated. Levels one image can have: CONFIG_NROS_EXECUTOR_MAX_LEVELS’s upper end, one bit each in the check-in word.
MAX_LOGGERS
Maximum number of named loggers that can be registered via register_logger. Beyond this, get_logger returns DEFAULT_LOGGER.
MAX_ON_SET_CALLBACKS
How many on-set-parameters callbacks ONE store holds, across every node.
MAX_WAKE_SOURCES
The other half of the seam, for the boards that now use it.
NROS_BOOT_CONFIG_MAGIC
0x4E524243 = ASCII “NRBC”. A post-link tool scans for this magic to locate the struct in a firmware image.
NROS_BOOT_CONFIG_VERSION
Layout version — lets the resolver reject a mismatched baked struct.
PUBLISHER_GID_SIZE
Size of the publisher Global Identifier (GID), in bytes.
QOS_PROFILE_ACTION_STATUS_DEFAULT
The action-status preset — reliable + transient-local, depth 1.
QOS_PROFILE_CLOCK
The clock preset — sensor-data shaped with depth 1.
QOS_PROFILE_DEFAULT
Standard ROS-2-equivalent QoS profiles. Match upstream rmw_qos_profile_default etc. field-by-field. Backends validate against these synchronously at create time; no silent downgrade. rmw_qos_profile_default — reliable, volatile, keep-last(10).
QOS_PROFILE_PARAMETERS
rmw_qos_profile_parameters — reliable, depth 1000.
QOS_PROFILE_PARAMETER_EVENTS
rmw_qos_profile_parameter_events.
QOS_PROFILE_SENSOR_DATA
rmw_qos_profile_sensor_data — best-effort, keep-last(5).
QOS_PROFILE_SERVICES_DEFAULT
rmw_qos_profile_services_default.
QOS_PROFILE_SYSTEM_DEFAULT
rmw_qos_profile_system_default — the RMW implementation’s own defaults.
REQUEST_WRITER_GUID_SIZE
Width of RequestId::writer_guid, in bytes.
SCHED_TASK_TCB_U64S
Each spawned sched task’s TASK memory (stack + control block): nros::main! emits one SchedTaskMemory static per spawned sched task, sized from its stack_bytes, and hands the SchedTaskMemorySet rows to a board whose sched task runner creates the task over them (FreeRTOS xTaskCreateStatic). The control-block region every SchedTaskMemory carries, in 8-byte words. An UPPER BOUND over the kernels that take it (a FreeRTOS StaticTask_t on Cortex-M is about a hundred bytes); the port REFUSES a region smaller than its own control block at spawn, by name, so a kernel whose block outgrows this fails loudly rather than overrunning the stack that follows. Rust cannot name a C type’s size at macro time, which is why this one number is a bound and the stack beside it is exact.
STORE_SIZE_DERIVED
When the store’s size is derived instead of stated. The second line of the report; see STORE_SIZE_KNOB.
STORE_SIZE_KNOB
The knob that sizes the parameter store, in every spelling a user writes.

Statics§

DEFAULT_LOGGER
Catch-all logger returned when the requested name is not registered (or the intern table is full).

Traits§

BoardConfig
Universal board configuration accessors.
Deserialize
Trait for types that can be deserialized from CDR format
IntoNodeOptions
rclrs’s IntoNodeOptions: anything a node can be created from — a bare name ("talker") or a full NodeOptions — so executor.create_node("talker") and executor.create_node("talker".namespace("/robot")) read as they do in rclrs.
IntoPrimitiveOptions
rclrs’s IntoPrimitiveOptions: anything an entity can be created from — a bare name or a PrimitiveOptions — with rclrs’s QoS steps chained onto it ("chatter".keep_last(10).reliable()).
LogSink
Backend a log record is delivered to.
ParameterVariant
Trait for types that can be used as typed parameters
RosAction
Trait for ROS 2 action types
RosMessage
Trait for ROS message types
RosService
Trait for ROS service types
SecNanosecMsg
A generated message whose field set is { sec: i32, nanosec: u32 } — builtin_interfaces/msg/Time and its Duration twin.
Serialize
Trait for types that can be serialized to CDR format

Functions§

action_channel_type
The per-channel DDS type name for a RAW-registered action server.
arena_size_for
Default arena bytes for a per-entry executor holding cbs callback slots. Scales the build-time ARENA_SIZE (which is sized for the default MAX_CBS) linearly by cbs, so a per-entry ExecutorSizing with a caller-chosen cbs gets the same per-slot arena budget the global default used — a fat entry (more callbacks) gets a larger arena, a lean one a smaller one — without a workspace-global NROS_EXECUTOR_ARENA_BYTES. Floored at the full default so no per-entry executor is ever smaller than a single-slot build would have been (the arena is a worst-case upper bound; over-provision is safe, under-provision fails entity creation).
baked_domain_from_c_abi
Map the C/C++ ABI’s u8 domain argument onto the resolver’s baked rung.
check_sched_task_executor_backing
The spawned sched tasks’ executor backing. nros::main! emits one SchedTaskExecutorBacking static per sched-task entry and hands its slots to the board’s run_sched_tasks, which refuses a short block through check_sched_task_executor_backing and opens each spawned sched task with Executor::open_with_session_slot. Gated like the module it names (has_rmw + alloc in nros-node). The ONE refusal every board’s run_sched_tasks makes before it opens anything: n_sched_tasks sched tasks run, one on the boot executor, so n_sched_tasks - 1 must each find a slot. Checked up front rather than at each spawn, so a short block never leaves a half-spawned sched task chain.
every_level_alive
Which level an executor is, and whether every level of the image is alive: what a supervisor that owns a route per level or feeds a watchdog reads, and what a board’s sched task runner states (the level count, and each sched task’s level by sched_task_level_by). Plain atomics in nros-node, so ungated. Whether every level of the image has checked in since the last take_every_level_alive that returned true.
fully_qualified_name
The node-FQN join, at the crate root because that is where a user looks after Executor::get_node_names hands them the two halves. nros_node::names also has expand_name / resolve_name, which stay behind node_metadata — they are the entity-name seam, not this. The ONE name-resolution seam: ROS 2 source-name expansion (~/relative → FQN, ns=/ collapse) + launch remap substitution (exact-FQN match, first rule wins; no wildcards). Implemented in nros_node::names so both the Rust ExecutorSink and the C-ABI executor-side remap table share one lowering; re-exported here next to SourceNameKind as the source-metadata-level entry point. A node’s fully-qualified name, joined from its two halves.
get_logger
Look up a registered logger by name. Returns DEFAULT_LOGGER if none is registered (call register_logger for a 'static Logger to publish one).
get_or_create_logger
Look up a logger by name, CREATING one if the name is new.
level_count
Which level an executor is, and whether every level of the image is alive: what a supervisor that owns a route per level or feeds a watchdog reads, and what a board’s sched task runner states (the level count, and each sched task’s level by sched_task_level_by). Plain atomics in nros-node, so ungated. How many levels the image runs.
level_last_spin_us
Which level an executor is, and whether every level of the image is alive: what a supervisor that owns a route per level or feeds a watchdog reads, and what a board’s sched task runner states (the level count, and each sched task’s level by sched_task_level_by). Plain atomics in nros-node, so ungated. The low 32 bits of the executor clock, in microseconds, at level’s latest spin; None when it has not spun (or spins with no clock).
level_spins
Which level an executor is, and whether every level of the image is alive: what a supervisor that owns a route per level or feeds a watchdog reads, and what a board’s sched task runner states (the level count, and each sched task’s level by sched_task_level_by). Plain atomics in nros-node, so ungated. How many times level has spun.
register_logger
Publish logger under its name so subsequent get_logger calls with that name return THIS reference.
sched_task_level
Which level an executor is, and whether every level of the image is alive: what a supervisor that owns a route per level or feeds a watchdog reads, and what a board’s sched task runner states (the level count, and each sched task’s level by sched_task_level_by). Plain atomics in nros-node, so ungated. sched_task_level_by over a slice of priorities.
sched_task_level_by
Which level an executor is, and whether every level of the image is alive: what a supervisor that owns a route per level or feeds a watchdog reads, and what a board’s sched task runner states (the level count, and each sched task’s level by sched_task_level_by). Plain atomics in nros-node, so ungated. The level of sched task index of an image whose n sched tasks have the kernel priorities priority_of(0..n): its urgency order, 0 the most urgent, equal priorities in array order. For now a level is a sched task, so this is how a runner places each sched task’s executor (Executor::set_level). nros codegen entry writes NROS_ENTRY_LEVEL_OF_<node> by the same rule, over the same array. None when index is out of range.
set_level_count
Which level an executor is, and whether every level of the image is alive: what a supervisor that owns a route per level or feeds a watchdog reads, and what a board’s sched task runner states (the level count, and each sched task’s level by sched_task_level_by). Plain atomics in nros-node, so ungated. State how many levels the image runs (its runner does, once, before the levels spin). false, and nothing changed, for 0 or more than MAX_LEVELS. An image that never states it has one level.
take_every_level_alive
Which level an executor is, and whether every level of the image is alive: what a supervisor that owns a route per level or feeds a watchdog reads, and what a board’s sched task runner states (the level count, and each sched task’s level by sched_task_level_by). Plain atomics in nros-node, so ungated. The watchdog feed: true when every level has checked in since the last true, and the check-ins are then cleared; false, and nothing cleared, while any level has not.
wall_clock_state
The wall clock’s state from the linked port, or None when this build has no port to ask (no platform-clock), the same condition under which Clock::system falls back to its counter.

Type Aliases§

CancelReturnCodeDeprecated
The former name of CancelResponseCode.
DeferNotify
The notifier Executor::set_defer_notifier installs: called with the host’s context and the HandleId of a deferred callback that has just been queued.
GoalIdDeprecated
The former name of GoalUuid.
GoalStatusDeprecated
The former name of GoalStatusCode.
LifecycleCallbackFn
Lifecycle callback function pointer (no_std compatible).
NextDeadlineFn
The other half of the seam, for the boards that now use it.
OnSetParameterFn
An on-set-parameters callback.
RawCancelCallback
Raw action cancel callback.
RawGoalCallback
Raw action goal callback that receives CDR bytes without deserialization.
RawServiceCallback
Raw service callback that receives and produces CDR bytes.
RawSubscriptionCallback
Raw subscription callback that receives CDR bytes without deserialization.
SchedTaskExecutorBackingSlot
The spawned sched tasks’ executor backing. nros::main! emits one SchedTaskExecutorBacking static per sched-task entry and hands its slots to the board’s run_sched_tasks, which refuses a short block through check_sched_task_executor_backing and opens each spawned sched task with Executor::open_with_session_slot. Gated like the module it names (has_rmw + alloc in nros-node). One spawned sched task executor’s backing: exactly the words an executor opened with ExecutorSizing::DEFAULT carves.
ShutdownCallbackFn
A shutdown hook: extern "C" so the same slot serves Rust, C and C++ without a second registry, and so no allocator is involved.
TimerCallbackFn
Timer callback as a bare function pointer (no_std, no heap required).
UndeclaredParametersDeprecated
The former name of Parameters.