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
LSLStreamInfoWithMetadata.fromStreamInfoAddr(int address)
factory

Properties

channelBytes → int
Number of bytes occupied by one channel value (0 for string streams, whose values are variable-length).
no setterinherited
channelCount → int
finalinherited
channelFormat → LSLChannelFormat
finalinherited
created → bool
Whether the object has been created.
no setterinherited
createdAt → double
LSL.localClock time at which the stream was created on the sending machine (0.0 for a stream info that has not been served by an outlet).
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 setteroverride
hostname → String?
no setterinherited
protocolVersion → int
The LSL protocol version the stream info was created with (e.g. 110 for 1.10).
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sampleBytes → int
Number of bytes occupied by one sample (channelBytes * channelCount; 0 for string streams).
no setterinherited
sampleRate → double
finalinherited
sessionId → String
The session ID the stream belongs to ('default' unless configured via LSLApiConfig.sessionId); resolvers only see streams sharing their own session ID.
no setterinherited
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
copy() → LSLStreamInfoWithMetadata
Creates an independent deep copy of this stream info (including its description). The copy owns its native handle: call destroy on it when done; it stays valid after this object is destroyed.
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
matchesQuery(String query) → bool
Whether this stream info matches the XPath 1.0 query (the same predicate syntax as LSL.resolveStreamsByPredicate, e.g. "name='EEG' and type='EEG'").
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.
override