|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfrog.plugin.bluetooth.BluetoothPlugin
public class BluetoothPlugin
| Field Summary | |
|---|---|
(package private) int |
test
|
| Constructor Summary | |
|---|---|
BluetoothPlugin()
Constructor can only have one instance per run. |
|
| Method Summary | |
|---|---|
void |
addFilter(Device arg0,
int arg1,
String arg2)
Instruct the device to add a new filter to its filtering pipeline. |
void |
calibrate(Device arg0)
Calibrates the accelerometers of the target device. |
void |
connect(Device device)
Formally connect to a specified device. |
void |
disconnect(Device arg0)
Disconnect a connected device. |
void |
disconnectAll()
Disconnect from all devices known to this Plugin. |
void |
discover(Vector<Device> arg0)
A non-blocking method for finding nearby discoverable devices. |
String[] |
getActiveFilters(Device arg0)
Returns a list of filters currently active on the device. |
String[] |
getAvailFilters()
Returns a list of available filters that this device supports. |
static BluetoothPlugin |
getInstance()
|
int |
getSampleRate(Device arg0)
Gets the current sampling rate of this Device in hertz. |
void |
kill(Device arg0)
|
void |
killAll()
|
void |
removeFilter(Device arg0,
int arg1)
Removes a filter from the list of active filters on the Device. |
void |
resetFilters(Device arg0)
Removes any filters currently active on the Device. |
void |
send(Device device,
String s)
|
void |
setSampleRate(Device arg0,
int arg1)
Instructs this device to sample at a given rate. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
int test
| Constructor Detail |
|---|
public BluetoothPlugin()
throws Throwable
Throwable| Method Detail |
|---|
public static BluetoothPlugin getInstance()
public void send(Device device,
String s)
public void kill(Device arg0)
public void killAll()
public void addFilter(Device arg0,
int arg1,
String arg2)
throws IOException
Plugin
addFilter in interface Pluginarg0 - the device to send the new filter information toarg1 - the filter desired. This should be the index from the array
of filters.arg2 - the argument String for this filter
IOException - if any communication error occursPlugin.getAvailFilters(),
Device.addFilter(int, String)
public void calibrate(Device arg0)
throws IOException
Plugin
calibrate in interface Pluginarg0 - the device to be calibrated
IOException - if any communication error occursDevice.calibrate()
public void connect(Device device)
throws IOException
Plugin
connect in interface Plugindevice - the device to connect to
IOException - if any communication error occurs. It should be
assumed that if this exception is thrown, the
device is NOT connected.Device.connect(DeviceListener)
public void disconnect(Device arg0)
throws IOException
Plugin
disconnect in interface Pluginarg0 - the device to disconnect from
IOException - if the device cannot be sent a disconnect signal.
Regardless, a best attempt must be made to tear
down any local resources tied to this device.Device.disconnect()
public void disconnectAll()
throws IOException
Plugin
disconnectAll in interface PluginIOException - if any of the connected devices could not be sent a
disconnect message. Regardless, FROG is probably
shutting down and any local resources should be
freed.
public void discover(Vector<Device> arg0)
throws IOException
Plugin
discover in interface PluginIOException - any catastrophic errors occur. Should ideally be
thrown if the radio or other hardware is missing.
Communication errors between the plugin and a
device are not a sufficient cause to throw this
exception.public String[] getActiveFilters(Device arg0)
Pluginnull or empty array
may be returned.
getActiveFilters in interface PluginDevice.getActiveFilters()public String[] getAvailFilters()
Plugin
getAvailFilters in interface PluginDevice.getAvailFilters()public int getSampleRate(Device arg0)
Plugin
getSampleRate in interface PluginDevice.getSampleRate()
public void removeFilter(Device arg0,
int arg1)
Plugin
removeFilter in interface Pluginarg0 - the Device to delete a filter fromarg1 - the position on the Device's active filters list to remove
public void resetFilters(Device arg0)
throws IOException
Plugin
resetFilters in interface Pluginarg0 - the Device to clear the filters on
IOException - if any communication error occursPlugin.addFilter(Device, int, String),
Device.resetFilters()
public void setSampleRate(Device arg0,
int arg1)
throws IOException
Plugin
setSampleRate in interface Pluginarg1 - the rate to sample at in hertz
IOException - if any communication error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||