|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.devices.gps.GPS
org.jscience.devices.gps.garmin.GarminGPS
public class GarminGPS
DOCUMENT ME!
| Field Summary | |
|---|---|
protected boolean |
active
The listening thread will be active as long as this variable remains true. |
protected java.lang.String |
description
A human-readable description of the GPS-unit. |
protected java.util.Vector |
GarminListeners
A vector containing references to all the GarminListeners. |
| Fields inherited from class org.jscience.devices.gps.GPS |
|---|
zListeners |
| Constructor Summary | |
|---|---|
GarminGPS(java.io.BufferedInputStream i,
java.io.BufferedOutputStream o)
|
|
| Method Summary | |
|---|---|
void |
addGarminListener(GarminListener l)
Adds the specified GarminListener to receive all packets sent from the GPS. |
protected void |
Distribute(GarminPacket p)
This method is used to identify the type of packet received, and distribute it to the correct listeners. |
protected void |
fireGarminPacket(GarminPacket p)
Goes through the list of GarminListeners and transmits p to them. |
java.lang.String |
getDescription()
Returns a string telling the brand of the Garmin-gps, software version and the protocols supported. |
void |
removeGarminListener(GarminListener l)
Removes the specified GarminListener from the list of listeners. |
void |
requestDate()
Makes a request for the specified data to the GPS. |
void |
requestLaps()
Asks the GPS to transmit all the laps in it's memory. |
void |
requestPosition()
Makes a request for the specified data to the GPS. |
void |
requestTime()
Makes a request for the specified data to the GPS. |
void |
requestTracks()
Asks the GPS to transmit all the tracks in it's memory. |
void |
requestWaypoints()
Asks the GPS to transmit all the waypoints in it's memory. |
void |
run()
This method is listening for input from the GPS. |
void |
setAutoTransmit(boolean t)
Asks the GPS to either start or stop transmitting data periodically. |
void |
shutdown(boolean b)
Stops communication with GPS. |
| Methods inherited from class org.jscience.devices.gps.GPS |
|---|
addGPSlistener, addLapListener, addTrackListener, addTransferListener, addWaypointListener, fireDateData, fireLapData, firePositionData, fireTimeData, fireTrackpointData, fireTransferComplete, fireTransferStart, fireWaypointData, removeGPSListener, removeLapListener, removeTrackListener, removeTransferListener, removeWaypointListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String description
protected boolean active
protected java.util.Vector GarminListeners
| Constructor Detail |
|---|
public GarminGPS(java.io.BufferedInputStream i,
java.io.BufferedOutputStream o)
| Method Detail |
|---|
public void addGarminListener(GarminListener l)
l - DOCUMENT ME!public void removeGarminListener(GarminListener l)
l - DOCUMENT ME!protected void fireGarminPacket(GarminPacket p)
p - DOCUMENT ME!public void run()
run in interface java.lang.Runnableprotected void Distribute(GarminPacket p)
p - DOCUMENT ME!public void requestPosition()
requestPosition in class GPSpublic void requestTime()
requestTime in class GPSpublic void requestDate()
requestDate in class GPSpublic void requestWaypoints()
requestWaypoints in class GPSpublic void requestTracks()
requestTracks in class GPSpublic void requestLaps()
public void setAutoTransmit(boolean t)
setAutoTransmit in class GPSt - DOCUMENT ME!public void shutdown(boolean b)
shutdown in class GPSb - DOCUMENT ME!public java.lang.String getDescription()
getDescription in class GPS
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||