lsl_core 1.0.0 copy "lsl_core: ^1.0.0" to clipboard
lsl_core: ^1.0.0 copied to clipboard

Pure-Dart Lab Streaming Layer types and utilities shared by the liblsl dart suite.

example/lsl_core_example.dart

import 'dart:typed_data';

import 'package:lsl_core/lsl_core.dart';

/// Values of a few channel formats written and read back, exactly.
void main() {
  final samples = <LSLChannelFormat, List<num>>{
    LSLChannelFormat.int16: [-32768, 32767],
    LSLChannelFormat.int64: [(1 << 60) + 1, -7],
    LSLChannelFormat.double64: [1 / 3, -1e-300],
  };
  for (final MapEntry(key: format, value: values) in samples.entries) {
    final bytes = ByteData(values.length * format.byteWidth);
    writeValues(bytes, 0, format, values, values.length);
    final back = readValues(bytes, 0, format, values.length);
    print('${format.name}: $back (${back.runtimeType})');
  }
}
0
likes
160
points
--
downloads

Documentation

API reference

Publisher

verified publisherzeyus.com

Weekly Downloads

Pure-Dart Lab Streaming Layer types and utilities shared by the liblsl dart suite.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#lab-streaming-layer #eeg #neuroscience #streaming

License

MIT (license)

Dependencies

fast_immutable_collections, meta, xml

More

Packages that depend on lsl_core