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

A device adapter that can be used to replay or reemit the data logged during a previous session. More...

Inheritance diagram for SharpBCI.CSVReadAdapter:
SharpBCI.EEGDeviceAdapter

Public Member Functions

 CSVReadAdapter (string filePath, double sampleRate)
 
override void Start ()
 Overwrite of the Start function from EEGDeviceAdapter class. More...
 
override void Stop ()
 Sets isCancelled to true to stop the Run function and joins the thread when complete. More...
 
- Public Member Functions inherited from SharpBCI.EEGDeviceAdapter
delegate void DataHandler (EEGEvent evt)
 
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...
 

Additional Inherited Members

- Public Attributes inherited from SharpBCI.EEGDeviceAdapter
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 inherited from SharpBCI.EEGDeviceAdapter
 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

A device adapter that can be used to replay or reemit the data logged during a previous session.

After logging a session to a CSV file using the SharpBCI.LogRawData, you can read the data, conver the data into rawEEGEvents, and emit them through your program acting as a dummy EEG device.

Constructor & Destructor Documentation

SharpBCI.CSVReadAdapter.CSVReadAdapter ( string  filePath,
double  sampleRate 
)

Member Function Documentation

override void SharpBCI.CSVReadAdapter.Start ( )
virtual

Overwrite of the Start function from EEGDeviceAdapter class.

Creates a new thread to run the Run function.

Implements SharpBCI.EEGDeviceAdapter.

override void SharpBCI.CSVReadAdapter.Stop ( )
virtual

Sets isCancelled to true to stop the Run function and joins the thread when complete.

Implements SharpBCI.EEGDeviceAdapter.


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