lsl library

The liblsl.dart Library for LSL (Lab Streaming Layer) functionality.

Classes

LSL
Interface to the LSL library.
LSLApiConfig
LSL API Configuration class for Dart FFI wrapper of liblsl Represents the configuration options available in liblsl's configuration file. For more details, refer to the official LSL documentation: https://labstreaminglayer.readthedocs.io/info/lslapicfg.html Specifically, if you would like to use LSL over wireless networks, the documentation recommends using the following configuration: https://labstreaminglayer.readthedocs.io/info/lslapicfg.html#tuning timeProbeMaxRTT = 0.100 timeProbeInterval = 0.010 timeProbeCount = 10 timeUpdateInterval = 0.25 multicastMinRTT = 0.100 multicastMaxRTT = 30
LSLContentType
LSL content types used to identify the type of data being streamed.
LSLDescription
Provides access to a stream's metadata description element.
LSLInlet<T>
A unified LSL inlet that supports both isolated and direct execution modes.
LSLOutlet
A unified LSL outlet that supports both isolated and direct execution modes.
LSLSample<T>
A representation of a sample.
LSLStreamInfo
Representation of the lsl_streaminfo_struct_ from the LSL C API.
LSLStreamInfoWithMetadata
Stream info with full metadata and description access.
LSLStreamResolver
The standard resolver for LSL streams.
LSLStreamResolverContinuous
Representation of the lsl_continuous_resolver_ from the LSL C API.
LSLStreamResolverContinuousByPredicate
LSLStreamResolverContinuousByProperty
LSLXml
Base class for interacting with LibLSL XML elements.
LSLXmlNode
An XML node in LibLSL's metadata structure.

Enums

ConfigSection
Enum for config sections
IPv6Mode
IPv6 mode options
LSLChannelFormat
The stream info channel formats.
LSLStreamProperty
Represents a property of an LSL stream that can be used for filtering. This enum is used in LSLStreamResolver to filter streams by their properties.
ResolveScope
Multicast resolve scope options

Extensions

FirstWhereOrNullExtension on Iterable<E>
Helper extension to add firstWhereOrNull functionality
LSLStreamResolverByPredicate on LSLStreamResolver
A filtered stream resolver that resolves streams by a predicate expression.
LSLStreamResolverByProp on LSLStreamResolver
A filtered stream resolver that resolves streams by properties. It is a subclass of LSLStreamResolver and allows you to filter streams by properties such as stream name, type, etc.
StreamInfoList on List<LSLStreamInfo>

Constants

LSL_FOREVER → const double
LSL_IRREGULAR_RATE → const double

Functions

runPreciseInterval<T>(Duration interval, T callback(T state), {required Completer<void> completer, dynamic state, Duration startBusyAt = const Duration(milliseconds: 1)}) → void
Run a callback at precise intervals.
runPreciseIntervalAsync<T>(Duration interval, FutureOr<T> callback(T state), {required Completer<void> completer, dynamic state, Duration startBusyAt = const Duration(milliseconds: 1)}) Future<void>
Run a callback at precise intervals asynchronously. This is a less precise version of runPreciseInterval that uses Future.delayed instead of sleep to reduce the impact on the main thread. The tradeoff is that the callback may be called slightly later than the specified interval.

Exceptions / Errors

LSLException
LSLException base exception class
LSLTimeout
LSLTimeout exception class