|
ESP OpenBCI - An EEG Signal Processing Library for OpenBCI Hardware | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.github.mrstampy.esp.dsp.lab.AbstractRawEspConnection<SOCKET>
SOCKET - the generic typepublic abstract class AbstractRawEspConnection<SOCKET extends MultiConnectionSocket>
Abstract implementation.
| Constructor Summary | |
|---|---|
AbstractRawEspConnection()
|
|
| Method Summary | |
|---|---|
void |
addConnectionEventListener(ConnectionEventListener listener)
Adds the connection event listener. |
void |
bindBroadcaster()
Binds the broadcaster to the local host and the broadcaster port in AbstractSocketConnector. |
boolean |
canBroadcast()
Returns true if this instance has been configured for broadcasting. |
void |
clearConnectionEventListeners()
Clear connection event listeners. |
EspChannel |
getChannel(int channelNumber)
Returns the EspChannel representation specified by the channel
number. |
java.util.List<EspChannel> |
getChannels()
Returns the EspChannel representations processed by the
implementation. |
Lab |
getDefaultLab()
Returns a DefaultLab instance set to use this connection. |
int |
getNumChannels()
Returns the number of channels. |
abstract SOCKET |
getSocket()
Gets the socket. |
EspWindowFunction |
getWindowFunction()
Return the window function. |
boolean |
isBound()
Returns true if the broadcaster is bound. |
boolean |
isConnected()
Returns true if connected to the AbstractMultiConnectionSocket
socket. |
void |
removeConnectionEventListener(ConnectionEventListener listener)
Removes the connection event listener. |
void |
setWindowFunction(EspWindowFunction function)
Set the window function. |
void |
start()
Connects to the socket. |
void |
stop()
Closes the connection to the AbstractMultiConnectionSocket socket. |
void |
unbindBroadcaster()
Unbinds the broadcaster. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.github.mrstampy.esp.dsp.lab.RawEspConnection |
|---|
getCurrent, getCurrent, getCurrentFor, getCurrentFor, getDSPValues, getName, getUtilities |
| Constructor Detail |
|---|
public AbstractRawEspConnection()
| Method Detail |
|---|
public void addConnectionEventListener(ConnectionEventListener listener)
MultiConnectionSocket
addConnectionEventListener in interface MultiConnectionSocketlistener - the listenerpublic void removeConnectionEventListener(ConnectionEventListener listener)
MultiConnectionSocket
removeConnectionEventListener in interface MultiConnectionSocketlistener - the listenerpublic void clearConnectionEventListeners()
MultiConnectionSocket
clearConnectionEventListeners in interface MultiConnectionSocket
public void start()
throws MultiConnectionSocketException
MultiConnectionSocket
start in interface MultiConnectionSocketMultiConnectionSocketException - if already connected or an unexpected error occurspublic void stop()
MultiConnectionSocketAbstractMultiConnectionSocket socket.
stop in interface MultiConnectionSocketpublic boolean isConnected()
MultiConnectionSocketAbstractMultiConnectionSocket
socket.
isConnected in interface MultiConnectionSocket
public void bindBroadcaster()
throws java.io.IOException
MultiConnectionSocketAbstractSocketConnector.
bindBroadcaster in interface MultiConnectionSocketjava.io.IOException - Signals that an I/O exception has occurred.AbstractSocketConnectorpublic void unbindBroadcaster()
MultiConnectionSocket
unbindBroadcaster in interface MultiConnectionSocketAbstractSocketConnectorpublic boolean isBound()
MultiConnectionSocket
isBound in interface MultiConnectionSocketAbstractSocketConnectorpublic boolean canBroadcast()
MultiConnectionSocket
canBroadcast in interface MultiConnectionSocketpublic EspWindowFunction getWindowFunction()
RawEspConnection
getWindowFunction in interface RawEspConnectionEspSignalUtilities.setWindow(ddf.minim.analysis.WindowFunction)public void setWindowFunction(EspWindowFunction function)
RawEspConnection
setWindowFunction in interface RawEspConnectionfunction - the new window functionEspSignalUtilities.setWindow(ddf.minim.analysis.WindowFunction)public int getNumChannels()
MultiConnectionSocket
getNumChannels in interface MultiConnectionSocketpublic java.util.List<EspChannel> getChannels()
MultiConnectionSocketEspChannel representations processed by the
implementation.
getChannels in interface MultiConnectionSocketpublic EspChannel getChannel(int channelNumber)
MultiConnectionSocketEspChannel representation specified by the channel
number.
getChannel in interface MultiConnectionSocketchannelNumber - the channel number
public Lab getDefaultLab()
DefaultLab instance set to use this connection. Can be
overridden in subclasses for custom Lab implementations.
getDefaultLab in interface RawEspConnectionpublic abstract SOCKET getSocket()
|
brought to you by Mr. Stampy | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||