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
7470eda8
Commit
7470eda8
authored
Dec 09, 2015
by
Björn Richerzhagen
Browse files
The 5G-view now correctly sets the AP-state without movement
parent
72ba3b6f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/views/FiveGTopologyView.java
View file @
7470eda8
...
...
@@ -35,6 +35,8 @@ import de.tud.kom.p2psim.api.topology.waypoints.WaypointModel;
import
de.tud.kom.p2psim.impl.topology.PositionVector
;
import
de.tud.kom.p2psim.impl.topology.views.FiveGTopologyView.CellLink
;
import
de.tud.kom.p2psim.impl.topology.views.fiveg.FiveGTopologyDatabase
;
import
de.tudarmstadt.maki.simonstrator.api.Event
;
import
de.tudarmstadt.maki.simonstrator.api.EventHandler
;
import
de.tudarmstadt.maki.simonstrator.api.Host
;
import
de.tudarmstadt.maki.simonstrator.api.component.sensor.handover.HandoverSensor
;
import
de.tudarmstadt.maki.simonstrator.api.util.XMLConfigurableConstructor
;
...
...
@@ -120,6 +122,17 @@ public class FiveGTopologyView extends AbstractTopologyView<CellLink> {
public
FiveGTopologyView
(
PhyType
phy
)
{
super
(
phy
,
true
);
setHasRealLinkLayer
(
false
);
/*
* AP state is only set, after components moved. In scenarios without
* active movement, this will never happen. Therefore, we trigger the
* respective event ONCE at the start of the simulation
*/
Event
.
scheduleImmediately
(
new
EventHandler
()
{
@Override
public
void
eventOccurred
(
Object
content
,
int
type
)
{
afterComponentsMoved
();
}
},
null
,
0
);
}
@XMLConfigurableConstructor
({
"phy"
})
...
...
@@ -220,8 +233,7 @@ public class FiveGTopologyView extends AbstractTopologyView<CellLink> {
}
@Override
protected
CellLink
createLink
(
MacAddress
source
,
MacAddress
destination
)
{
protected
CellLink
createLink
(
MacAddress
source
,
MacAddress
destination
)
{
boolean
sourceIsClient
=
mobileClients
.
contains
(
source
);
boolean
destinationIsClient
=
mobileClients
.
contains
(
destination
);
if
(
sourceIsClient
==
destinationIsClient
)
{
...
...
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