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
PeerfactSim.KOM
Commits
f9365d17
Commit
f9365d17
authored
Jun 20, 2019
by
Tobias Meuser
Browse files
First version for privacy-aware offloading
parent
00aaa34e
Changes
3
Show whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/scenario/DefaultConfigurator.java
View file @
f9365d17
...
...
@@ -783,7 +783,7 @@ public class DefaultConfigurator implements Configurator {
break
;
}
consArgs
[
i
]
=
configureComponent
(
elem
);
if
(
consArgs
[
i
].
getClass
()
if
(
!
consArgs
[
i
].
getClass
()
.
isAssignableFrom
(
types
[
i
]))
throw
new
ConfigurationException
(
"The type of the component configured for the parameter '"
...
...
src/de/tud/kom/p2psim/impl/topology/movement/vehicular/sumo/simulation/controller/traci/TraciSimulationController.java
View file @
f9365d17
...
...
@@ -60,7 +60,7 @@ import it.polito.appeal.traci.SumoTraciConnection;
public
class
TraciSimulationController
implements
VehicleController
,
SimulationSetupExtractor
,
EdgeController
,
SimulatorObserver
{
private
static
final
File
TEMP_FILE
=
new
File
(
new
File
(
System
.
getProperty
(
"user.home"
)
+
"/.simonstrator"
),
"road_network.tmp"
);
private
static
final
boolean
TRAIN_PATH_PROBABILITIES
=
fals
e
;
private
static
final
boolean
TRAIN_PATH_PROBABILITIES
=
tru
e
;
private
Random
_random
=
Randoms
.
getRandom
(
getClass
());
...
...
src/de/tud/kom/p2psim/impl/vehicular/DefaultVehicleInformationComponent.java
View file @
f9365d17
...
...
@@ -27,6 +27,8 @@ import de.tudarmstadt.maki.simonstrator.api.Host;
import
de.tudarmstadt.maki.simonstrator.api.Time
;
import
de.tudarmstadt.maki.simonstrator.api.common.graph.INodeID
;
import
de.tudarmstadt.maki.simonstrator.api.component.ComponentNotAvailableException
;
import
de.tudarmstadt.maki.simonstrator.api.component.privacy.PrivacyComponent
;
import
de.tudarmstadt.maki.simonstrator.api.component.privacy.PrivacyLevel
;
import
de.tudarmstadt.maki.simonstrator.api.component.sensor.environment.data.properties.VehicleProperty
;
import
de.tudarmstadt.maki.simonstrator.api.component.sensor.location.AttractionPoint
;
import
de.tudarmstadt.maki.simonstrator.api.component.sensor.location.Location
;
...
...
@@ -42,6 +44,7 @@ import de.tudarmstadt.maki.simonstrator.api.component.sis.type.SiSTypes;
import
de.tudarmstadt.maki.simonstrator.api.component.vehicular.VehicleInformationComponent
;
import
de.tudarmstadt.maki.simonstrator.api.component.vehicular.api.SimulationSetupExtractor
;
import
de.tudarmstadt.maki.simonstrator.api.component.vehicular.api.VehicleController
;
import
de.tudarmstadt.maki.simonstrator.api.component.vehicular.hybrid.VehicularReceiver
;
import
de.tudarmstadt.maki.simonstrator.api.component.vehicular.roadnetwork.RoadNetworkEdge
;
import
de.tudarmstadt.maki.simonstrator.api.component.vehicular.roadnetwork.RoadNetworkRoute
;
import
de.tudarmstadt.maki.simonstrator.api.component.vehicular.roadnetwork.exception.NoAdditionalRouteAvailableException
;
...
...
@@ -181,8 +184,16 @@ public class DefaultVehicleInformationComponent implements VehicleInformationCom
@Override
public
VehicleProperty
getVehicleProperty
()
{
PrivacyLevel
privacyLevel
=
PrivacyLevel
.
NO_PRIVACY
;
try
{
PrivacyComponent
privacyComponent
=
getHost
().
getComponent
(
PrivacyComponent
.
class
);
privacyLevel
=
privacyComponent
.
getPrivacyLevel
();
}
catch
(
ComponentNotAvailableException
e
)
{
// Nothing to be done
}
return
new
VehicleProperty
(
host
.
getId
().
value
(),
getLastLocation
(),
getCurrentRoute
().
getStart
(),
getCurrentSpeed
(),
getLength
());
getCurrentRoute
().
getStart
(),
getCurrentSpeed
(),
getLength
()
,
privacyLevel
);
}
@Override
...
...
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