|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--dk.itu.haas.GPS.GPS
This is the abstract base-class that encapsulates the functionality of a generic GPS-unit.
Field Summary | |
protected java.util.Vector |
GPSlisteners
A vector containing references to the objects registered as listeners on this GPS. |
protected java.util.Vector |
TransferListeners
A vector containing references to the objects registered as listeners for transfers from the GPS. |
protected java.util.Vector |
WaypointListeners
A vector containing references to the objects registered as listeners for waypoint-data from the GPS. |
Constructor Summary | |
protected |
GPS()
|
Method Summary | |
void |
addGPSlistener(IGPSlistener l)
Adds the specified IGPSlistener to receive data from the GPS. |
protected void |
addTransferListener(ITransferListener l)
Adds l to the list of listeners interested in transfer-events. |
void |
addWaypointListener(IWaypointListener l)
Adds l to the list of listeners interested in waypoint-data. |
protected void |
fireDateData(IDate dat)
Goes through the list of GPSlisteners and distributes the new date data. |
protected void |
firePositionData(IPosition pos)
Goes through the list of GPSlisteners and distributes the new position data. |
protected void |
fireTimeData(ITime time)
Goes through the list of GPSlisteners and distributes the new time data. |
void |
fireTransferComplete()
Notifies listeners of the end of a stream of data. |
void |
fireTransferStart(int number)
Notifies listeners of the beginning of a stream of data. |
void |
fireWaypointData(IWaypoint wp)
Goes through the list of Waypoint-listeners and distributes the waypoint wp. |
abstract java.lang.String |
getDescription()
Requests a descriptive string from the GPS. |
void |
removeGPSListener(IGPSlistener l)
Removes the the GPS-listener l from the list of GPS-listeners. |
protected void |
removeTransferListener(ITransferListener l)
Removes the the transfer-listener l from the list of transfer-listeners. |
void |
removeWaypointListener(IWaypointListener l)
Removes the the Waypoint-listener l from the list of Waypoint-listeners. |
abstract void |
requestDate()
Makes a request for the specified data to the GPS. |
abstract void |
requestPosition()
Makes a request for the specified data to the GPS. |
abstract void |
requestTime()
Makes a request for the specified data to the GPS. |
abstract void |
requestWaypoints()
Asks the GPS to transmit all the waypoints in it's memory. |
abstract void |
setAutoTransmit(boolean t)
Asks the GPS to either start or stop transmitting data periodically. |
abstract void |
shutdown(boolean b)
Stops communication with GPS. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.Vector GPSlisteners
protected java.util.Vector WaypointListeners
protected java.util.Vector TransferListeners
Constructor Detail |
protected GPS()
Method Detail |
public void addGPSlistener(IGPSlistener l)
protected void addTransferListener(ITransferListener l)
public void addWaypointListener(IWaypointListener l)
public void removeWaypointListener(IWaypointListener l)
public void removeGPSListener(IGPSlistener l)
protected void removeTransferListener(ITransferListener l)
public void fireTransferStart(int number)
public void fireWaypointData(IWaypoint wp)
public void fireTransferComplete()
protected void firePositionData(IPosition pos)
protected void fireDateData(IDate dat)
protected void fireTimeData(ITime time)
public abstract void requestPosition()
public abstract void requestTime()
public abstract void requestDate()
public abstract java.lang.String getDescription()
public abstract void requestWaypoints()
public abstract void setAutoTransmit(boolean t)
public abstract void shutdown(boolean b)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |