|
@@ -34,6 +34,10 @@ public class NetworkController {
|
|
|
* NetworkTreeSettings Controller
|
|
|
*/
|
|
|
private NetworkTreeSettingsController networkTreeSettings;
|
|
|
+ /**
|
|
|
+ * Packet Capture Controller
|
|
|
+ */
|
|
|
+ private PacketCaptureController captureController;
|
|
|
/**
|
|
|
* Creates a new NetworkController, which may manipulate the given model and use the controller
|
|
|
* @param model Model which can be manipulated
|
|
@@ -43,6 +47,7 @@ public class NetworkController {
|
|
|
this.model = model;
|
|
|
this.controller = controller;
|
|
|
networkTreeSettings = controller.getSettingsController().getNetworkTreeSettingsController();
|
|
|
+ captureController = controller.getSimulationController().getPacketCaptureController();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -538,6 +543,15 @@ public class NetworkController {
|
|
|
for(Link l: model.getConnectionNetworks())
|
|
|
deleteLink(l);
|
|
|
linksToDelete.clear();
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Delete Collectors
|
|
|
+ */
|
|
|
+ LinkedList<PacketCollector> collectors = new LinkedList<PacketCollector>(captureController.getPacketCollectors());
|
|
|
+ for(PacketCollector p:collectors){
|
|
|
+ captureController.removePacketCollector(p);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Update the GUI
|
|
|
*/
|