|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.neurosky.thinkgear.TGDevice
public class TGDevice
Class to connect and receive data from a ThinkGear device.
| Field Summary | |
|---|---|
static int |
MSG_ATTENTION
|
static int |
MSG_BLINK
|
static int |
MSG_EEG_POWER
|
static int |
MSG_HEART_RATE
|
static int |
MSG_LOW_BATTERY
|
static int |
MSG_MEDITATION
|
static int |
MSG_POOR_SIGNAL
|
static int |
MSG_RAW_COUNT
|
static int |
MSG_RAW_DATA
|
static int |
MSG_RAW_MULTI
|
static int |
MSG_STATE_CHANGE
|
static int |
MSG_THINKCAP_RAW
|
static int |
STATE_CONNECTED
|
static int |
STATE_CONNECTING
|
static int |
STATE_DISCONNECTED
|
static int |
STATE_IDLE
|
static int |
STATE_NOT_FOUND
|
static int |
STATE_NOT_PAIRED
|
| Constructor Summary | |
|---|---|
TGDevice(BluetoothAdapter btAdapter,
Handler handler)
Initializes a new TGDevice. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the connection the the Bluetooth device. |
void |
connect(BluetoothDevice btDevice)
Connects to the specified Bluetooth device with raw EEG disabled. |
void |
connect(BluetoothDevice btDevice,
boolean rawEnabled)
Connects to the specified Bluetooth device with configurable raw output. |
int |
getState()
Gets the state of the TGDevice |
int |
getVersion()
Returns the version number of the TGDevice driver |
void |
start()
Starts the data stream. |
boolean |
startLog(java.lang.String path,
java.lang.String fileName)
Enables logging of the stream |
void |
stop()
Stops the data stream. |
void |
stopLog()
Disables logging of stream. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int STATE_IDLE
public static final int STATE_CONNECTING
public static final int STATE_CONNECTED
public static final int STATE_DISCONNECTED
public static final int STATE_NOT_FOUND
public static final int STATE_NOT_PAIRED
public static final int MSG_STATE_CHANGE
public static final int MSG_POOR_SIGNAL
public static final int MSG_HEART_RATE
public static final int MSG_ATTENTION
public static final int MSG_MEDITATION
public static final int MSG_BLINK
public static final int MSG_RAW_DATA
public static final int MSG_EEG_POWER
public static final int MSG_RAW_MULTI
public static final int MSG_THINKCAP_RAW
public static final int MSG_RAW_COUNT
public static final int MSG_LOW_BATTERY
| Constructor Detail |
|---|
public TGDevice(BluetoothAdapter btAdapter,
Handler handler)
btAdapter - BluetoothAdapter of the device.handler - Handler to accept messages from TGDevice| Method Detail |
|---|
public int getVersion()
public void connect(BluetoothDevice btDevice)
btDevice - Desired BluetoothDevice
public void connect(BluetoothDevice btDevice,
boolean rawEnabled)
btDevice - Desired BluetoothDevicerawEnabled - Enable or disable raw EEG output.public void close()
public void start()
public void stop()
public int getState()
public boolean startLog(java.lang.String path,
java.lang.String fileName)
path - Location of desired log file. Pass in empty string for default location [external storage]/Android/data/com.neurosky.thinkgear/fileName - Filename of disired log file. Pass in empty string for default filename yyyy-MM-dd-hhmmss.txt (current timestamp)
public void stopLog()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||