|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--dk.itu.haas.GPS.GPS | +--dk.itu.haas.GPS.Garmin.GarminGPS
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 dk.itu.haas.GPS.GPS |
GPSlisteners, TransferListeners, WaypointListeners |
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 |
requestPosition()
Makes a request for the specified data to the GPS. |
void |
requestTime()
Makes a request for the specified data to the GPS. |
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 dk.itu.haas.GPS.GPS |
addGPSlistener, addTransferListener, addWaypointListener, fireDateData, firePositionData, fireTimeData, fireTransferComplete, fireTransferStart, fireWaypointData, removeGPSListener, 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)
public void removeGarminListener(GarminListener l)
protected void fireGarminPacket(GarminPacket p)
public void run()
run
in interface java.lang.Runnable
protected void Distribute(GarminPacket p)
public void requestPosition()
requestPosition
in class GPS
public void requestTime()
requestTime
in class GPS
public void requestDate()
requestDate
in class GPS
public void requestWaypoints()
requestWaypoints
in class GPS
public void setAutoTransmit(boolean t)
setAutoTransmit
in class GPS
public void shutdown(boolean b)
shutdown
in class GPS
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 |