LSLApiConfig class
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
Constructors
-
LSLApiConfig.new({int multicastPort = 16571, int basePort = 16572, int portRange = 32, IPv6Mode ipv6 = IPv6Mode.allow, ResolveScope resolveScope = ResolveScope.site, String? listenAddress, String? ipv6MulticastGroup, List<
String> machineAddresses = const ['FF31:113D:6FDD:2C17:A643:FFE2:1BD1:3CD2'], List<String> linkAddresses = const ['255.255.255.255', '224.0.0.183', 'FF02:113D:6FDD:2C17:A643:FFE2:1BD1:3CD2'], List<String> siteAddresses = const ['239.255.172.215', 'FF05:113D:6FDD:2C17:A643:FFE2:1BD1:3CD2'], List<String> organizationAddresses = const [], List<String> globalAddresses = const [], List<String> addressesOverride = const [], int ttlOverride = -1, List<String> knownPeers = const [], String sessionId = 'default', double watchdogCheckInterval = 15.0, double watchdogTimeThreshold = 15.0, double multicastMinRTT = 0.5, double multicastMaxRTT = 3.0, double unicastMinRTT = 0.75, double unicastMaxRTT = 5.0, double continuousResolveInterval = 0.5, double timerResolution = 1.0, int maxCachedQueries = 100, double timeUpdateInterval = 2.0, int timeUpdateMinProbes = 6, int timeProbeCount = 8, double timeProbeInterval = 0.064, double timeProbeMaxRTT = 0.128, int outletBufferReserveMs = 5000, int outletBufferReserveSamples = 128, int sendSocketBufferSize = 0, int inletBufferReserveMs = 5000, int inletBufferReserveSamples = 128, int receiveSocketBufferSize = 0, double smoothingHalftime = 90.0, bool forceDefaultTimestamps = false, int logLevel = -2, String? logFile}) - Constructor with default values matching the default LSL configuration
- LSLApiConfig.fromString(String iniContent)
-
Parse a configuration string in INI format
factory
Properties
-
addressesOverride
↔ List<
String> -
The list of multicast addresses to use for discovery (override).
getter/setter pair
- basePort ↔ int
-
The starting port for the range of ports used for outlets.
The ports used are basePort to basePort + portRange - 1, where
TCP and UDP ports alternate (e.g. if starting port is even, all TCP ports
are even and all UDP ports are odd, and vice versa).
The default value is 16572.
getter/setter pair
- continuousResolveInterval ↔ double
-
The interval in seconds to resolve multicast addresses.
getter/setter pair
- forceDefaultTimestamps ↔ bool
-
Override timestamps with lsl clock if true
getter/setter pair
-
globalAddresses
↔ List<
String> -
The list of multicast addresses to use for discovery (global level).
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setteroverride
- inletBufferReserveMs ↔ int
-
The amount of time in milliseconds to reserve for the inlet buffer (regular streams).
getter/setter pair
- inletBufferReserveSamples ↔ int
-
The number of samples to reserve for the inlet buffer (irregular streams).
getter/setter pair
- ipv6 ↔ IPv6Mode
-
The IPv6 mode to use. Possible values are:
getter/setter pair
- ipv6MulticastGroup ↔ String?
-
The IPv6 multicast group to use for discovery.
getter/setter pair
-
knownPeers
↔ List<
String> -
The list of known peers for the lab. This is a fallback in case the
multicast discovery fails.
This is a list of IP addresses or hostnames.
getter/setter pair
-
linkAddresses
↔ List<
String> -
The list of multicast addresses to use for discovery (link level).
getter/setter pair
- listenAddress ↔ String?
-
The address to listen on for incoming multicast packets.
getter/setter pair
- logFile ↔ String?
-
The file to use for logging. If null, file logging is disabled.
getter/setter pair
- logLevel ↔ int
-
The log level to use. Possible values are:
getter/setter pair
-
machineAddresses
↔ List<
String> -
The list MAC addresses to use for discovery.
getter/setter pair
- maxCachedQueries ↔ int
-
The maximum number of most-recently-used queries that is cached.
getter/setter pair
- multicastMaxRTT ↔ double
-
The maximum round-trip time (RTT) in seconds for multicast packets.
getter/setter pair
- multicastMinRTT ↔ double
-
The minimum round-trip time (RTT) in seconds for multicast packets.
getter/setter pair
- multicastPort ↔ int
-
The multicast port used for discovery and data streaming
Default: 16571
getter/setter pair
-
organizationAddresses
↔ List<
String> -
The list of multicast addresses to use for discovery (organization level).
getter/setter pair
- outletBufferReserveMs ↔ int
-
The amount of time in milliseconds to reserve for the outlet buffer (regular streams).
getter/setter pair
- outletBufferReserveSamples ↔ int
-
The number of samples to reserve for the outlet buffer (irregular streams).
getter/setter pair
- portRange ↔ int
-
The number of ports to use for outlets, the effective number of outlets
is portRange / 2.
The default value is 32.
While it may be necessary to create a large range, this can potentially
slow down the discovery process, due to each port having to be scanned.
getter/setter pair
- receiveSocketBufferSize ↔ int
-
The size of the socket buffer in bytes to use for receiving data.
getter/setter pair
- resolveScope ↔ ResolveScope
-
The scope of multicast addresses to use for discovery.
Possible values are:
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sendSocketBufferSize ↔ int
-
The size of the socket buffer in bytes to use for sending data.
getter/setter pair
- sessionId ↔ String
-
The session ID for the lab. This is used to identify the lab in the
multicast discovery process.
getter/setter pair
-
siteAddresses
↔ List<
String> -
The list of multicast addresses to use for discovery (site level).
getter/setter pair
- smoothingHalftime ↔ double
-
The smoothing half-time in seconds for the time post-processor.
getter/setter pair
- timeProbeCount ↔ int
-
The number of probes to use for time updates.
getter/setter pair
- timeProbeInterval ↔ double
-
The interval in seconds to wait between probes.
getter/setter pair
- timeProbeMaxRTT ↔ double
-
The maximum round-trip time (RTT) in seconds for time probes.
getter/setter pair
- timerResolution ↔ double
-
Desired timer resolution in ms (0 means no change).
Currently only affects Windows operating systems, where values other
than 1 can increase LSL transmission latency
getter/setter pair
- timeUpdateInterval ↔ double
-
Interval between background time correction updates.
getter/setter pair
- timeUpdateMinProbes ↔ int
-
The minimum number of probes to use for time updates.
getter/setter pair
- ttlOverride ↔ int
-
The TTL (Time to Live) value for multicast packets.
The default value is -1, which should be used, unless you have e.g. inter-
site multicast routing enabled.
getter/setter pair
- unicastMaxRTT ↔ double
-
The maximum round-trip time (RTT) in seconds for unicast packets.
getter/setter pair
- unicastMinRTT ↔ double
-
The minimum round-trip time (RTT) in seconds for unicast packets.
getter/setter pair
- watchdogCheckInterval ↔ double
-
The interval at which the watchdog checks if connections are still fine.
getter/setter pair
- watchdogTimeThreshold ↔ double
-
The time threshold in seconds to consider a peer dead.
getter/setter pair
Methods
-
copyWith(
{int? multicastPort, int? basePort, int? portRange, IPv6Mode? ipv6, ResolveScope? resolveScope, String? listenAddress, String? ipv6MulticastGroup, List< String> ? machineAddresses, List<String> ? linkAddresses, List<String> ? siteAddresses, List<String> ? organizationAddresses, List<String> ? globalAddresses, List<String> ? addressesOverride, int? ttlOverride, List<String> ? knownPeers, String? sessionId, double? watchdogCheckInterval, double? watchdogTimeThreshold, double? multicastMinRTT, double? multicastMaxRTT, double? unicastMinRTT, double? unicastMaxRTT, double? continuousResolveInterval, double? timerResolution, int? maxCachedQueries, double? timeUpdateInterval, int? timeUpdateMinProbes, int? timeProbeCount, double? timeProbeInterval, double? timeProbeMaxRTT, int? outletBufferReserveMs, int? outletBufferReserveSamples, int? sendSocketBufferSize, int? inletBufferReserveMs, int? inletBufferReserveSamples, int? receiveSocketBufferSize, double? smoothingHalftime, bool? forceDefaultTimestamps, int? logLevel, String? logFile}) → LSLApiConfig - Creates a copy of this configuration with the given changes
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toIniString(
) → String - Convert the configuration to an INI format string
-
toString(
) → String -
A string representation of this object.
inherited
-
writeToFile(
String filePath) → Future< void> - Write the configuration to a file
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
fromFile(
String filePath) → Future< LSLApiConfig> - Create a configuration from a file