com.webkitchen.eeg.acquisition
Class EEGAcquisitionController

java.lang.Object
  extended by com.webkitchen.eeg.acquisition.EEGAcquisitionController

public class EEGAcquisitionController
extends java.lang.Object

Controller that starts/stops reading EEG data, and provides access to the IRawSampleGenerator. Classes wanting to receive EEG data from a specific channel or channels should register as a listener on the channel(s) with the IRawSampleGenerator's addSampleListener method, and implement the IRawSampleListener interface.

See Also:
IRawSampleGenerator, IRawSampleListener, RawSample

Method Summary
 IRawSampleGenerator getChannelSampleGenerator()
          Returns the IRawSampleGenerator that acquires the raw EEG samples.
static EEGAcquisitionController getInstance()
          Returns the single instance of EEGAcquisitionController
static boolean isActive()
          Returns true if the control is currently reading, false otherwise
 void startReading(boolean debugMode)
          Begins the reading of EEG data, and notification of IRawSampleGenerator listeners.
 void stopReading()
          Ends the reading of EEG data, and notification of IRawSampleGenerator listeners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static EEGAcquisitionController getInstance()
Returns the single instance of EEGAcquisitionController

Returns:
the single instance of EEGAcquisitionController

isActive

public static boolean isActive()
Returns true if the control is currently reading, false otherwise

Returns:
true or false if filters are set up

startReading

public void startReading(boolean debugMode)
                  throws java.io.IOException
Begins the reading of EEG data, and notification of IRawSampleGenerator listeners. Objects that call startReading should always call stopReading when they are done reading EEG data.

Throws:
java.io.IOException - if we are unable to connect to the EEG device

stopReading

public void stopReading()
Ends the reading of EEG data, and notification of IRawSampleGenerator listeners


getChannelSampleGenerator

public IRawSampleGenerator getChannelSampleGenerator()
Returns the IRawSampleGenerator that acquires the raw EEG samples. Objects can add themselves as listeners in order to receive the samples.

Returns:
the EEG reader that can notify listeners of new EEG samples
See Also:
startReading(boolean)