ESP OpenBCI - An EEG Signal Processing Library for OpenBCI Hardware

com.github.mrstampy.esp.dsp.lab
Class AbstractLab

java.lang.Object
  extended by com.github.mrstampy.esp.dsp.lab.AbstractLab
All Implemented Interfaces:
Lab, LabValues, java.io.Serializable
Direct Known Subclasses:
DefaultLab

public abstract class AbstractLab
extends java.lang.Object
implements Lab

The Class AbstractLab encapsulates common Lab properties.

See Also:
Serialized Form

Constructor Summary
AbstractLab()
          Instantiates a new abstract lab.
 
Method Summary
 void addSignalProcessedListener(SignalProcessedListener l)
          Adds the signal processed listener.
 void clearSignalProcessedListeners()
          Clear signal processed listeners.
 int getChannel()
          Returns the channel being processed by this lab.
 RawEspConnection getConnection()
          Gets the connection.
 FFTType getFftType()
          Gets the fft type.
 LabValues getLabValues()
          Returns a serializable LabValues object for lab values persistence.
 int getNumBands()
          Gets the num bands.
 int getNumChannels()
          Returns the number of channels available for processing.
protected  void notifyProcessedListeners(double[] processed)
          Notify processed listeners.
 void removeSignalProcessedListener(SignalProcessedListener l)
          Removes the signal processed listener.
 void setChannel(int channel)
          Set the channel for this lab.
 void setConnection(RawEspConnection connection)
          Sets the connection.
 void setFftType(FFTType fftType)
          Sets the fft type.
 void setLabValues(LabValues values)
          Initialization of a lab with values.
 void setNumBands(int numBands)
          Sets the num bands.
 void triggerProcessing()
          Implementations will call Lab.process(double[][]) with the RawEspConnection.getCurrent() signal.
 void triggerProcessing(int numSamples)
          Implementations will call Lab.process(double[][]) with the RawEspConnection.getCurrent(int) signal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.github.mrstampy.esp.dsp.lab.Lab
calculateBaseline, process, resetBaseline, stopCalculateBaseline
 
Methods inherited from interface com.github.mrstampy.esp.dsp.lab.LabValues
getBaseline, getHighNormalizeFftFrequency, getHighPassFilterFactor, getHighPassFrequency, getLowNormalizeFftFrequency, getLowPassFilterFactor, getLowPassFrequency, getPassFilter, getWindowFunction, isAbsoluteValues, isNormalizeFft, isNormalizeSignal, setAbsoluteValues, setBaseline, setHighNormalizeFftFrequency, setHighPassFilterFactor, setHighPassFrequency, setLowNormalizeFftFrequency, setLowPassFilterFactor, setLowPassFrequency, setNormalizeFft, setNormalizeSignal, setPassFilter, setWindowFunction
 

Constructor Detail

AbstractLab

public AbstractLab()
Instantiates a new abstract lab.

Method Detail

triggerProcessing

public void triggerProcessing()
Description copied from interface: Lab
Implementations will call Lab.process(double[][]) with the RawEspConnection.getCurrent() signal.

Specified by:
triggerProcessing in interface Lab

triggerProcessing

public void triggerProcessing(int numSamples)
Description copied from interface: Lab
Implementations will call Lab.process(double[][]) with the RawEspConnection.getCurrent(int) signal.

Specified by:
triggerProcessing in interface Lab
Parameters:
numSamples - the num samples

notifyProcessedListeners

protected void notifyProcessedListeners(double[] processed)
Notify processed listeners.

Parameters:
processed - the processed

getConnection

public RawEspConnection getConnection()
Description copied from interface: Lab
Gets the connection.

Specified by:
getConnection in interface Lab
Returns:
the connection

setConnection

public void setConnection(RawEspConnection connection)
Description copied from interface: Lab
Sets the connection.

Specified by:
setConnection in interface Lab
Parameters:
connection - the new connection

getFftType

public FFTType getFftType()
Description copied from interface: LabValues
Gets the fft type.

Specified by:
getFftType in interface LabValues
Returns:
the fft type

setFftType

public void setFftType(FFTType fftType)
Description copied from interface: LabValues
Sets the fft type.

Specified by:
setFftType in interface LabValues
Parameters:
fftType - the new fft type

getNumBands

public int getNumBands()
Description copied from interface: LabValues
Gets the num bands.

Specified by:
getNumBands in interface LabValues
Returns:
the num bands

setNumBands

public void setNumBands(int numBands)
Description copied from interface: LabValues
Sets the num bands.

Specified by:
setNumBands in interface LabValues
Parameters:
numBands - the new num bands

getLabValues

public LabValues getLabValues()
Description copied from interface: Lab
Returns a serializable LabValues object for lab values persistence.

Specified by:
getLabValues in interface Lab
Returns:
the lab values

setLabValues

public void setLabValues(LabValues values)
Description copied from interface: Lab
Initialization of a lab with values.

Specified by:
setLabValues in interface Lab
Parameters:
values - the new lab values

addSignalProcessedListener

public void addSignalProcessedListener(SignalProcessedListener l)
Description copied from interface: Lab
Adds the signal processed listener.

Specified by:
addSignalProcessedListener in interface Lab
Parameters:
l - the l

removeSignalProcessedListener

public void removeSignalProcessedListener(SignalProcessedListener l)
Description copied from interface: Lab
Removes the signal processed listener.

Specified by:
removeSignalProcessedListener in interface Lab
Parameters:
l - the l

clearSignalProcessedListeners

public void clearSignalProcessedListeners()
Description copied from interface: Lab
Clear signal processed listeners.

Specified by:
clearSignalProcessedListeners in interface Lab

getChannel

public int getChannel()
Description copied from interface: LabValues
Returns the channel being processed by this lab.

Specified by:
getChannel in interface LabValues
Returns:
the channel

setChannel

public void setChannel(int channel)
Description copied from interface: LabValues
Set the channel for this lab.

Specified by:
setChannel in interface LabValues
Parameters:
channel - the new channel

getNumChannels

public int getNumChannels()
Description copied from interface: LabValues
Returns the number of channels available for processing.

Specified by:
getNumChannels in interface LabValues
Returns:
the num channels

brought to you by Mr. Stampy