SharpBCI
A multi-threaded brain control interface (BCI) library in C#
|
An abstract base class from which all device adapters should inherit. More...
Public Member Functions | |
delegate void | DataHandler (EEGEvent evt) |
abstract void | Start () |
Function that sets up the listener on and begins flushing data through the pipeline This function needs to be overridden in each device adapter implementation. More... | |
abstract void | Stop () |
Function that tears down the listener and stops flushing data through the pipeline This function needs to be overridden in each device adapter implementation. More... | |
void | AddHandler (EEGDataType type, DataHandler handler) |
Use this function to add a handler function that is called for each EEGEvent of the specified EEGDataType. More... | |
void | RemoveHandler (EEGDataType type, DataHandler handler) |
Use this function to remove a handler that has been added with the AddHandler function. More... | |
void | FlushEvents () |
Thread safe function that removes events from the event queue and calls FlushEvent (without a s) on each event to send data through pipelines. More... | |
Public Attributes | |
readonly int | channels |
Number of channels or sensors collecting data from. More... | |
readonly double | sampleRate |
The rate per second that data is expected to be received. More... | |
Protected Member Functions | |
EEGDeviceAdapter (int channels, double sampleRate) | |
void | EmitData (EEGEvent evt) |
Puts EEGEvents into the eventQueue to wait; events are flushed and handlers operate on the events. More... | |
An abstract base class from which all device adapters should inherit.
|
protected |
void SharpBCI.EEGDeviceAdapter.AddHandler | ( | EEGDataType | type, |
DataHandler | handler | ||
) |
Use this function to add a handler function that is called for each EEGEvent of the specified EEGDataType.
delegate void SharpBCI.EEGDeviceAdapter.DataHandler | ( | EEGEvent | evt | ) |
|
protected |
Puts EEGEvents into the eventQueue to wait; events are flushed and handlers operate on the events.
void SharpBCI.EEGDeviceAdapter.FlushEvents | ( | ) |
Thread safe function that removes events from the event queue and calls FlushEvent (without a s) on each event to send data through pipelines.
void SharpBCI.EEGDeviceAdapter.RemoveHandler | ( | EEGDataType | type, |
DataHandler | handler | ||
) |
Use this function to remove a handler that has been added with the AddHandler function.
|
pure virtual |
Function that sets up the listener on and begins flushing data through the pipeline This function needs to be overridden in each device adapter implementation.
Implemented in SharpBCI.CSVReadAdapter, SharpBCI.InstrumentedDummyAdapter, and SharpBCI.RemoteOSCAdapter.
|
pure virtual |
Function that tears down the listener and stops flushing data through the pipeline This function needs to be overridden in each device adapter implementation.
Implemented in SharpBCI.CSVReadAdapter, SharpBCI.InstrumentedDummyAdapter, and SharpBCI.RemoteOSCAdapter.
readonly int SharpBCI.EEGDeviceAdapter.channels |
Number of channels or sensors collecting data from.
readonly double SharpBCI.EEGDeviceAdapter.sampleRate |
The rate per second that data is expected to be received.