|
|||||||||
| Home >> All >> org >> dinopolis >> gpstool >> [ gpsinput overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.dinopolis.gpstool.gpsinput
Class GPSGeneralDataProcessor

java.lang.Objectorg.dinopolis.gpstool.gpsinput.GPSGeneralDataProcessor
- All Implemented Interfaces:
- GPSDataProcessor
- Direct Known Subclasses:
- GPSSimulationDataProcessor
- public abstract class GPSGeneralDataProcessor
- extends java.lang.Object
- implements GPSDataProcessor
- extends java.lang.Object
All classes extending this class are interpreting data from a GPSDevice (serial gps-receivier, file containing gps data, ...) and provide this information in a uniform way. So an NMEA-processor interprets NMEA sentences, while a Garmin-Processor understands the garmin protocol.
This abstract class adds some basic functionality all GSPDataProcessors might use.
- Version:
- $Revision: 1.5 $
| Field Summary | |
protected java.util.Map |
gps_data_
the map the gps data is stored in |
protected java.lang.Object |
gps_data_lock_
the lock object for the gps data |
protected GPSDevice |
gps_device_
the GPSDevice |
protected java.util.Vector |
progress_listener_
the progress listener |
protected java.beans.PropertyChangeSupport |
property_change_support_
the gps data change listeners |
protected java.util.Vector |
raw_data_listener_
the raw data listener |
| Fields inherited from interface org.dinopolis.gpstool.gpsinput.GPSDataProcessor |
ALTITUDE, DEPTH, EPE, GETROUTES, GETSCREENSHOT, GETTRACKS, GETWAYPOINTS, HEADING, KM2NAUTIC, LOCATION, NUMBER_SATELLITES, SATELLITE_INFO, SETROUTES, SETTRACKS, SETWAYPOINTS, SPEED |
| Constructor Summary | |
GPSGeneralDataProcessor()
|
|
| Method Summary | |
void |
addGPSDataChangeListener(java.beans.PropertyChangeListener listener)
Adds a listener for GPS data change events. |
void |
addGPSDataChangeListener(java.lang.String key,
java.beans.PropertyChangeListener listener)
Adds a listener for GPS data change events. |
void |
addGPSRawDataListener(GPSRawDataListener listener)
Adds a listener for raw GPS data (for loggin purpose or similar). |
void |
addProgressListener(org.dinopolis.gpstool.util.ProgressListener listener)
Adds a listener for transfer progress (for transfer or route/track/waypoint data). |
protected void |
changeGPSData(java.lang.String key,
java.lang.Object value)
Changes the gps data with given key. |
abstract void |
close()
Stopps the data processing. |
protected void |
fireProgressActionEnd(java.lang.String action_id)
Fire the ProgressListener actionEnd |
protected void |
fireProgressActionProgress(java.lang.String action_id,
int current_value)
Fire the progressListener actionStart |
protected void |
fireProgressActionStart(java.lang.String action_id,
int min_value,
int max_value)
Fire the ProgressListener actionStart |
protected void |
fireRawDataReceived(char[] raw_data,
int offset,
int length)
Fire the event for raw data that was received (for loggers etc.) |
java.util.Map |
getGPSData()
Returns a map containing the last received data from the GPSDevice or null, if no data was retrieved until now. |
java.lang.Object |
getGPSData(java.lang.String key)
Returns the last received data from the GPSDevice that is named by the key or null if no data with the given
key was retrieved until now. |
GPSDevice |
getGPSDevice()
Returns the GPSDevice where the data will be retrieved from. |
abstract GPSPosition |
getGPSPosition()
Returns the last received position from the GPSDevice or null if no position was retrieved until now. |
abstract float |
getHeading()
Returns the last received heading (direction) from the GPSDevice or -1.0 if no heading was retrieved until now. |
java.util.List |
getRoutes()
Get a list of routes from the gps device. |
java.awt.image.BufferedImage |
getScreenShot()
Get a screenshot of the gpsdevice. |
java.util.List |
getTracks()
Get a list of tracks from the gps device. |
java.util.List |
getWaypoints()
Get a list of waypoints from the gps device. |
abstract void |
open()
Starts the data processing. |
void |
removeGPSDataChangeListener(java.beans.PropertyChangeListener listener)
Removes a listener for GPS data change events. |
void |
removeGPSDataChangeListener(java.lang.String key,
java.beans.PropertyChangeListener listener)
Removes a listener for GPS data change events. |
void |
removeGPSRawDataListener(GPSRawDataListener listener)
Removes a listener for faw GPS data. |
void |
removeProgressListener(org.dinopolis.gpstool.util.ProgressListener listener)
Removes a listener for transfer progress (for transfer or route/track/waypoint data). |
void |
setGPSDevice(GPSDevice gps_device)
Sets the GPSDevice where the data will be retrieved from. |
void |
setRoutes(java.util.List routes)
Write the routes to the gps device. |
void |
setTracks(java.util.List tracks)
Write the tracks to the gps device. |
void |
setWaypoints(java.util.List waypoints)
Write the waypoints to the gps device. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.dinopolis.gpstool.gpsinput.GPSDataProcessor |
getGPSInfo, startSendPositionPeriodically, stopSendPositionPeriodically |
| Field Detail |
gps_device_
protected GPSDevice gps_device_
- the GPSDevice
gps_data_
protected java.util.Map gps_data_
- the map the gps data is stored in
gps_data_lock_
protected java.lang.Object gps_data_lock_
- the lock object for the gps data
property_change_support_
protected java.beans.PropertyChangeSupport property_change_support_
- the gps data change listeners
raw_data_listener_
protected java.util.Vector raw_data_listener_
- the raw data listener
progress_listener_
protected java.util.Vector progress_listener_
- the progress listener
| Constructor Detail |
GPSGeneralDataProcessor
public GPSGeneralDataProcessor()
| Method Detail |
open
public abstract void open()
throws GPSException
- Starts the data processing. The Data Processor connects to the
GPSDevice and starts retrieving information.
- Specified by:
openin interfaceGPSDataProcessor
close
public abstract void close()
throws GPSException
- Stopps the data processing. The Data Processor disconnects from the
GPSDevice.
- Specified by:
closein interfaceGPSDataProcessor
setGPSDevice
public void setGPSDevice(GPSDevice gps_device)
- Sets the GPSDevice where the data will be retrieved from.
- Specified by:
setGPSDevicein interfaceGPSDataProcessor
getGPSDevice
public GPSDevice getGPSDevice()
- Returns the GPSDevice where the data will be retrieved from.
- Specified by:
getGPSDevicein interfaceGPSDataProcessor
getGPSPosition
public abstract GPSPosition getGPSPosition()
- Returns the last received position from the GPSDevice or
nullif no position was retrieved until now.- Specified by:
getGPSPositionin interfaceGPSDataProcessor
getHeading
public abstract float getHeading()
- Returns the last received heading (direction) from the GPSDevice or
-1.0if no heading was retrieved until now.- Specified by:
getHeadingin interfaceGPSDataProcessor
getGPSData
public java.lang.Object getGPSData(java.lang.String key) throws java.lang.IllegalArgumentException
- Returns the last received data from the GPSDevice that is named by
the
keyornullif no data with the given key was retrieved until now. The naming scheme for the keys is taken from the NMEA standard (e.g. GLL for location, HDG for heading, ...)- Specified by:
getGPSDatain interfaceGPSDataProcessor
getGPSData
public java.util.Map getGPSData()
- Returns a map containing the last received data from the GPSDevice
or
null, if no data was retrieved until now. The naming scheme for the keys is taken from the NMEA standard (e.g. GLL for location, HDG for heading, ...)- Specified by:
getGPSDatain interfaceGPSDataProcessor
getWaypoints
public java.util.List getWaypoints() throws java.lang.UnsupportedOperationException, GPSException
- Get a list of waypoints from the gps device.
- Specified by:
getWaypointsin interfaceGPSDataProcessor
setWaypoints
public void setWaypoints(java.util.List waypoints) throws java.lang.UnsupportedOperationException, GPSException
- Write the waypoints to the gps device.
- Specified by:
setWaypointsin interfaceGPSDataProcessor
getRoutes
public java.util.List getRoutes() throws java.lang.UnsupportedOperationException, GPSException
- Get a list of routes from the gps device.
- Specified by:
getRoutesin interfaceGPSDataProcessor
setRoutes
public void setRoutes(java.util.List routes) throws java.lang.UnsupportedOperationException, GPSException
- Write the routes to the gps device.
- Specified by:
setRoutesin interfaceGPSDataProcessor
getTracks
public java.util.List getTracks() throws java.lang.UnsupportedOperationException, GPSException
- Get a list of tracks from the gps device.
- Specified by:
getTracksin interfaceGPSDataProcessor
setTracks
public void setTracks(java.util.List tracks) throws java.lang.UnsupportedOperationException, GPSException
- Write the tracks to the gps device.
- Specified by:
setTracksin interfaceGPSDataProcessor
getScreenShot
public java.awt.image.BufferedImage getScreenShot() throws java.lang.UnsupportedOperationException, GPSException
- Get a screenshot of the gpsdevice.
- Specified by:
getScreenShotin interfaceGPSDataProcessor
addGPSDataChangeListener
public void addGPSDataChangeListener(java.lang.String key, java.beans.PropertyChangeListener listener) throws java.lang.IllegalArgumentException
- Adds a listener for GPS data change events.
- Specified by:
addGPSDataChangeListenerin interfaceGPSDataProcessor
addGPSDataChangeListener
public void addGPSDataChangeListener(java.beans.PropertyChangeListener listener) throws java.lang.IllegalArgumentException
- Adds a listener for GPS data change events.
- Specified by:
addGPSDataChangeListenerin interfaceGPSDataProcessor
removeGPSDataChangeListener
public void removeGPSDataChangeListener(java.lang.String key, java.beans.PropertyChangeListener listener) throws java.lang.IllegalArgumentException
- Removes a listener for GPS data change events.
- Specified by:
removeGPSDataChangeListenerin interfaceGPSDataProcessor
removeGPSDataChangeListener
public void removeGPSDataChangeListener(java.beans.PropertyChangeListener listener) throws java.lang.IllegalArgumentException
- Removes a listener for GPS data change events.
- Specified by:
removeGPSDataChangeListenerin interfaceGPSDataProcessor
changeGPSData
protected void changeGPSData(java.lang.String key, java.lang.Object value) throws java.lang.IllegalArgumentException
- Changes the gps data with given key. If there exists a gps data
with the given key, the new value replaces the old one. If the
value is set to
nullthe gps data is deleted. If there did not exist a gps data with the given key, it will be created.
fireRawDataReceived
protected void fireRawDataReceived(char[] raw_data,
int offset,
int length)
- Fire the event for raw data that was received (for loggers etc.)
addGPSRawDataListener
public void addGPSRawDataListener(GPSRawDataListener listener) throws java.lang.IllegalArgumentException
- Adds a listener for raw GPS data (for loggin purpose or similar).
- Specified by:
addGPSRawDataListenerin interfaceGPSDataProcessor
removeGPSRawDataListener
public void removeGPSRawDataListener(GPSRawDataListener listener) throws java.lang.IllegalArgumentException
- Removes a listener for faw GPS data.
- Specified by:
removeGPSRawDataListenerin interfaceGPSDataProcessor
addProgressListener
public void addProgressListener(org.dinopolis.gpstool.util.ProgressListener listener) throws java.lang.IllegalArgumentException
- Adds a listener for transfer progress (for transfer or
route/track/waypoint data).
- Specified by:
addProgressListenerin interfaceGPSDataProcessor
removeProgressListener
public void removeProgressListener(org.dinopolis.gpstool.util.ProgressListener listener) throws java.lang.IllegalArgumentException
- Removes a listener for transfer progress (for transfer or
route/track/waypoint data).
- Specified by:
removeProgressListenerin interfaceGPSDataProcessor
fireProgressActionStart
protected void fireProgressActionStart(java.lang.String action_id, int min_value, int max_value)
- Fire the ProgressListener actionStart
fireProgressActionProgress
protected void fireProgressActionProgress(java.lang.String action_id, int current_value)
- Fire the progressListener actionStart
fireProgressActionEnd
protected void fireProgressActionEnd(java.lang.String action_id)
- Fire the ProgressListener actionEnd
|
|||||||||
| Home >> All >> org >> dinopolis >> gpstool >> [ gpsinput overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.dinopolis.gpstool.gpsinput.GPSGeneralDataProcessor