location
Class GpsInfoEvent

java.lang.Object
  extended byjava.util.EventObject
      extended bylocation.GpsInfoEvent
All Implemented Interfaces:
java.io.Serializable

public class GpsInfoEvent
extends java.util.EventObject

This class encapulates the additional information about satellites, modes and data validity, extracted from the GPS unit each second.

Author:
Emanuele Cordone
See Also:
Serialized Form

Field Summary
(package private)  java.lang.String data_validity
           
(package private)  java.lang.String mode
           
(package private)  java.util.Vector SatVector
           
(package private)  java.lang.String usedSat
           
(package private)  java.lang.String viewedSat
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
GpsInfoEvent(java.lang.Object src, java.lang.String data_validity, java.lang.String mode, java.lang.String viewedSat, java.lang.String usedSat)
          Creates a new GpsInfoEvent
 
Method Summary
 void addSatellite(Satellite sat)
          Adds a Satellite object to the vector of Satellites
 java.lang.String getData_validity()
          Accessor method to the validity of data
 java.lang.String getMode()
          Accessor method to the mode (2D/3D)
 Satellite getSatellite(int i)
          Gets the satellite in position i of the vector
 java.lang.String getUsedSat()
          Accessor method to the number of used satellite
 java.lang.String getViewedSat()
          Accessor method to the number of viewed satellite
 int numberOfSatellites()
          Returns the number of Satellites in the vector
 java.lang.String toString()
          Gives a string representation of the object
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

data_validity

java.lang.String data_validity

mode

java.lang.String mode

viewedSat

java.lang.String viewedSat

usedSat

java.lang.String usedSat

SatVector

java.util.Vector SatVector
Constructor Detail

GpsInfoEvent

public GpsInfoEvent(java.lang.Object src,
                    java.lang.String data_validity,
                    java.lang.String mode,
                    java.lang.String viewedSat,
                    java.lang.String usedSat)
Creates a new GpsInfoEvent

Parameters:
src - The source of the event
data_validity - A string indicating the validity of the data extracted from the GPS
mode - A string indicating the GPS working mode
viewedSat - A string indicating the number of the viewed satellites
usedSat - A string indicating the number of the used satellites
Method Detail

addSatellite

public void addSatellite(Satellite sat)
Adds a Satellite object to the vector of Satellites

Parameters:
sat - A satellite Object

getSatellite

public Satellite getSatellite(int i)
Gets the satellite in position i of the vector

Parameters:
i - The position of the vector you want to read
Returns:
A Satellite Object

numberOfSatellites

public int numberOfSatellites()
Returns the number of Satellites in the vector

Returns:
an int

getData_validity

public java.lang.String getData_validity()
Accessor method to the validity of data

Returns:
a String

getMode

public java.lang.String getMode()
Accessor method to the mode (2D/3D)

Returns:
a String

getUsedSat

public java.lang.String getUsedSat()
Accessor method to the number of used satellite

Returns:
a String

getViewedSat

public java.lang.String getViewedSat()
Accessor method to the number of viewed satellite

Returns:
a String

toString

public java.lang.String toString()
Gives a string representation of the object

Returns:
a string