Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
API
Commits
444bb4e1
Commit
444bb4e1
authored
May 22, 2017
by
Tobias Meuser
Browse files
Updated accuracy calculation
parent
7645c104
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/de/tudarmstadt/maki/simonstrator/api/component/service/in_network_processing/AccuracyCalculation.java
View file @
444bb4e1
...
...
@@ -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
);
...
...
src/de/tudarmstadt/maki/simonstrator/api/component/service/in_network_processing/ServiceRequest.java
View file @
444bb4e1
...
...
@@ -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
);
_l
ocal
=
pLocal
;
_isL
ocal
=
pLocal
;
}
public
int
getServiceID
()
{
...
...
@@ -70,7 +72,7 @@ public class ServiceRequest implements Transmitable {
}
public
boolean
isLocal
()
{
return
_
l
ocal
;
return
_
isL
ocal
;
}
@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
)
{
_l
ocal
=
pLocal
;
_isL
ocal
=
pLocal
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment