Consensys Pro Now Integrated with Lab Streaming Layer (LSL)

Consensys Pro Now Integrated with Lab Streaming Layer (LSL) 

We’re excited to announce that Consensys Pro now supports integration with the Lab Streaming Layer (LSL) an open-source networked middleware ecosystem to stream, receive, synchronize, and record neural, physiological, and behavioral data streams. 

Within Consensys Pro, Lab Streaming Layer can be enabled via the following: – 

Understanding the Integration

The integration introduces a mechanism that timestamps Shimmer data using the LSL clock when it is received over Bluetooth and streams it via an LSL outlet to an LSL recorder e.g. Lab Recorder. 

When a data packet from a Shimmer device is parsed, LSL clock is logged in the object cluster using the following method: 

setLSLTimeIfAvailable(objectCluster); 

This internally calls LSL.local_clock() and applies an offset if available: 

public void setLSLClockOffset(double val) { 

    LSLTimeStampOffset = val / 1000; // convert ms to s 

} 

 

@Override 

public ObjectCluster setLSLTimeIfAvailable(ObjectCluster ojc) { 

    ojc.mLSLTimeStamp = LSL.local_clock() – LSLTimeStampOffset; 

    return ojc; 

} 

When data is pushed to the LSL outlet, the sample is sent using: 

outlet.push_sample(data, objc.mLSLTimeStamp); 

Device-Level Timestamp Offset

A key feature of this integration is the ability to set a customizable clock offset at the device level when streaming starts. This allows the user to fine-tune synchronization e.g. if you want to account for Bluetooth latency. 

Offsets can be adjusted directly from the Consensys Pro menu (shown above). 

Keyboard Streaming Support

In addition to sensor data, keyboard input streaming is now supported within Consensys Pro. This allows researchers to record and stream keystroke events alongside physiological data streams via LSL. E.g. if you want to event mark, note however that keystrokes are only registered when the Consensys app is in the foreground. 

A keyboard can be added via the following below: – 

Once it starts streaming you will be able to see it if LSL is enabled, this an example below showing the keyboard and Shimmer device streaming on the Lab Recorder application. 

When using Lab Recorder, we provide a simple script to convert the data into csv format. 

Key Takeaway 

Consensys Pro’s LSL integration bridges the gap between Shimmer’s precision hardware and the broader data-streaming ecosystem.  

5 1 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x