liblsl 0.9.1
liblsl: ^0.9.1 copied to clipboard
A Dart (and Flutter) native library for working with Lab Streaming Layer (LSL / liblsl).
0.9.1 #
- Updated
hooksfrom^0.20.0to^0.20.1. - Updated
code_assetsfrom^0.19.0to^0.19.7. - Updated LSL Api config documentation
- Updated readme
- Improved tests and added a performance test
- Added an async version of
runPreciseInterval(runPreciseIntervalAsync) that works with async callbacks - Added continous stream resolvers by property and predicate (
LSLStreamResolverContinuousByPropertyandLSLStreamResolverContinuousByPredicate) LSL.createInletnow returns the typed version of the inlet rather than dynamice (e.g.LSLInlet<double>rather thanLSLInlet<dynamic>)- Added draft JOSS paper
0.9.0 #
This is a major update that includes breaking changes. It introduces a new LSLStreamInfoWithMetadata class that allows for operations aligned with the C/C++ API that support reading and manipulation of the metadata associated with a stream. By default, when resolving streams, the metadata is not included and can only be retrieved after creating an inlet with the new method LSLInlet.getFullInfo, or, during inlet creation, you may pass includeMetadata: true to the constructor to include the metadata in the inlet.
In addition, the stream resolver methods have been updated, and now there are LSL.resolveStreamsByProperty and LSL.resolveStreamsByPredicate methods to filter streams during the resolution process. The LSL.resolveStreams method will still continue to resolve all available streams. The continuous versions of the filtered resolvers have not yet been implemented, but will be in the next release.
Main changes in this release: #
- 🚀 Introduced
LSLStreamInfoWithMetadataclass that allows for reading and manipulating stream metadata, aligning with the C/C++ API. - 🚀 Updated stream resolvers, and added
LSL.resolveStreamsByPropertyandLSL.resolveStreamsByPredicatemethods to the mainLSLclass. - 🚀 Updated
LSLInletto include a new methodgetFullInfothat retrieves the full stream info with metadata. - 🚀 Updated
LSLInletconstructor with theincludeMetadataproperty. - 🚀 Added
resetUidmethod to `LSLStreamInfo``- This method was also added to
liblsl
- This method was also added to
- Forked
liblslversion updated to commitbea40e2c. - Added a bunch of
XMLclasses to handle the metadata, which group children and can be used for creating nodes or traversing the XML tree.
0.8.1 #
Dependency updates. Added a new static method createContinuousStreamResolver to the LSL class for creating and managing your own continuous stream resolver, existing stream resolver method works the same, but now you have the option to keep resolving streams in the background while the API is being used.
- Updated
hooksfrom^0.19.1to^0.20.0. - Updated
native_toolchain_cfrom^0.16.1to^0.17.1.
0.8.0 #
🚨🚨🚨 This is a major update that includes breaking changes 🚨🚨🚨
It brings the awesome new ability to choose if you want to use isolates or not, and if not, you get access to synchronous methods for pulling and pushing samples. This update also includes some minor API changes to improve consistency and usability.
- 🚀
LSLIsolatedInletandLSLIsolatedOutlethave been replaced withLSLInletandLSLOutlet, respectively. The new classes both run by default in isolated mode, but can be configured to run without isolates by passinguseIsolates: falseto the constructor. This allows for more flexibility in how the LSL API is used, while still providing the benefits of isolates for performance and concurrency.- This also means that there are now
*Syncmethods for some common operations, such aspullSampleSync,pushSampleSync, etc. These methods allow for synchronous operations without isolates, which can be useful in some cases for more precise control over timing and performance.
- This also means that there are now
- 🚀
LSLInletandLSLOutletbuffer length and chunk size parameters have been consistently renamed tomaxBufferandchunkSize, respectively, to better reflect their purpose and usage, and to have a consistent naming scheme across the API. - 🚀 The
streamInfoparameter inLSLInletandLSLOutletconstructors has been made a positional parameter, to make it less verbose to create inlets and outlets. - 🚀 The
LSLStreamInfo.streamInfoproperty is no longer nullable, and will instead throw an exception if the stream info is not set. This avoids having to do null checks when using the stream info pointer. - 🚀 The
LSL.createInletandLSL.createOutletconvenience methods now have the additonaluseIsolatesparameter, which allows for creating inlets and outlets without isolates if set tofalse. This is useful for cases where isolates are not needed or desired, such as when using the API in a synchronous context.
0.7.1 #
This is a minor change that requires the dev/main version of the Dart SDK, as hooks and native_toolchain_c still require a version later than the last stable release. This is a temporary change until the next supported stable Dart SDK release.
0.7.0 #
This release is a major update that includes breaking changes. This update provides a large performance improvement by reusing a buffer for samples, reducing the number of allocations and copies required when sending samples.
There are also new packages that complement liblsl.dart, and are still work-in-progress, but will allow setting up an entire experiment workflow without requiring any programming. Currently these packages include:
- liblsl_timing: This package provides an application for measuring LSL timing performance with your specific device and network configuration. The test app automatically coordinates between all connected devices on the network, and passes the test configuration via a coordinator - the coordinator is the first device that starts the application. There are three tests included:
- Latency: This test measures the latency of sending and receiving samples over LSL at the specified frequency.
- Sync: This test is intended to measure the clock synchronization and drift between devices.
- Interactive: This test has a button on screen and when the button is pressed, an LSL sample is sent, all receiving devices will then flash a black square on the screen. This test is intended to measure the entire end-to-end latency, including Flutter rendering, input and display lag. To measure this effectively, it would be ideal to have a touch sensor of some kind (e.g. FSR) and a photodiode sensor to measure the moment of touch and the moment of display change, respectively. There is a companion app in C++ written for a Bela (Beaglebone Black) which takes digital inputs and logs the timestamps along with the LSL samples. You can see more at the bela-lsl-timing repository.
- liblsl_analysis: This package allows for analysis of the data provided by the
liblsl_timingpackage. It currently only allows loading a single TSV file from the timing test, but will be updated to allow loading files from all the reporting devices to create a comprehensive report of the timing performance across all devices. The report will include:- Latency statistics for each device
- Clock synchronization and drift statistics
- Interactive test results with timestamps and latency measurements (if available)
Main changes in this release: #
- Use custom fork of
liblslwhich allows API configuration to be specified at runtime (once, before any other LSL functions are called). This means that anything in the LSL API configuration file can be set, including on mobile platforms that do not support environment variables or allow editing files in/etcor./.- This is exposed via the C/C++ API as
lsl_set_config_filenameandlsl_set_config_contentto set the configuration file name and content (directly as astd::string/char*), respectively. The Dart API now provides aLSLConfigclass that can be used to set the configuration file name and content, which can be used inLSL.setConfigFilenameandLSL.setConfigContentmethods.
- This is exposed via the C/C++ API as
- New
LSLReusableBufferclass for allowing sample structures to avoid creating new instances for each sample. This reuse significantly enhances the performance by reducing the allocations during sample pulling and pushing. - Generic push sample functions have now been replaced with specific implementations for each type e.g.
LslPushSampleFloat. - A new helper function
runPreciseIntervalhas been added to handle precision interval timing, using an adjustable busy-wait loop. The API is subject to change, but allows for a callback and a mutabledyanmic stateto be passed in, which can be used to update the state of the callback. This is useful for implementing precise timing in LSL applications (such as requiring 1000Hz sample creation with high precision -> resulting in a mean of 1.0000, median of 1.0082 ms over 180,000 samples). hookspackage updated from0.19.0to0.19.1.native_toolchain_cupdated from^0.16.0to^0.16.1.ffigenupdated from18.1.0to19.0.0.testpackage updated from1.25.15to1.26.0.
0.6.2-dev.0 #
- Make SDK constraint ^3.9.0-0
0.6.1 #
- Attempt to fix package issue on pub.dev
- bump dart SDK constraint to ^3.9.0 due to
hookspackage - Added
LSLStreamResolvermixin (empty for now). - Added
dartdocdev dependency, and addeddocdirectory to.gitignore
0.6.0 #
- New
LSLIsolatedInlet.getTimeCorrectionmethod to get the LSL reported sample time correction - Removed deprecated
LSLStreamInletandLSLStreamOutletclasses - Remove deprecated
native_assets_clidependency - Add
hooks0.19.0dependency instead ofnative_assets_cli - Add
code_assets0.19.0 - Update
native_toolchain_cto^0.16.0
0.5.1 #
- Fix package name on Android
- Update
ffigento18.1.0 - Update
native_assets_clito0.14.0 - Update
native_toolchain_cto0.11.0
0.5.0 #
- Generated dylib is now without the lib prefix (if it is the prefix on the platform). i.e.
libliblsl.sois now justliblsl.so - Tested working on Raspberry Pi 4 (64bit)
- Tests are now less chatty
0.4.1 #
- Update
native_assets_clito0.13.0 - Update
native_toolchain_cto0.10.0
0.4.0 #
- Inlet and outlets now pass sample pointer addresses rather than sample objects, making them more efficient (note: this has no public facing changes to the API)
- Updated the
liblsl_testpackage (android NDK version, entitlements, manifests) - Updated readme documentation, describing Android and iOS specifics
0.3.0 #
- Outlets and inlets now have to be destroyed by the user
- Outlets and inlets are now contained in
Isolates - Updated liblsl to
7e61a2e - Added a fully self-contained example
0.2.1 #
- Fixed linting issues.
0.2.0 #
- Restructured API, renamed
liblsltonative_liblsl.
0.1.2 #
- Updated
native_assets_clito0.12.0 - Updated
native_toolchain_cto0.9.0 - Removed spurious
api.dartfile (might come back later)
0.1.1 #
- Added missing
metadependency
0.1.0 #
- Restructured everything to be a bit more modular
- There's now an API for all the basic LSL functions 🥳🎈
- Started adding docs
- Test includes pushing and pulling a sample
0.0.2 #
- Android support 🎉
0.0.1 #
- Initial release
- Native compilation confirmed working on Windows, OSX and iOS. Will be testing Linux and Android soon.