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
b8135828
Commit
b8135828
authored
Jul 02, 2018
by
Tobias Meuser
Browse files
Final fixed for vehits and machine learning
parent
5b735208
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/de/tudarmstadt/maki/simonstrator/api/component/vehicular/information/DefaultVehicularPointInformation.java
View file @
b8135828
...
...
@@ -25,6 +25,7 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
import
de.tudarmstadt.maki.simonstrator.api.Time
;
import
de.tudarmstadt.maki.simonstrator.api.component.sensor.location.Location
;
import
de.tudarmstadt.maki.simonstrator.api.component.vehicular.roadnetwork.RoadNetworkEdge
;
...
...
@@ -90,4 +91,9 @@ public class DefaultVehicularPointInformation<S extends Object> implements Vehic
return
_attributes
.
containsKey
(
pKey
);
}
@Override
public
boolean
isValid
()
{
return
getDetectionDate
()
+
(
long
)
getAttribute
(
AvailableInformationAttributes
.
TTL
)
>
Time
.
getCurrentTime
();
}
}
src/de/tudarmstadt/maki/simonstrator/api/component/vehicular/information/EnvironmentInformation.java
View file @
b8135828
...
...
@@ -39,7 +39,8 @@ import de.tudarmstadt.maki.simonstrator.api.component.vehicular.roadnetwork.Road
* @version 1.0 at 05.03.2018
*
*/
public
class
EnvironmentInformation
<
T
extends
LocationBasedEnvironmentProperty
>
implements
PointInformation
<
T
>
{
public
abstract
class
EnvironmentInformation
<
T
extends
LocationBasedEnvironmentProperty
>
implements
PointInformation
<
T
>
{
private
T
_environment
;
...
...
src/de/tudarmstadt/maki/simonstrator/api/component/vehicular/information/JamInformation.java
View file @
b8135828
package
de.tudarmstadt.maki.simonstrator.api.component.vehicular.information
;
import
de.tudarmstadt.maki.simonstrator.api.Time
;
import
de.tudarmstadt.maki.simonstrator.api.component.sensor.location.Location
;
import
de.tudarmstadt.maki.simonstrator.api.component.vehicular.information.DefaultVehicularPointInformation
;
import
de.tudarmstadt.maki.simonstrator.api.component.vehicular.roadnetwork.RoadNetworkEdge
;
public
class
JamInformation
extends
DefaultVehicularPointInformation
<
Boolean
>
{
...
...
@@ -23,4 +23,9 @@ public class JamInformation extends DefaultVehicularPointInformation<Boolean> {
public
String
toString
()
{
return
"Jam at "
+
getEdge
()
+
": "
+
getValue
();
}
@Override
public
boolean
isValid
()
{
return
getDetectionDate
()
+
(
long
)
getAttribute
(
AvailableInformationAttributes
.
TTL
)
>
Time
.
getCurrentTime
();
}
}
src/de/tudarmstadt/maki/simonstrator/api/component/vehicular/information/NotificationBasedVehicularPointInformation.java
View file @
b8135828
...
...
@@ -24,6 +24,7 @@ package de.tudarmstadt.maki.simonstrator.api.component.vehicular.information;
import
java.util.ArrayList
;
import
java.util.List
;
import
de.tudarmstadt.maki.simonstrator.api.Time
;
import
de.tudarmstadt.maki.simonstrator.api.component.pubsub.Notification
;
import
de.tudarmstadt.maki.simonstrator.api.component.pubsub.attribute.Attribute
;
import
de.tudarmstadt.maki.simonstrator.api.component.sensor.location.Location
;
...
...
@@ -121,4 +122,9 @@ public class NotificationBasedVehicularPointInformation implements VehicularPoin
return
null
;
}
@Override
public
boolean
isValid
()
{
return
getDetectionDate
()
+
(
long
)
getAttribute
(
AvailableInformationAttributes
.
TTL
)
>
Time
.
getCurrentTime
();
}
}
src/de/tudarmstadt/maki/simonstrator/api/component/vehicular/information/PointInformation.java
View file @
b8135828
...
...
@@ -59,4 +59,6 @@ public interface PointInformation<S extends Object> {
<
T
extends
Object
>
boolean
hasAttribute
(
AvailableInformationAttributes
pKey
);
S
getValue
();
boolean
isValid
();
}
src/de/tudarmstadt/maki/simonstrator/api/component/vehicular/information/RoadInformation.java
View file @
b8135828
...
...
@@ -23,6 +23,7 @@ package de.tudarmstadt.maki.simonstrator.api.component.vehicular.information;
import
java.util.List
;
import
de.tudarmstadt.maki.simonstrator.api.Time
;
import
de.tudarmstadt.maki.simonstrator.api.component.sensor.environment.data.AggregatedProperty
;
import
de.tudarmstadt.maki.simonstrator.api.component.sensor.environment.data.RoadProperty
;
import
de.tudarmstadt.maki.simonstrator.api.component.sensor.environment.data.aggregation.AggregationInformation
;
...
...
@@ -97,4 +98,9 @@ public class RoadInformation extends EnvironmentInformation<RoadProperty>
}
return
false
;
}
@Override
public
boolean
isValid
()
{
return
getDetectionDate
()
+
(
long
)
getAttribute
(
AvailableInformationAttributes
.
TTL
)
>
Time
.
getCurrentTime
();
}
}
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