public class GPSManager
extends java.lang.Object
Singleton. Keeps track of all the available GPSDevices, as configured by GPS modules. Includes NMEA GPS built-in.
| Modifier and Type | Field and Description |
|---|---|
protected EventMulticaster |
caster
Caster is used by subclasses, so it's protected.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addGpsDevice(GPSDevice device)
Adds a new GPSDevice to the list of available devices.
|
void |
addGPSListener(GPSListener listener) |
GPSDevice |
getGpsDevice()
This can return null.
|
java.util.HashMap<java.lang.String,GPSDevice> |
getGpsDevices() |
java.lang.String |
getGpsType() |
boolean |
isGpsEnabled() |
boolean |
isGpsOnStartupEnabled() |
boolean |
isRotatingWithGps() |
CorrectedJob |
loadCorrectedJob(java.lang.String jobFilename)
Loads a CorrectedJob for a given job name.
|
void |
removeAllListeners()
Removes all listeners from the manager and all devices.
|
void |
removeDevice(java.lang.String name) |
void |
removeGPSListener(GPSListener listener) |
void |
setGpsConnOnStartup(boolean newval)
Sets the boolean if gps will connect on startup
|
void |
setGpsEnabled(boolean newval)
Also opens or closes the GPS based on the new state.
|
void |
setGpsType(java.lang.String gpsType)
This function clears the gpsenabled flag and does not connect the current
GPS.
|
void |
setRotatingWithGps(boolean tizit) |
static GPSManager |
singleton() |
void |
startPostprocessingJob(java.lang.String jobName) |
void |
stopPostprocessingJob() |
protected transient EventMulticaster caster
public static GPSManager singleton()
public void addGpsDevice(GPSDevice device)
device - public void removeDevice(java.lang.String name)
public GPSDevice getGpsDevice()
public java.util.HashMap<java.lang.String,GPSDevice> getGpsDevices()
public java.lang.String getGpsType()
public void setGpsType(java.lang.String gpsType)
gpsType - public boolean isGpsEnabled()
public boolean isGpsOnStartupEnabled()
public boolean isRotatingWithGps()
public void setRotatingWithGps(boolean tizit)
public void setGpsEnabled(boolean newval)
throws java.io.IOException
Also opens or closes the GPS based on the new state.
newval - java.io.IOExceptionpublic void setGpsConnOnStartup(boolean newval)
throws java.io.IOException
Sets the boolean if gps will connect on startup
newval - java.io.IOExceptionpublic void addGPSListener(GPSListener listener)
public void removeGPSListener(GPSListener listener)
public void startPostprocessingJob(java.lang.String jobName)
public void stopPostprocessingJob()
public CorrectedJob loadCorrectedJob(java.lang.String jobFilename) throws java.io.IOException
Loads a CorrectedJob for a given job name. This checks all GPSDevices for their postprocessing support, not just the currently selected device, because although GPSDevice was the logic place to put the abstracted postprocessing interface, it is not necessary to make the user select a specific GPS device in order to use postprocessing. Selecting a GPS device only selects what device the computer is hooked up to, not what kind of postprocessing to do.
If no corrections are available, this returns an empty CorrectedJob object, not null.
jobFilename - the unique filename of the job, minus the extension.java.io.IOExceptionpublic void removeAllListeners()