Skip to main content

Crate labstream_wire

Crate labstream_wire 

Source
Expand description

The LSL sample codec for protocol 1.10.

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

The codec is the one part of LSL that a test can compare byte for byte. A fixed sample with a fixed byte order always produces the same bytes.

Structs§

Codec
Everything a codec call needs to know about the connection.
Sample
One sample: a timestamp and one value per channel.
TimestampDeducer
Rebuilds a deduced timestamp from the position in the stream.

Enums§

ByteOrder
The byte order that a connection selected.
Error
A decode error.
Format
A channel format. The values match include/lsl/common.h:64-84.
Value
One channel value.

Constants§

DEDUCED_TIMESTAMP
The timestamp value that means “deduce this on the reading side”.
IRREGULAR_RATE
The nominal rate that means “this stream has no fixed rate”.
TAG_DEDUCED_TIMESTAMP
Tag that starts a sample with no timestamp bytes. SPEC.md 7.1.
TAG_TRANSMITTED_TIMESTAMP
Tag that starts a sample with an f64 timestamp. SPEC.md 7.1.
TEST_PATTERN_OFFSETS
The two offsets that a feed sends, in order. SPEC.md 6.1.
TEST_PATTERN_TIMESTAMP
The timestamp that every test pattern sample carries.

Functions§

test_pattern
Build the test pattern sample that a feed sends.