zerodds-transport

Layer 2 — Wire (trait crate). Transport-abstraction trait crate.

Defines the Transport trait (send/receive over Locator addresses) and the typed errors SendError/RecvError. Concrete implementations live in zerodds-transport-{udp,tcp,shm,uds,tsn}.

Spec anchors

  • DDSI-RTPS 2.5 §8.3.2 — Locator wire format (re-exported from zerodds-rtps).
  • ZeroDDS vendor trait — Transport + Send/RecvError + ReceivedDatagram.

Quick start

The trait is the seam between the RTPS state machines and any concrete wire protocol:

use zerodds_transport::{Transport, Locator, SendError};

// Generic over any concrete transport (UDP / TCP / SHM / UDS / TSN)
fn announce<T: Transport>(t: &T, dest: &Locator, beacon: &[u8]) -> Result<(), SendError> {
    t.send(dest, beacon)
}

// Receiving side — recv() yields a ReceivedDatagram { source locator, bytes }
fn poll<T: Transport>(t: &T) -> Result<(), zerodds_transport::RecvError> {
    let _datagram = t.recv()?;
    Ok(())
}

Coverage & tests

The five implementations — zerodds-transport-{udp,tcp,shm,uds,tsn} — each implement this trait. 6 tests; builds no_std (--no-default-features). Run cargo test -p zerodds-transport.

Stability

1.0.0-rc.3. 6 tests green; builds no_std (--no-default-features) and with alloc.

zerodds-transport

Layer 2 — Wire (trait crate). Trait-Crate für die Transport-Abstraktion.

Definiert das Transport-Trait (send/receive über Locator-Adressen) und die typisierten Fehler SendError/RecvError. Konkrete Implementierungen leben in zerodds-transport-{udp,tcp,shm,uds,tsn}.

Spec-Anker

  • DDSI-RTPS 2.5 §8.3.2 — Locator-Wire-Format (re-exportiert aus zerodds-rtps).
  • ZeroDDS-Vendor-Trait — Transport + Send/RecvError + ReceivedDatagram.

Quick Start

Das Trait ist die Naht zwischen den RTPS-State-Machines und jedem konkreten Wire-Protokoll:

use zerodds_transport::{Transport, Locator, SendError};

// Generic over any concrete transport (UDP / TCP / SHM / UDS / TSN)
fn announce<T: Transport>(t: &T, dest: &Locator, beacon: &[u8]) -> Result<(), SendError> {
    t.send(dest, beacon)
}

// Receiving side — recv() yields a ReceivedDatagram { source locator, bytes }
fn poll<T: Transport>(t: &T) -> Result<(), zerodds_transport::RecvError> {
    let _datagram = t.recv()?;
    Ok(())
}

Coverage & Tests

Die fünf Implementierungen — zerodds-transport-{udp,tcp,shm,uds,tsn} — implementieren dieses Trait. 6 Tests; baut no_std (--no-default-features). cargo test -p zerodds-transport.

Stabilität

1.0.0-rc.3. 6 Tests grün; baut no_std (--no-default-features) und mit alloc.