Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
development:realtime:buffer_overview [2018/10/21 15:22]
42.49.180.224 [Overview of the realtime buffer]
development:realtime:buffer_overview [2017/08/17 11:21] (current)
127.0.0.1 external edit
Line 10: Line 10:
   - the [[/​getting_started/​realtime|getting started]] takes you through the first steps of real-time data streaming and analysis.   - the [[/​getting_started/​realtime|getting started]] takes you through the first steps of real-time data streaming and analysis.
  
-This page documents the general concept behind the FieldTrip buffer.===== Introduction =====+This page documents the general concept behind the FieldTrip buffer. ​ 
 + 
 +===== Introduction =====
  
 There is no fundamental problem in reading data that is acquired in real-time into MATLAB. Even if those data come streaming directly from an EEG amplifier, you still could read one sample at a time and collect it all in one matrix. But since Matlab is a single threaded application,​ collecting the continuously streaming data AND processing them at the same time is challenging. Imagine acquiring some samples of the EEG stream and then doing a big computation on those samples, like an fft. During the time that Matlab needs to compute the fft, the new data that come streaming from your amplifier would get lost. Assuming that the data are streamed over the network, the low-level TCP/IP network stack of your operating system will buffer it for some time, but the duration for which the data remain in that network stack buffer is not guaranteed. ​ There is no fundamental problem in reading data that is acquired in real-time into MATLAB. Even if those data come streaming directly from an EEG amplifier, you still could read one sample at a time and collect it all in one matrix. But since Matlab is a single threaded application,​ collecting the continuously streaming data AND processing them at the same time is challenging. Imagine acquiring some samples of the EEG stream and then doing a big computation on those samples, like an fft. During the time that Matlab needs to compute the fft, the new data that come streaming from your amplifier would get lost. Assuming that the data are streamed over the network, the low-level TCP/IP network stack of your operating system will buffer it for some time, but the duration for which the data remain in that network stack buffer is not guaranteed. ​
Line 25: Line 27:
  
 Besides the native C/C++ and the MATLAB implementation,​ we also provide implementations for [[buffer_java|Java]] and [[buffer_python|Python]]. Besides the native C/C++ and the MATLAB implementation,​ we also provide implementations for [[buffer_java|Java]] and [[buffer_python|Python]].
 +