Skip to main content

Crate zerodds_recorder

Crate zerodds_recorder 

Source
Expand description

Crate zerodds-recorder. Safety classification: STANDARD.

.zddsrec recording/replay format. Spec: docs/specs/zddsrec-1.0.md.

§Layer position

Layer 4 — core services. Pure Rust + alloc, without ZeroDDS crate deps.

§Public API (as of 1.0.0-rc.1)

§Format layout

A .zddsrec file consists of a Header followed by a sequence of Frame records. Endianness: little-endian for all multi-byte fields.

+---------------------------------+
| Magic "ZDDS" (4 bytes)          |
| Version u32 (=1)                |
| TimeBaseUnixNs i64              |
| ParticipantCount u32            |
| TopicCount u32                  |
| Participants[] (GUID16+nameLen+name)
| Topics[] (typeLen+typeName+nameLen+name)
+---------------------------------+
| FrameMagic 'F' (1 byte)         |
| TimestampDeltaNs i64            |
| ParticipantIdx u32              |
| TopicIdx u32                    |
| SampleKind u8 (0=Alive,1=Disposed,2=Unregistered)
| PayloadLen u32                  |
| CdrPayload[PayloadLen]          |
+---------------------------------+
| ... more frames ...             |
+---------------------------------+

§Versioning

Version = 1 (ZDDSREC_VERSION). Backward-incompatible changes bump the version; the reader rejects unknown versions.

Re-exports§

pub use format::Frame;
pub use format::FrameView;
pub use format::Header;
pub use format::ParticipantEntry;
pub use format::SampleKind;
pub use format::TopicEntry;
pub use format::ZDDSREC_MAGIC;
pub use format::ZDDSREC_VERSION;
pub use reader::ReadError;
pub use reader::RecordReader;
pub use session::RecordingSession;
pub use session::SessionError;
pub use session::SessionOptions;
pub use session::TopicKey;
pub use writer::RecordWriter;
pub use writer::WriteError;

Modules§

format
Format constants + wire structures for .zddsrec.
reader
RecordReader — parses .zddsrec streams into a Header plus a sequence of crate::format::Frame.
session
Live recording session — high-level API for a running capture.
writer
RecordWriter — writes a .zddsrec stream into a std::io::Write sink.