org.placelab.spotter
Class PlacelabStumblerLogSpotter

java.lang.Object
  extended byorg.placelab.spotter.AbstractSpotter
      extended byorg.placelab.spotter.SyncSpotter
          extended byorg.placelab.spotter.LogSpotter
              extended byorg.placelab.spotter.PlacelabStumblerLogSpotter
All Implemented Interfaces:
Spotter

public class PlacelabStumblerLogSpotter
extends LogSpotter


Field Summary
static int GPS_DEFAULT_THRESHOLD
           
static int GPS_INTERPOLATE
           
static int GPS_NONE
           
static int GPS_THRESHOLD
           
 
Fields inherited from class org.placelab.spotter.LogSpotter
NO_DELAY
 
Constructor Summary
PlacelabStumblerLogSpotter(java.io.InputStream in)
           
PlacelabStumblerLogSpotter(java.lang.String file)
           
 
Method Summary
static java.lang.String blah(int i)
           
 void close()
          Unloads resources used by the spotter.
 int getCurrentLineNumber()
           
 int getGPSMethod()
           
 int getGPSThreshold()
           
 Measurement getMeasurementFromLog()
          Returns a single Measurement from the log, or null if there are no Measurements remaining.
protected  Measurement getOtherMeasurementType(long time, java.lang.String type, java.util.Hashtable allFields)
           
 boolean isOutputStumblerMeasurements()
           
static boolean isValidFile(java.lang.String file)
           
static java.lang.String jingoLat(double d)
           
static java.lang.String jingoLon(double d)
           
static void main(java.lang.String[] args)
           
 void open()
          Load resources used by the spotter.
 void setGPSMethod(int method, int thresholdMillis)
           
 void setOutputStumblerMeasurements(boolean outputStumblerMeasurements)
           
static void testmain(java.lang.String[] args)
           
 
Methods inherited from class org.placelab.spotter.LogSpotter
getMeasurementImpl, getRate, logIsFinished, newSpotter, nextScanInterval, setRate
 
Methods inherited from class org.placelab.spotter.SyncSpotter
errorInBackgroundThreadAndThreadDeath, getMeasurement, scanUsingBackgroundThread, scanUsingEventSystem, startScanning, startScanning, stopScanning
 
Methods inherited from class org.placelab.spotter.AbstractSpotter
addListener, notifyEndOfScan, notifyEndOfScan, notifyGotException, notifyGotException, notifyGotMeasurement, notifyGotMeasurement, removeListener, scanOnce, scanOnce, waitForThread
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GPS_INTERPOLATE

public static int GPS_INTERPOLATE

GPS_THRESHOLD

public static int GPS_THRESHOLD

GPS_NONE

public static int GPS_NONE

GPS_DEFAULT_THRESHOLD

public static int GPS_DEFAULT_THRESHOLD
Constructor Detail

PlacelabStumblerLogSpotter

public PlacelabStumblerLogSpotter(java.lang.String file)

PlacelabStumblerLogSpotter

public PlacelabStumblerLogSpotter(java.io.InputStream in)
Method Detail

getCurrentLineNumber

public int getCurrentLineNumber()

open

public void open()
          throws SpotterException
Description copied from interface: Spotter
Load resources used by the spotter. Applications should be able to invoke this methods multiple times in sequence and have the "right" things happen. All Spotters should be opened before being used.

Throws:
SpotterException - if the necessary hardware or software for this spotter is not present

close

public void close()
           throws SpotterException
Description copied from interface: Spotter
Unloads resources used by the spotter. Multiple calls to close are ok.

Throws:
SpotterException

setGPSMethod

public void setGPSMethod(int method,
                         int thresholdMillis)

getGPSMethod

public int getGPSMethod()

getGPSThreshold

public int getGPSThreshold()

isOutputStumblerMeasurements

public boolean isOutputStumblerMeasurements()
Returns:
Returns true if we are outputting StumblerMeasurements instead of raw GPS and Beacon Measurements.

setOutputStumblerMeasurements

public void setOutputStumblerMeasurements(boolean outputStumblerMeasurements)
Parameters:
outputStumblerMeasurements - Set whether to output StumblerMeasurements instead of raw GPS and Beacon Measurements.

getMeasurementFromLog

public Measurement getMeasurementFromLog()
                                  throws SpotterException
Description copied from class: LogSpotter
Returns a single Measurement from the log, or null if there are no Measurements remaining. This method is only of interest to implementers of LogSpotters, users should instead call Spotter.getMeasurement()

Specified by:
getMeasurementFromLog in class LogSpotter
Throws:
SpotterException - if an error is encountered in the log

getOtherMeasurementType

protected Measurement getOtherMeasurementType(long time,
                                              java.lang.String type,
                                              java.util.Hashtable allFields)

isValidFile

public static boolean isValidFile(java.lang.String file)

main

public static void main(java.lang.String[] args)

jingoLat

public static java.lang.String jingoLat(double d)

jingoLon

public static java.lang.String jingoLon(double d)

blah

public static java.lang.String blah(int i)

testmain

public static void testmain(java.lang.String[] args)
                     throws SpotterException
Throws:
SpotterException