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.
- Timestamp
Deducer - Rebuilds a deduced timestamp from the position in the stream.
Enums§
- Byte
Order - 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
f64timestamp. 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.