Skip to main content

Crate labstream_proto

Crate labstream_proto 

Source
Expand description

The LSL protocol state machines.

This crate holds no input and no output. It takes bytes and events, and it returns bytes and decisions. Every rule comes from SPEC.md, which cites the pinned oracle.

The layering matters. liblsl parses a request inside a socket completion handler (src/tcp_server.cpp:495-500), so a test of that parser needs a network. Here a test calls a function with a byte slice.

§Modules

ModuleHolds
headerThe header block parser and the status line
negotiateThe server decision, as a pure function
feedThe data feed state machine, client side
discoveryThe shortinfo query and answer
timesyncThe time probe and the offset estimator
canonThe canonicalizer for transcript comparison

Re-exports§

pub use header::Error;
pub use header::Headers;
pub use header::StatusAction;
pub use header::StatusLine;
pub use negotiate::negotiate;
pub use negotiate::Accepted;
pub use negotiate::FeedRequest;
pub use negotiate::Outcome;
pub use negotiate::ServerStream;

Modules§

canon
The canonicalizer for transcript comparison.
comp
Lossless wire compression for numeric LSL streams (comp/1). docs/extensions.md, section comp. docs/roadmap.md, step 7.
dgram
The wire formats of the dgram/1 feature. docs/extensions.md, section dgram.
discovery
Discovery over UDP. SPEC.md 2.
features
The feature header between two labstream peers. docs/extensions.md.
feed
The data feed state machine, client side. SPEC.md 4 and 6.
header
The header block parser, and the status line.
meta
In-band live metadata records for the meta/1 feature (docs/extensions.md, section meta, docs/roadmap.md, step 16).
negotiate
The feed negotiation. SPEC.md 5.
select
Channel projection and windowed-sinc FIR decimation for select/1 (docs/roadmap.md, step 6).
seq
The sequence numbers of the seq/1 feature. docs/extensions.md.
timesync
Time synchronization over UDP. SPEC.md 3.