C# Class MCAEmotiv.Interop.AbstractEEGDataSource

An abstract base class for data sources
Inheritance: System.SafeDisposable, IEEGDataSource
Mostra file Open project: madelson/Emotiv-Experimenter

Public Methods

Method Description
AbstractEEGDataSource ( ) : System

Construct a data source with its own reader thread

AddListener ( IEEGDataListener listener ) : void

Add a listener to the data source

AddListeners ( IEnumerable listeners ) : void

Adds each of the listeners to the data source simultaneously

RemoveListener ( IEEGDataListener listener ) : void

Removes a listener from the data source

RemoveListeners ( IEnumerable listeners ) : void

Removes each of the listeners from the data source simultaneously.

Protected Methods

Method Description
DisposeHelper ( ) : void

Called from the reader thread in a locked context.

DisposeOfManagedResources ( ) : void

Sends a message to the internal reader thread to halt its execution

TryGetData ( IArrayView &data ) : bool

Called from the reader thread in a locked context.

Private Methods

Method Description
ReadLoop ( ) : void

Method Details

AbstractEEGDataSource() public method

Construct a data source with its own reader thread
public AbstractEEGDataSource ( ) : System
return System

AddListener() public method

Add a listener to the data source
public AddListener ( IEEGDataListener listener ) : void
listener IEEGDataListener
return void

AddListeners() public method

Adds each of the listeners to the data source simultaneously
public AddListeners ( IEnumerable listeners ) : void
listeners IEnumerable
return void

DisposeHelper() protected abstract method

Called from the reader thread in a locked context.
protected abstract DisposeHelper ( ) : void
return void

DisposeOfManagedResources() protected method

Sends a message to the internal reader thread to halt its execution
protected DisposeOfManagedResources ( ) : void
return void

RemoveListener() public method

Removes a listener from the data source
public RemoveListener ( IEEGDataListener listener ) : void
listener IEEGDataListener
return void

RemoveListeners() public method

Removes each of the listeners from the data source simultaneously.
public RemoveListeners ( IEnumerable listeners ) : void
listeners IEnumerable
return void

TryGetData() protected abstract method

Called from the reader thread in a locked context.
protected abstract TryGetData ( IArrayView &data ) : bool
data IArrayView
return bool