SharpBCI
A multi-threaded brain control interface (BCI) library in C#
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Pages
SharpBCI.EEGDeviceAdapter Class Referenceabstract

An abstract base class from which all device adapters should inherit. More...

Inheritance diagram for SharpBCI.EEGDeviceAdapter:
SharpBCI.CSVReadAdapter SharpBCI.InstrumentedDummyAdapter SharpBCI.RemoteOSCAdapter SharpBCI.DummyAdapter

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...
 

Detailed Description

An abstract base class from which all device adapters should inherit.

Constructor & Destructor Documentation

SharpBCI.EEGDeviceAdapter.EEGDeviceAdapter ( int  channels,
double  sampleRate 
)
protected

Member Function Documentation

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)
void SharpBCI.EEGDeviceAdapter.EmitData ( 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.

abstract void SharpBCI.EEGDeviceAdapter.Start ( )
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.

abstract void SharpBCI.EEGDeviceAdapter.Stop ( )
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.

Member Data Documentation

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.


The documentation for this class was generated from the following file: