Skip to main content

Module executor

Module executor 

Source
Expand description

Embedded executor with build-time configured arena.

Provides Executor and Node that work with the compile-time selected RMW backend (zenoh, XRCE-DDS, or C FFI).

§Example

use nros_node::executor::*;
use std_msgs::msg::Int32;

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

let publisher = node.create_publisher::<Int32>("/chatter")?;
publisher.publish(&Int32 { data: 42 })?;

loop {
    executor.spin_once(core::time::Duration::from_millis(10));
}

Re-exports§

pub use action::ActionClientRawHandle;
pub use action::ActionServerHandle;
pub use action::ActionServerRawHandle;
pub use action::RawActionClientSpec;
pub use action::RawActionServerSpec;
pub use action_core::ActionClientCore;
pub use action_core::ActionServerCore;
pub use action_core::RawActiveGoal;
pub use node_record::NodeBuilder;
pub use node_record::NodeId;
pub use node_record::NodeRecord;

Modules§

action
Action server and client registration on the executor and handle types.
action_core
Type-agnostic action protocol core types.
handoff
Phase 104.E.3 — cross-priority handoff queue.
node_record
Phase 104.C.2 — multi-Node-per-Executor storage.
sched_context
Phase 110.B — SchedContext API + supporting types.

Structs§

ActionClient
Typed action client handle.
ActionClientCallback
Send handle for a callback-based typed action client.
ActionServer
Typed action server with goal state management.
ActiveGoal
Active goal tracking for action server.
CompletedGoal
Completed goal with result.
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.
FeedbackStream
A stream of feedback messages from an action server.
GoalFeedbackStream
A goal-filtered feedback stream.
GuardConditionHandle
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.
LoanFuture
Future returned by EmbeddedRawPublisher::loan. Phase 99.H’ cancellation-safe variant: if dropped before resolving, it wakes the next pending waiter so the busy-flag-clear signal isn’t lost to the cancelled task.
NodeHandle
Backend-agnostic node — borrows the session to create typed entities.
Promise
A pending reply from a non-blocking service or action call.
PublishLoan
Writable loan into a EmbeddedRawPublisher’s slot.
RawServiceClient
Typeless service-client handle. L1 counterpart of EmbeddedServiceClient for the same audience as RawServiceServer.
RawServiceServer
Typeless service-server handle. L1 counterpart of EmbeddedServiceServer for callers that own their own scheduler (RTIC, embassy, FreeRTOS-task-per-entity) and the C / C++ FFI shims.
RawSubscription
Typeless subscription handle. Counterpart of EmbeddedRawPublisher.
ReadinessSnapshot
Snapshot of handle readiness at the start of a spin iteration.
RecvView
Read-only view into a RawSubscription’s receive buffer.
ServiceClientCallback
Send handle for a callback-based typed service client.
SessionHandle
Phase 228.E — an opaque, Send handle to an Executor’s RMW session.
SessionSpec
Phase 128.F.1 — 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 / the RMW_INIT_ENTRIES linker section) and the locator + domain id to open against it.
SpinOnceResult
Result of a single spin iteration
SpinOptions
Options controlling blocking spin behavior.
SpinPeriodPollingResult
Result from a single period of polling execution (no_std compatible).
SpinPeriodResult
Result from a single period with wall-clock measurement (std only).
Subscription
Typed subscription handle with internal receive buffer.

Enums§

ExecutorSemantics
Data communication semantics for the executor.
InvocationMode
Per-callback invocation mode.
LoanError
Error type for EmbeddedRawPublisher::try_loan.
NodeError
Error type for generic embedded node operations.
Trigger
Executor-level trigger condition.

Constants§

DEFAULT_LOAN_BUF
Default size of each per-publisher arena slot, in bytes.

Type Aliases§

RawAcceptedCallback
Raw accepted-goal hook.
RawCancelCallback
Raw action cancel callback.
RawFeedbackCallback
Raw action client feedback callback.
RawGoalCallback
Raw action goal callback that receives CDR bytes without deserialization.
RawGoalResponseCallback
Raw action client goal-response callback.
RawResponseCallback
Raw service-client response callback.
RawResultCallback
Raw action client result callback.
RawServiceCallback
Raw service callback that receives and produces CDR bytes.
RawSubscriptionCallback
Raw subscription callback that receives CDR bytes without deserialization.
RawSubscriptionInfoCallback
Raw subscription callback that also receives the incoming sample’s wire-level attachment (Phase 189.M3.4 — the C analog of the Rust FnMut(&[u8], &RawMessageInfo) builder path). attachment is valid for attachment_len bytes during the call; attachment_len == 0 means the sample carried no attachment. Cross-RMW bridges read the bridge_origin tag from it.