LSLStreamInfoHelper class
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.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
createStreamInfo(
{required NetworkStreamConfig config, required CoordinationSessionConfig sessionConfig, required Node node}) → Future< LSLStreamInfoWithMetadata> - Create a stream info (for use in an outlet) from the given parameters.
-
generateElectionPredicate(
{required String streamName, required String sessionName, required String excludeSourceIdPrefix, required bool isRandomStrategy, double? myRandomRoll, String? myStartTime}) → String - Generates a predicate for coordinator election that checks for:
-
generateInletStreamInfo(
{required NetworkStreamConfig config, required CoordinationSessionConfig sessionConfig, required Node node}) → Future< LSLStreamInfo> - Creates a stream info for use in an inlet, based on the expected configuration based on the node and session.
-
generatePredicate(
{String? streamNamePrefix, String? streamNameSuffix, String? sessionName, String? nodeId, String? nodeUId, String? nodeRole, String? nodeCapabilities, String? sourceIdPrefix, String? sourceIdSuffix, String? excludeSourceId, String? excludeSourceIdPrefix, double? randomRollLessThan, double? randomRollGreaterThan, String? nodeStartedBefore, String? nodeStartedAfter}) → String - Generates an LSL stream resolver predicate based on the given parameters. Any parameter that is null is ignored in the predicate. For example, to find streams with a specific name prefix and session name:
-
generateSourceID(
NetworkStreamConfig config, {required Node node}) → String - Generates a unique source ID for a given stream configuration and node. This ensures each outlet has a globally unique source ID that identifies:
-
generateStreamName(
NetworkStreamConfig config, {required Node node}) → String - Generates a standardized stream name for a given stream configuration and node information. Now uses clean names without encoding node/role information in the name. All filtering information is stored in metadata instead.
-
parseMetadata(
LSLStreamInfoWithMetadata info) → Map< String, String> - Parses standard metadata from the given LSLStreamInfoWithMetadata.
-
parseSourceId(
String name) → Map< String, String>
Constants
- nodeCapabilitiesKey → const String
- nodeIdKey → const String
- nodeRoleKey → const String
- nodeStartedAtKey → const String
- nodeUIdKey → const String
- randomRollKey → const String
- sessionNameKey → const String
- streamNameKey → const String