LSLStreamInfoWithMetadata class

Stream info with full metadata and description access.

This class extends LSLStreamInfo to provide immediate access to the stream's metadata through the description property. It represents a "full" stream info object that includes complete XML metadata structure, as opposed to the basic stream info returned by stream resolution.

When You Get This Type:

  • Creating new streams with LSL.createStreamInfo()
  • After calling LSL.createInlet() with includeMetadata: true
  • Reconstructing from XML with fromXml()

Key Features:

  • Immediate description access without additional network calls
  • Full XML metadata structure for complex stream annotations
  • All methods from base LSLStreamInfo class

Metadata Usage:

final streamInfo = await LSL.createStreamInfo(
  streamName: 'EEG_Stream',
  channelCount: 32,
);

final description = streamInfo.description;
final root = description.value;

// Add manufacturer and channel info
root.addChildValue('manufacturer', 'BioSemi');
final channels = root.addChildElement('channels');
for (int i = 0; i < 32; i++) {
  final ch = channels.addChildElement('channel');
  ch.addChildValue('label', 'CH${i + 1}');
}

See Also:

Inheritance

Constructors

LSLStreamInfoWithMetadata({required String streamName, required LSLContentType streamType, required int channelCount, required double sampleRate, required LSLChannelFormat channelFormat, required String sourceId, lsl_streaminfo? streamInfo})
LSLStreamInfoWithMetadata.fromStreamInfo(lsl_streaminfo streamInfo)
Create from existing lsl_streaminfo pointer (with metadata)
factory

Properties

channelCount int
finalinherited
channelFormat LSLChannelFormat
finalinherited
created bool
Whether the object has been created.
no setterinherited
description LSLDescription
Access to the stream's metadata/description
no setter
destroyed bool
Whether the object has been destroyed.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hostname String?
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sampleRate double
finalinherited
sourceId String
finalinherited
streamInfo lsl_streaminfo
The Pointer to the underlying lsl_streaminfo_struct_.
no setterinherited
streamName String
finalinherited
streamType LSLContentType
finalinherited
uid String?
no setterinherited

Methods

addAlloc(Pointer<NativeType> arg) → void
Adds a pointer to the list of allocated pointers.
inherited
addAllocList(List<Pointer<NativeType>> args) → void
Adds a list of pointers to the list of allocated pointers.
inherited
create() LSLStreamInfoWithMetadata
Creates the stream info object, allocates memory, etc.
override
destroy() → void
Destroys the object.
override
freeArgs() → void
Frees all allocated pointers.
inherited
fromXml(String xml) LSLStreamInfoWithMetadata
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resetUid() String
Resets the stream info's UID. @note This is not a common operation and should be used with caution. This retuns the new UID as a string.
inherited
toString() String
A string representation of this object.
override
toXml() String
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited