Commit 444bb4e1 authored by Tobias Meuser's avatar Tobias Meuser
Browse files

Updated accuracy calculation

parent 7645c104
......@@ -9,6 +9,8 @@ public interface AccuracyCalculation extends Transmitable {
double calculateAccuracy(DataRepresentation pDataRepresentation, Location pDesiredLocation, long pDesiredTime);
int calculateExpectedIndex(DataRepresentation pDataRepresentation);
int calculateExpectedIndex(DataRepresentation pDataRepresentation, Location pDesiredLocation, long pDesiredTime);
......
......@@ -15,7 +15,9 @@ public class ServiceRequest implements Transmitable {
private Location _location = null;
private long _timestamp = -1;
private boolean _local = false;
private boolean _isLocal = false;
private boolean _noLocal = false;
public ServiceRequest(OverlayContact pRequestor, int pServiceID) {
_serviceID = pServiceID;
......@@ -42,7 +44,7 @@ public class ServiceRequest implements Transmitable {
public ServiceRequest(OverlayContact pRequestor, int pServiceID, Location pLocation, long pTimestamp,
AccuracyCalculation pAccuracy, double pRequiredAccuracy, boolean pLocal) {
this(pRequestor, pServiceID, pLocation, pTimestamp, pAccuracy, pRequiredAccuracy);
_local = pLocal;
_isLocal = pLocal;
}
public int getServiceID() {
......@@ -70,7 +72,7 @@ public class ServiceRequest implements Transmitable {
}
public boolean isLocal() {
return _local;
return _isLocal;
}
@Override
......@@ -91,8 +93,16 @@ public class ServiceRequest implements Transmitable {
return size;
}
public void setNoLocal(boolean pNoLocal) {
_noLocal = pNoLocal;
}
public boolean isNoLocal() {
return _noLocal;
}
public void setLocal(boolean pLocal) {
_local = pLocal;
_isLocal = pLocal;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment