Skip to main content

Crate rvcsi_adapter_file

Crate rvcsi_adapter_file 

Source
Expand description

§rvCSI file/replay adapter

The .rvcsi capture container, its FileRecorder, and the FileReplayAdapter CsiSource (ADR-095 FR1/FR10, D9).

A .rvcsi file is plain JSONL: the first line is a CaptureHeader describing the session; every subsequent line is one rvcsi_core::CsiFrame serialized as compact JSON. The format is simple, deterministic, append-friendly and trivially inspectable with head / jq.

Typical use:

use rvcsi_adapter_file::{CaptureHeader, FileRecorder, FileReplayAdapter};
use rvcsi_core::{AdapterKind, AdapterProfile, CsiSource, SessionId, SourceId};

let header = CaptureHeader::new(
    SessionId(1),
    SourceId::from("file:lab.rvcsi"),
    AdapterProfile::offline(AdapterKind::File),
);
let mut rec = FileRecorder::create("lab.rvcsi", &header)?;
// rec.write_frame(&frame)?; ...
rec.finish()?;

let mut replay = FileReplayAdapter::open("lab.rvcsi")?;
while let Some(frame) = replay.next_frame()? {
    // hand `frame` downstream — its ValidationStatus is preserved as recorded
    let _ = frame;
}

Structs§

CaptureHeader
Header object — the first line of every .rvcsi capture file.
FileRecorder
Append-only writer for a .rvcsi capture file.
FileReplayAdapter
Deterministic replay source backed by a .rvcsi capture file.

Constants§

CAPTURE_VERSION
Current .rvcsi capture format version. Written into every header and checked on read.

Functions§

read_all
Read an entire .rvcsi capture into memory: its CaptureHeader and every CsiFrame it contains, in recording order.