|
|||||||||
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 |
BT_STATE_CONNECTED
|
static int |
BT_STATE_CONNECTING
|
static int |
BT_STATE_IDLE
|
static int |
MESSAGE_BT_STATE_CHANGE
|
static int |
MESSAGE_ESENSE_DATA
|
static int |
MESSAGE_LOW_BATTERY
|
static int |
MESSAGE_RAW_COUNT
|
static int |
MESSAGE_RAW_DATA
|
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 |
void |
start()
Starts the data stream. |
void |
stop()
Stops the data stream. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BT_STATE_IDLE
public static final int BT_STATE_CONNECTING
public static final int BT_STATE_CONNECTED
public static final int MESSAGE_BT_STATE_CHANGE
public static final int MESSAGE_RAW_DATA
public static final int MESSAGE_ESENSE_DATA
public static final int MESSAGE_RAW_COUNT
public static final int MESSAGE_LOW_BATTERY
Constructor Detail |
---|
public TGDevice(BluetoothAdapter btAdapter, Handler handler)
btAdapter
- BluetoothAdapter of the device.handler
- Handler to accept messages from TGDeviceMethod Detail |
---|
public void connect(BluetoothDevice btDevice)
btDevice
- Desired BluetoothDevicepublic 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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |