|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.uv.robotica.gvsig.mobile.gps.GPSManager
This class manages access to the GPS device and calls listeners related to GPS events
GPSRelevantEventsListener
,
GPSProcessedEventsListener
,
GPSManagementEventsListener
Field Summary | |
static int |
FILE_DEVICE
Constant identifying a GPS serial port device |
GPSFix |
lastGPSFix
A structure containing all information concerning the last GPS fix |
static int |
SERIAL_PORT_DEVICE
Constant identifying a GPS serial port device |
Constructor Summary | |
GPSManager()
Constructor. |
Method Summary | |
void |
addGPSManagementEventsListener(GPSRelevantEventsListener listener)
Adds a listener for GPS management events (connection, disconnection, etc.) |
void |
addGPSRawDataListener(GPSRawDataListener listener)
Public method for adding Raw Data listeners, like a GPS debug console |
void |
addGPSRelevantEventsListener(GPSRelevantEventsListener listener)
Adds a listener for GPS relevant events (position, time, date, etc.) |
void |
connectToGPS()
Connects to the GPS device |
Waypoint |
createWaypoint()
Creates a waypoint with the current values for lat, lon, ele and time The rest of attributes shall be completed manually |
void |
disconnectFromGPS()
Disconnect from the GPS device |
int |
getBaudRate()
Returns the selected baud rate to communicate with the GPS device via serial port |
int |
getDeviceType()
Gets the GPS device type |
static GPSManager |
getGPSManager()
Returns the GPSManager, which is a singleton |
java.lang.String |
getPortName()
Returns the port name of the GPS device, which can be a serial port name (i.e. |
java.lang.String |
getSimFileName()
|
java.lang.String |
getSimFolderName()
|
int |
getVSim()
Devuelve la velocidad de simulacion actual |
boolean |
isConnected()
Returns the state of the GPS device |
boolean |
isRecenter()
|
boolean |
isShowIcon()
|
void |
propertyChange(java.beans.PropertyChangeEvent event)
Procesa los cambios de propiedades como posicion, tiempo, velocidad, etc Metodo de tipo callback perteneciente al interfaz PropertyChangeListener, invocado cada vez que cambia una propiedad del GPS |
void |
removeGPSManagementEventsListener(GPSRelevantEventsListener listener)
Removes a listener for GPS management events |
void |
removeGPSRawDataListener(GPSRawDataListener listener)
Public method for removing Raw Data listeners |
void |
removeGPSRelevantEventsListener(GPSRelevantEventsListener listener)
Removes a listener for GPS relevant events |
void |
setBaudRate(int baudRate)
Sets the baud rate to communicate with the GPS device via serial port |
void |
setDeviceType(int _deviceType)
Sets the GPS device type |
void |
setPortName(java.lang.String portName)
Sets the port name of the GPS device, which can be a serial port name (i.e. |
void |
setRecenter(boolean recenter)
|
void |
setShowIcon(boolean showIcon)
|
void |
setSimFileName(java.lang.String _simFileName)
|
void |
setSimFolderName(java.lang.String _simFolderName)
|
void |
setVSim(int VSim)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SERIAL_PORT_DEVICE
public static final int FILE_DEVICE
public GPSFix lastGPSFix
Constructor Detail |
public GPSManager()
Method Detail |
public static GPSManager getGPSManager()
public void connectToGPS() throws GPSException
GPSException
public void disconnectFromGPS()
public boolean isConnected()
public void setBaudRate(int baudRate)
baudRate
- public int getBaudRate()
public void setPortName(java.lang.String portName)
portName
- public java.lang.String getPortName()
public void setDeviceType(int _deviceType)
_deviceType
- public int getDeviceType()
public java.lang.String getSimFolderName()
public void setSimFolderName(java.lang.String _simFolderName)
public java.lang.String getSimFileName()
public void setSimFileName(java.lang.String _simFileName)
public int getVSim()
public void setVSim(int VSim)
public void addGPSRelevantEventsListener(GPSRelevantEventsListener listener) throws java.lang.IllegalArgumentException
listener
- the listener to be added.
java.lang.IllegalArgumentException
- if listener
is
null
.public void removeGPSRelevantEventsListener(GPSRelevantEventsListener listener) throws java.lang.IllegalArgumentException
listener
- the listener to be removed.
java.lang.IllegalArgumentException
- if listener
is
null
.public void addGPSManagementEventsListener(GPSRelevantEventsListener listener) throws java.lang.IllegalArgumentException
listener
- the listener to be added.
java.lang.IllegalArgumentException
- if listener
is
null
.public void removeGPSManagementEventsListener(GPSRelevantEventsListener listener) throws java.lang.IllegalArgumentException
listener
- the listener to be removed.
java.lang.IllegalArgumentException
- if listener
is
null
.public void addGPSRawDataListener(GPSRawDataListener listener)
listener
- public void removeGPSRawDataListener(GPSRawDataListener listener)
listener
- public void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange
in interface java.beans.PropertyChangeListener
public Waypoint createWaypoint()
public boolean isRecenter()
public void setRecenter(boolean recenter)
public boolean isShowIcon()
public void setShowIcon(boolean showIcon)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |