transports/lsl library

Classes

AddInletMessage
Message to add an inlet to running isolate - immutable
BufferReleasedMessage
Sent from the outlet worker back to the main isolate once a pooled send buffer may be reused.
ConsumerPresenceMessage
Sent from the outlet worker when its consumer count crosses zero.
DataMessage
FlushMessage
Message to flush inlet streams - immutable
IIMessage
Interface for all isolate messages
InitializedMessage
Message to notify main thread that the isolate is initialized
InletResource
Resource wrapper for LSL inlets with proper lifecycle management
InletWorker
Worker class for handling inlet operations in isolate
IsolateClockSync
One inlet's clock-offset estimate, as measured inside the inlet isolate.
IsolateClockSyncList
A batch of IsolateClockSync, one per inlet refreshed in the same pass.
IsolateDataMessage
Message sent from isolate to main
IsolateDataMessageList
IsolateMessage
Base class for all isolate messages - immutable for efficient message passing
IsolateStreamManager
Factory container for creating LSL stream isolates
IsolateWorker
Base class for isolate workers with shared functionality
IsolateWorkerConfig
Configuration for isolate workers
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
LSLChunk<T>
A chunk of samples pulled from an inlet, in list-of-samples form.
LSLChunkPointer
Zero-copy result of LSLInlet.pullChunkPointerSync.
LSLChunkTyped
A chunk of samples in flat typed-data form.
LSLContentType
LSL content types used to identify the type of data being streamed.
LSLCoordinationSession
A PeerSession backed by Lab Streaming Layer.
LSLCoordinationStream
LSL-based coordination stream with internal message polling
LSLDataStream
LSL-based data stream implementation
LSLDescription
Provides access to a stream's metadata description element.
LslDiscovery
LSL-backed IDiscovery.
LSLInlet<T>
A unified LSL inlet that supports both isolated and direct execution modes.
LSLMapper
LSLMapper type mapping.
LSLNetworkStreamFactory
Factory for creating LSL-based network streams.
LSLOutlet
A unified LSL outlet that supports both isolated and direct execution modes.
LslPredicateCompiler
Compiles a DiscoveryQuery into an LSL XPath predicate.
LSLPullChunk<T extends NativeType, D>
The base class for chunk pull operations, one subclass per channel format.
LSLPullSample<T extends NativeType, D>
The base class for all LSL pull sample types.
LSLPushChunk<T extends NativeType>
The base class for chunk push operations, one subclass per channel format.
LSLPushSample<T extends NativeType>
The base class for all LSL push sample types.
LSLResource
Base class for LSL-owned resources.
LSLReusableBuffer<T extends NativeType>
A Reusable buffer for LSL samples to avoid memory allocation overhead.
LSLReusableBufferDouble
LSLReusableBufferFloat
LSLReusableBufferInt8
LSLSample<T>
A representation of a sample.
LSLSamplePointer<T extends NativeType>
LSLStreamInfo
Representation of the lsl_streaminfo_struct_ from the LSL C API.
LSLStreamInfoHelper
Helper class with static methods for working with LSL StreamInfo Especially a unified way of working with the metadata, or standardized stream names for discovery.
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
LSLTimeCorrection
An extended time-correction estimate from lsl_time_correction_ex.
LSLTransport<T extends LSLTransportConfig>
LSL Transport implementation for coordination.
LSLTransportConfig
Transport configuration for LSL-based coordination.
LSLTransportConfigFactory
Factory for creating LSLTransportConfig instances.
LSLXml
Base class for interacting with LibLSL XML elements.
LSLXmlNode
An XML node in LibLSL's metadata structure.
OutletResource
Resource wrapper for LSL outlets with proper lifecycle management
OutletWorker
Worker class for handling outlet operations in isolate
PauseMessage
Message to pause isolate processing - immutable
RecreateOutletMessage
Message to recreate outlet - immutable
RemoveInletMessage
Message to remove an inlet from running isolate - immutable
ResponseMessage
Message to notify main thread of request response
ResumeMessage
Message to resume isolate processing - immutable
SampleMessage
Base class for mutable isolate messages - will be copied when sent (probably?) This is probably more accurately NonImmutableIsolateMessage Message to send data through outlet - non-immutable thanks to List
StartMessage
Message to start isolate processing - immutable
StopMessage
Message to stop isolate processing - immutable
StreamInfoResource
A peer discovered over LSL, together with the native lsl_streaminfo needed to open an inlet to it.
StreamInletIsolate
Inlet isolate for receiving data from multiple sources
StreamIsolate
Base class for stream isolates with shared functionality
StreamOutletIsolate
Outlet isolate for sending data

Enums

ConfigSection
Enum for config sections
IPv6Mode
IPv6 mode options
IsolateMessageType
Enum defining all possible isolate message types
LSLChannelFormat
The stream info channel formats.
LSLProcessingOptions
Automatic post-processing an inlet applies to incoming time stamps.
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.
LSLTransportOptions
This enum has flags that are used for inlets and outlets
ResolveScope
Multicast resolve scope options

Mixins

LSLStreamMixin<T extends NetworkStreamConfig, M extends IMessage<IMessageType>>
Mixin providing shared LSL functionality for both coordination and data streams mixin with isolate support for LSL streams

Extensions

FirstWhereOrNullExtension on Iterable<E>
Helper extension to add firstWhereOrNull functionality
IsolateMessageTypeInt on IsolateMessageType
This is dumb, but despite Enum being immutable, it doesn't work with 'vm:deeply-immutable' pragma, so this just wraps the conversion from int to enum value. The enum is only used in this file anyway.
LSLProcessingOptionsFlags on Set<LSLProcessingOptions>
Combines a set of LSLProcessingOptions into the bitwise-OR'd int that lsl_set_postprocessing expects.
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.
LSLTransportOptionsFlags on Set<LSLTransportOptions>
Combines a set of LSLTransportOptions into the bitwise-OR'd int that the lsl_create_outlet_ex / lsl_create_inlet_ex functions expect.
LSLType on StreamDataType
StreamDestroyMapExtension on Map<String, StreamInfoResource>
StreamInfoList on List<LSLStreamInfo>

Constants

LSL_FOREVER → const double
LSL_IRREGULAR_RATE → const double

Functions

lslError(String what, int code) → LSLException
Builds an LSLException for a nonzero liblsl error code, naming the code and appending liblsl's own message for it when one is available.
runPreciseInterval<T>(Duration interval, T callback(T state), {required Completer<void> completer, dynamic state, Duration startBusyAt = const Duration(milliseconds: 1), Stopwatch? sw}) → 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), Stopwatch? sw}) → 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