Commit b59dc323 authored by Björn Richerzhagen's avatar Björn Richerzhagen
Browse files

Bughunting - 5G sends MAC offline, if gridCell is disconnected

parent 5edb49c2
......@@ -404,7 +404,11 @@ SchedulerComponent, TimeComponent {
currentTime = realEvent.getSimulationTime();
EventHandler handler = realEvent.handler;
handler.eventOccurred(realEvent.data, realEvent.type);
try {
handler.eventOccurred(realEvent.data, realEvent.type);
} catch (Throwable e) {
e.printStackTrace();
}
notifyListeners(realEvent, realEvent.handler);
if (realEvent.schedulerType == TYPE_END) {
......
......@@ -80,6 +80,8 @@ public class FiveGTopologyView extends AbstractTopologyView<CellLink> {
private Set<MacAddress> clouds = new LinkedHashSet<>();
private Set<MacAddress> mobileClients = new LinkedHashSet<>();
private Set<MacAddress> offlineDueToUMTSFailure = new LinkedHashSet<>();
/**
* A subset of mobileClients -> contains all clients that may use access
......@@ -279,8 +281,21 @@ public class FiveGTopologyView extends AbstractTopologyView<CellLink> {
Entry apEntry = databaseAccessPoints.getEntryFor(apSegId, false);
usedEntry = (apEntry != null ? apEntry : usedEntry);
}
mac.getMaxBandwidth().setUpBW(usedEntry.getBandwidth(true));
mac.getMaxBandwidth().setDownBW(usedEntry.getBandwidth(false));
//mac.getMaxBandwidth().setUpBW(usedEntry.getBandwidth(true));
//mac.getMaxBandwidth().setDownBW(usedEntry.getBandwidth(false));
if (!usedEntry.isAvailable()) {
assert mac.isOnline();
mac.goOffline();
offlineDueToUMTSFailure.add(macAddr);
} else {
if (!mac.isOnline() && offlineDueToUMTSFailure.contains(macAddr)) {
mac.goOnline();
offlineDueToUMTSFailure.remove(macAddr);
}
}
}
@Override
......
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