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 —
SchedContextAPI + supporting types.
Structs§
- Action
Client - Typed action client handle.
- Action
Client Callback - Send handle for a callback-based typed action client.
- Action
Server - Typed action server with goal state management.
- Active
Goal - Active goal tracking for action server.
- Completed
Goal - Completed goal with result.
- Embedded
Publisher - Typed publisher handle.
- Embedded
RawPublisher - Typeless publisher handle. Use when the wire format is not ROS CDR (e.g. PX4 uORB raw POD bytes, custom binary protocols).
- Embedded
Service Client - Typed service client handle with internal buffers.
- Embedded
Service Server - Typed service server handle with internal buffers.
- Executor
- Executor
Config - Configuration for opening an embedded executor session.
- Feedback
Stream - A stream of feedback messages from an action server.
- Goal
Feedback Stream - A goal-filtered feedback stream.
- Guard
Condition Handle - Handle for triggering a guard condition from outside the executor.
- Handle
Id - Opaque handle identifier returned by registration methods.
- Handle
Set - A set of handle IDs, represented as a bitset.
- Loan
Future - 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. - Node
Handle - Backend-agnostic node — borrows the session to create typed entities.
- Promise
- A pending reply from a non-blocking service or action call.
- Publish
Loan - Writable loan into a
EmbeddedRawPublisher’s slot. - RawService
Client - Typeless service-client handle. L1 counterpart of
EmbeddedServiceClientfor the same audience asRawServiceServer. - RawService
Server - Typeless service-server handle. L1 counterpart of
EmbeddedServiceServerfor 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. - Readiness
Snapshot - Snapshot of handle readiness at the start of a spin iteration.
- Recv
View - Read-only view into a
RawSubscription’s receive buffer. - Service
Client Callback - Send handle for a callback-based typed service client.
- Session
Handle - Phase 228.E — an opaque,
Sendhandle to anExecutor’s RMW session. - Session
Spec - 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 vianros_rmw_cffi_register_named/ theRMW_INIT_ENTRIESlinker section) and the locator + domain id to open against it. - Spin
Once Result - Result of a single spin iteration
- Spin
Options - Options controlling blocking spin behavior.
- Spin
Period Polling Result - Result from a single period of polling execution (
no_stdcompatible). - Spin
Period Result - Result from a single period with wall-clock measurement (
stdonly). - Subscription
- Typed subscription handle with internal receive buffer.
Enums§
- Executor
Semantics - Data communication semantics for the executor.
- Invocation
Mode - Per-callback invocation mode.
- Loan
Error - Error type for
EmbeddedRawPublisher::try_loan. - Node
Error - 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§
- RawAccepted
Callback - Raw accepted-goal hook.
- RawCancel
Callback - Raw action cancel callback.
- RawFeedback
Callback - Raw action client feedback callback.
- RawGoal
Callback - Raw action goal callback that receives CDR bytes without deserialization.
- RawGoal
Response Callback - Raw action client goal-response callback.
- RawResponse
Callback - Raw service-client response callback.
- RawResult
Callback - Raw action client result callback.
- RawService
Callback - Raw service callback that receives and produces CDR bytes.
- RawSubscription
Callback - Raw subscription callback that receives CDR bytes without deserialization.
- RawSubscription
Info Callback - 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).attachmentis valid forattachment_lenbytes during the call;attachment_len == 0means the sample carried no attachment. Cross-RMW bridges read thebridge_origintag from it.