Expand description
Sockets, timers, and interfaces for LSL.
This is the only crate in the workspace that touches the operating system.
Every protocol rule lives in labstream-proto and labstream-wire, which hold no input
and no output.
The split matters for testing. A protocol rule gets a unit test with a byte slice. Only this crate needs a network, and only its tests are allowed to be slow.
Re-exports§
pub use calibrate::CalibrationOptions;pub use calibrate::CalibrationResult;pub use clock::ClockState;pub use clock::LiveSource;pub use config::Config;pub use desc::Node;pub use health::ConsumerHealth;pub use health::Gap;pub use health::GapKind;pub use health::InletHealth;pub use health::OutletHealth;pub use info::StreamInfo;pub use inlet::build_property_query;pub use inlet::read_fullinfo;pub use inlet::resolve;pub use inlet::Inlet;pub use outlet::Outlet;pub use queue::Fanout;pub use queue::SampleQueue;pub use relay::RelayOptions;pub use relay::StreamRelay;pub use resolver::ContinuousResolver;pub use sync::SyncGroup;pub use ws::WsBridge;pub use ws::WsOptions;
Modules§
- calibrate
- Device-delay calibration against a reference trigger stream
(
docs/roadmap.md, step 15). - clock
- The clock offset that an inlet measures against its outlet. SPEC.md 3.
- config
- The configuration file.
- desc
- The description tree, and the whole document that carries it.
- doctor
- Network diagnostics for LSL discovery (
labstream doctor). - enc
- Opt-in negotiated transport encryption (
enc/1,docs/roadmap.md, step 14). - health
- Stream health snapshots and gap tracking for inlets and outlets.
- history
- The history of an outlet for the
resumefeature (docs/extensions.md, sectionresume) and disk-backed store-and-forward (docs/roadmap.md, step 3). - info
- The stream description, and the query subset that a resolver sends.
- inlet
- The inlet: a resolver and a TCP feed client.
- netif
- Cross-platform network interface and neighbor enumeration.
- outlet
- The outlet: a discovery responder and a TCP feed server.
- queue
- A bounded sample queue that drops the oldest sample. SPEC.md 8.7.
- relay
- Local-to-network LSL stream relay (
docs/roadmap.md, step 4). - resolver
- The background resolver.
- sync
- Live multi-inlet time-grid aligner and resampler (
docs/roadmap.md, step 18). - ws
- Zero-dependency RFC 6455 WebSocket bridge for browser reach
(
docs/roadmap.md, step 13). - xpath
- The query language that a resolver uses.
Structs§
- Aligned
Sample - One aligned sample on the common monotonic output grid.
- Metadata
Update - One live metadata change emitted by an outlet.
- Select
Param - The parameter of a
select/1offer and answer (docs/roadmap.md, step 6). - Sync
Config - Configuration for
StreamAlignerandSyncGroup.
Constants§
- BASE_
PORT - The default base port.
src/api_config.cpp:170. - MULTICAST_
PORT - The port that carries a multicast or broadcast query.
- PORT_
RANGE - The default port range.
src/api_config.cpp:171. - SESSION_
ID - The session that a stream belongs to, when no file names another.
Functions§
- clock
- The clock that LSL timestamps use.
- local_
interface_ indexes - The index of every interface on this machine, with zero at the front.
- local_
ipv4_ addresses - Every local IPv4 address on this machine.
- make_
query_ id - Build an opaque discovery token.
- make_
uid - Build a stream instance identifier.