Modern C# wrapper for the LabStreamingLayer (LSL): https://github.com/sccn/labstreaminglayer/. There exist at least two previous C# wrappers, liblsl-Csharp and LSL4Unity. This wrapper attempts to improve on those with the following features:
- Modern C# 10/.NET 5.0 code style adhering to [Microsoft Coding Conventions] (https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions)
- Better use of language features such as properties, generics, and overloads
- Use of
List<T>
andList<List<T>>
containers for receiving data and timestamps - Improved namespaces (no more
LSL.LSL.method
) - Improved data receiver examples showing using threads and delegates
- Growing list of utility programs (see TODO list) for testing and network diagnostics
- In code comments on all methods and classes
- NuGet packaging
- Further utility programs:
- Stream Diagnostic
- ???
- Async patterns for pull and resolve functions (Note: at the moment this can be 'faked' with
Task.Delay()
but future plans for improving LSL include implementing callback functions which will allow truly asynchronous---not just parallel---programming patterns - Explanation in this README for how to include LibLSL.dll and lsl.dll in a C# project.
- The whole LSL development community esp. tstenner, cboulay, and chkothe
- Big ups to markheath whose approach to type punning arrays of different types I completely stole for
GenericSampleBuffer
In order to use LibLSL
in your C# project, you must include a reference to the wrapper (LibLSL.dll/dylib/so) and lsl itself (lsl.dll/dylib/so).