org.placelab.spotter
Class FakeNMEAGPSSpotter

java.lang.Object
  extended byorg.placelab.spotter.AbstractSpotter
      extended byorg.placelab.spotter.NMEAGPSSpotter
          extended byorg.placelab.spotter.FakeNMEAGPSSpotter
All Implemented Interfaces:
Spotter

public class FakeNMEAGPSSpotter
extends NMEAGPSSpotter

For testing purposes.


Constructor Summary
FakeNMEAGPSSpotter(java.lang.String name)
           
 
Method Summary
 void close()
          Unloads resources used by the spotter.
 void open()
          Load resources used by the spotter.
 void sendASentence(java.lang.String sentence)
          Send a sentence, complete with checksum, to the gps device.
protected  void startScanningImpl()
          Begin collecting and processing sentences from the gps device, handing them off to the NMEAGPSSpotter.lineAvailable(String) method as they are read in.
protected  void stopScanningImpl()
          Stop collecting sentences from the gps device
 
Methods inherited from class org.placelab.spotter.NMEAGPSSpotter
getMeasurement, lineAvailable, measurementAvailable, 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
 

Constructor Detail

FakeNMEAGPSSpotter

public FakeNMEAGPSSpotter(java.lang.String name)
Method Detail

open

public void open()
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.


close

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


sendASentence

public void sendASentence(java.lang.String sentence)
Description copied from class: NMEAGPSSpotter
Send a sentence, complete with checksum, to the gps device. Neither newline nor carraige return should be included.

Specified by:
sendASentence in class NMEAGPSSpotter

startScanningImpl

protected void startScanningImpl()
Description copied from class: NMEAGPSSpotter
Begin collecting and processing sentences from the gps device, handing them off to the NMEAGPSSpotter.lineAvailable(String) method as they are read in.

Specified by:
startScanningImpl in class NMEAGPSSpotter

stopScanningImpl

protected void stopScanningImpl()
Description copied from class: NMEAGPSSpotter
Stop collecting sentences from the gps device

Specified by:
stopScanningImpl in class NMEAGPSSpotter