|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.co.silentsoftware.reader.BluetoothGPSReader
public class BluetoothGPSReader
Simple class to associate with a Bluetooth GPS and read the NMEA data in, making a call back to the current displayed view
| Field Summary |
|---|
| Fields inherited from interface javax.bluetooth.DiscoveryListener |
|---|
INQUIRY_COMPLETED, INQUIRY_ERROR, INQUIRY_TERMINATED, SERVICE_SEARCH_COMPLETED, SERVICE_SEARCH_DEVICE_NOT_REACHABLE, SERVICE_SEARCH_ERROR, SERVICE_SEARCH_NO_RECORDS, SERVICE_SEARCH_TERMINATED |
| Constructor Summary | |
|---|---|
BluetoothGPSReader(BluetoothListView bluetoothListView)
Default constructor with a view (data renderer) argument |
|
| Method Summary | |
|---|---|
void |
deviceDiscovered(javax.bluetooth.RemoteDevice rd,
javax.bluetooth.DeviceClass dc)
|
void |
discoverGPS()
Simple method to search for any nearby bluetooth device and initiate connection (if it has a serial port - see inquiryCompleted method) |
java.lang.String |
getLastDeviceName()
Returns the BT name of the last GPS that was connected to |
void |
inquiryCompleted(int discType)
|
void |
resetToCleanStatus()
Resets the Bluetooth discovery transaction id, whether BT is still connected, and blanks the device name in the configuration. |
void |
selectDevice(int index,
java.lang.String name)
Connect to the chosen BT GPS |
void |
selectDevice(java.lang.String name)
Connect to the chosen Bluetooth GPS |
void |
servicesDiscovered(int transID,
javax.bluetooth.ServiceRecord[] sr)
|
void |
serviceSearchCompleted(int arg0,
int respCode)
|
void |
shutdown()
Flag to shutdown the reader and disconnect the socket |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BluetoothGPSReader(BluetoothListView bluetoothListView)
| Method Detail |
|---|
public void deviceDiscovered(javax.bluetooth.RemoteDevice rd,
javax.bluetooth.DeviceClass dc)
deviceDiscovered in interface javax.bluetooth.DiscoveryListenerpublic void inquiryCompleted(int discType)
inquiryCompleted in interface javax.bluetooth.DiscoveryListenerpublic java.lang.String getLastDeviceName()
public void servicesDiscovered(int transID,
javax.bluetooth.ServiceRecord[] sr)
servicesDiscovered in interface javax.bluetooth.DiscoveryListenerpublic void resetToCleanStatus()
public void serviceSearchCompleted(int arg0,
int respCode)
serviceSearchCompleted in interface javax.bluetooth.DiscoveryListener
public void selectDevice(int index,
java.lang.String name)
index - public void selectDevice(java.lang.String name)
name - public void discoverGPS()
discoverGPS in interface GPSReaderpublic void shutdown()
shutdown in interface GPSReader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||