|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.placelab.client.tracker.Tracker
A Tracker takes Measurement objects and then uses
them to produce an Estimate. A Measurement is the
result of the sensory operation, and the Tracker is the brain
that turns the sensation into a location estimate.
| Constructor Summary | |
Tracker()
|
|
| Method Summary | |
abstract boolean |
acceptableMeasurement(Measurement m)
Returns true if the tracker can make use of this reading to meaningfully update the estimate. |
void |
addEstimateListener(EstimateListener listener)
Register an EstimateListener to be notified when this tracker is updated. |
protected void |
fireEstimateUpdate(Measurement m)
When subclasses have a new estimate they can use this to notify their EstimateListener objects. |
abstract Estimate |
getEstimate()
|
long |
getLastUpdatedTime()
|
void |
gotMeasurement(Spotter sender,
Measurement m)
|
int |
numberOfMeasurements()
|
void |
removeEstimateListener(EstimateListener listener)
|
void |
reset()
This method resets the tracker to its initial state. |
protected abstract void |
resetImpl()
Subclasses should implement this to reset themselves to their initial state. |
void |
spotterExceptionThrown(Spotter s,
SpotterException ex)
|
void |
updateEstimate(Measurement m)
Called to give the tracker a new measurement. |
protected abstract void |
updateEstimateImpl(Measurement m)
Subclasses should implement this to do the actual work of updating their Estimate with the given Measurement. |
abstract void |
updateWithoutMeasurement(long timeSinceMeasurementMillis)
This method notifies a tracker that time has elapsed without a new mesurement. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Tracker()
| Method Detail |
protected abstract void updateEstimateImpl(Measurement m)
Estimate with the given Measurement.
m - use this to update your Estimatepublic abstract Estimate getEstimate()
public abstract boolean acceptableMeasurement(Measurement m)
public abstract void updateWithoutMeasurement(long timeSinceMeasurementMillis)
protected abstract void resetImpl()
public void reset()
public long getLastUpdatedTime()
Measurementpublic void addEstimateListener(EstimateListener listener)
Estimate.
listener - an object to be notified when the Tracker has a new Estimatepublic void removeEstimateListener(EstimateListener listener)
public void updateEstimate(Measurement m)
m - A measurement from a Spotter.acceptableMeasurement(Measurement)protected void fireEstimateUpdate(Measurement m)
EstimateListener objects.
m - the most recent Measurement influencing the update or
null if updateWithoutMeasurement was calledupdateWithoutMeasurement(long)public int numberOfMeasurements()
Measurement objects passed to
updateEstimate since the creation, or reset, of the Tracker.updateEstimate(Measurement),
reset()
public void gotMeasurement(Spotter sender,
Measurement m)
gotMeasurement in interface SpotterListener
public void spotterExceptionThrown(Spotter s,
SpotterException ex)
spotterExceptionThrown in interface SpotterListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||