LSLDataStream class
LSL-based data stream implementation
- Inheritance
-
- Object
- NetworkStream<
DataStreamConfig, IMessage< IMessageType> > - DataStream<
DataStreamConfig, IMessage< IMessageType> > - LSLDataStream
- Mixed-in types
Constructors
-
LSLDataStream({required DataStreamConfig config, required Node streamNode, required CoordinationSessionConfig streamSessionConfig, required LSLTransport<
LSLTransportConfig> lslTransport})
Properties
- carriesSenderClock → bool
-
Whether this transport already puts the sender's clock on the wire.
no setterinherited
- channelCount → int
-
Number of channels in the stream.
no setterinherited
-
clockSyncs
→ Stream<
ClockSyncSample> -
Clock-offset estimates for this stream's peers, as they are made.
no setterinherited
- config → DataStreamConfig
-
Configuration for the stream.
This is a NetworkStreamConfig object.
finalinherited
-
consumers
→ List<
String> -
List of consumer node IDs.
no setterinherited
- created → bool
-
Indicates whether the ILifecycle implementation has been created.
no setterinherited
- dataType → StreamDataType
-
Data type of the stream.
This is a StreamDataType enum value.
no setterinherited
- description → String
-
Returns a description of the identity.
no setteroverride
- disposed → bool
-
Indicates whether the ILifecycle implementation has been disposed.
no setterinherited
- hasConsumers → bool
-
Whether the stream has any current consumers.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasProducers → bool
-
Whether the stream has any current producers.
no setterinherited
- id → String
-
Identifier for the stream, derived from the config hash code.
no setterinherited
-
inbox
→ Stream<
IMessage< IMessageType> > -
Incoming messages from peers.
no setterinherited
-
lslTransport
→ LSLTransport<
LSLTransportConfig> -
final
- manager → IResourceManager?
-
gets the resource manager that manages this resource
no setterinherited
- messageClass → Type
-
no setterinherited
- name → String
-
Human-readable name for the stream.
no setteroverride
-
outbox
→ StreamSink<
IMessage< IMessageType> > -
no setterinherited
-
outletConsumerPresence
→ Stream<
bool> -
Emits when this stream's outlet gains or loses all of its consumers.
no setterinherited
- outletHasConsumers → bool?
-
Latest known outlet consumer presence; null before the first push or
when there is no outlet.
no setterinherited
- paused → bool
-
no setterinherited
-
producers
→ List<
String> -
List of producer node IDs.
no setterinherited
- running → bool
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sampleRate → double
-
Sample rate of the stream.
no setterinherited
- shadowUId ↔ String?
-
getter/setter pairinherited
-
Whether both ends of this stream read the same PeerClock.
no setterinherited
- started → bool
-
Whether the stream is currently running.
no setterinherited
- streamNode → Node
-
no setteroverride
- streamSessionConfig → CoordinationSessionConfig
-
final
- uId → String
-
Returns a unique identifier that is guaranteed to be globally unique.
no setterinherited
- useBusyWaitInlets → bool
-
no setteroverride
- useBusyWaitOutlets → bool
-
no setteroverride
Methods
-
addConsumer(
Node consumer) → void -
Adds a consumer node to this stream.
inherited
-
addInlet(
PeerHandle handle) → Future< void> -
Subscribes to a discovered peer.
inherited
-
addProducer(
Node producer) → void -
Adds a producer node to this stream.
inherited
-
create(
) → Future< void> -
Creates.
inherited
-
createInletForNode(
Node node, {bool resolveInfo = false, Duration resolveTimeout = const Duration(seconds: 5)}) → Future< void> -
Generates a streamInfo and creates an inlet based on the expected node
and session
inherited
-
createInletsForNodes(
Iterable< Node> nodes, {Duration resolveTimeout = const Duration(seconds: 10)}) → Future<void> -
Subscribes to every node in
nodes, resolving their endpoints first.inherited -
createOutlet(
) → Future< void> -
Create an outlet for this stream using the existing configuration
No arguments needed - uses stream config and node metadata
inherited
-
destroyDataStream(
) → Future< void> - Destroy the data stream and all its resources
-
destroyStream(
) → Future< void> -
Dispose the stream (destroy isolates and resources).
inherited
-
dispose(
) → Future< void> -
Disposes the ILifecycle implementation, releasing any resources.
override
-
flushDataStream(
) → Future< void> - Flush data stream to clear pending messages
-
flushStreams(
) → Future< void> -
Flush inlet streams to clear pending messages.
inherited
-
hasInletForSource(
String sourceId) → bool -
Add inlet for receiving from another node
Checks if an inlet already exists for the given source ID
inherited
-
isConsumer(
Node node) → bool -
Checks if a given node is a consumer for this stream.
inherited
-
isProducer(
Node node) → bool -
Checks if a given node is a producer for this stream.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pause(
) → Future< void> -
Pauses the implementation.
inherited
-
pauseDataStream(
) → Future< void> - Pause data stream polling but keep streams alive
-
pauseStream(
) → Future< void> -
Pauses, if running and not already paused.
inherited
-
recreateOutlet(
) → Future< void> -
Call this if the stream configuration changes and you need to
recreate the outlet with updated settings (so other nodes can see changes)
Be careful, because it will cause issues if there are inlets connected
to the old outlet.
inherited
-
removeInlet(
String nodeUId) → Future< void> -
Unsubscribes from a peer, releasing whatever that inlet holds.
inherited
-
resume(
) → FutureOr< void> -
Resumes the implementation.
inherited
-
resumeDataStream(
{bool flushBeforeResume = true}) → Future< void> - Resume data stream polling with optional flushing
-
resumeStream(
{bool flushBeforeResume = true}) → Future< void> -
Resumes, if running and paused.
inherited
-
resumeWith(
{bool flushBeforeResume = true}) → Future< void> -
Resumes, optionally discarding data buffered while paused.
inherited
-
sendData(
Iterable data) → Future< void> -
Send typed data based on stream configuration.
override
-
sendDataTyped<
T> (Iterable< T> data) → Future<void> -
Typed variant of sendData; see there for await/backpressure semantics.
override
-
sendMessage(
IMessage< IMessageType> message) → Future<void> -
inherited
-
start(
) → Future< void> -
Begins publishing and delivering. Idempotent.
inherited
-
stop(
) → Future< void> -
Stops publishing and delivering, but keeps the stream usable.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateManager(
IResourceManager? newManager) → void -
inherited
-
updateNode(
Node newNode) → void -
Replaces the Node this stream publishes as.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited