|
ESP OpenBCI - An EEG Signal Processing Library for OpenBCI Hardware | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.github.mrstampy.esp.multiconnectionsocket.RawDataSampleBuffer<SAMPLE>
SAMPLE - the generic typepublic abstract class RawDataSampleBuffer<SAMPLE>
This class uses Disruptor internally. Add as a
ConnectionEventListener to the AbstractMultiConnectionSocket.
| Constructor Summary | |
|---|---|
protected |
RawDataSampleBuffer(int bufferSize,
int fftSize)
Instantiates a new raw data sample buffer. |
| Method Summary | |
|---|---|
abstract void |
addSample(SAMPLE sample)
Adds the sample. |
protected void |
addSampleImpl(double... sample)
Adds the sample impl. |
void |
clear()
Clear. |
void |
connectionEventPerformed(ConnectionEvent e)
Implementation starts/stops disruptor. |
int |
getBufferSize()
Gets the buffer size. |
int |
getFftSize()
Gets the fft size. |
double[] |
getSnapshot()
Gets the snapshot. |
void |
setBufferSize(int bufferSize)
Sets the buffer size. |
void |
setFftSize(int fftSize)
Sets the fft size. |
void |
stopTuning()
Invoked after a period of time after invoking tune(). |
void |
tune()
When invoked the number of samples will be counted. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected RawDataSampleBuffer(int bufferSize,
int fftSize)
bufferSize - the buffer sizefftSize - the fft size| Method Detail |
|---|
public void connectionEventPerformed(ConnectionEvent e)
connectionEventPerformed in interface ConnectionEventListenere - the epublic abstract void addSample(SAMPLE sample)
sample - the sampleprotected void addSampleImpl(double... sample)
sample - the samplepublic double[] getSnapshot()
public void clear()
public void tune()
stopTuning() is invoked the time taken to process the total number
of samples taken during that time will be used to resize the sample buffer.
public void stopTuning()
public int getBufferSize()
public void setBufferSize(int bufferSize)
bufferSize - the new buffer sizepublic int getFftSize()
public void setFftSize(int fftSize)
fftSize - the new fft size
|
brought to you by Mr. Stampy | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||