Browse Source

Minor improvements to Paper example

Andreas T. Meyer-Berg 4 years ago
parent
commit
0eea59f759

+ 0 - 1
examples/classifier/KMeansClustering.java

@@ -22,7 +22,6 @@ public class KMeansClustering extends BasicPacketClassifier {
 	 */
 	protected int NUMBER_OF_CLUSTERS = 16;
 	protected double[] stdv = new double[NUMBER_OF_CLUSTERS];
-	private boolean test = true;
 	/**
 	 * Initializes the k means clusterer
 	 */

+ 4 - 4
src/main/java/de/tu_darmstadt/tk/SmartHomeNetworkSim/control/ExampleAnomalyController.java

@@ -32,7 +32,7 @@ public class ExampleAnomalyController {
 	public ExampleAnomalyController(Controller controller) {
 		this.controller = controller;
 	}
-
+	
 	/**
 	 * Opens a DDosCreation Menu which targets the given Device
 	 * So far only a DDoS Attack is created
@@ -60,11 +60,11 @@ public class ExampleAnomalyController {
 		/**
 		 * Role of the target device
 		 */
-		int targetRole = 1;
+		int targetRole = 0;
 		if(example != null) {
 			targetRole = example.getConnection().getProtocol().getRoleOfDevice(example);
 			if(targetRole == -1)
-				targetRole = 1;
+				targetRole = 0;
 		}
 		/**
 		 * Attack Interval per device
@@ -80,7 +80,7 @@ public class ExampleAnomalyController {
 			/**
 			 * Frequency Less or equal
 			 */
-			attackInterval /= 4.0;
+			attackInterval /= 2.0;
 		}
 		
 		/**

+ 1 - 1
src/main/java/de/tu_darmstadt/tk/SmartHomeNetworkSim/view/menuBar/MenuBarNetworkExamples.java

@@ -689,7 +689,7 @@ public class MenuBarNetworkExamples extends JMenu{
 			/**
 			 * Insert anomaly & Simulate further packets
 			 */
-			Connection ddos = anomalyController.openDDosCreationMenu(zigBeeRouter, new LinkedList<SmartDevice>(zigbee.getDevices()));
+			Connection ddos = anomalyController.openDDosCreationMenu(broker, new LinkedList<SmartDevice>(zigbee.getDevices()));
 			Connection dos = anomalyController.runDosAttack(kitchenLight, kitchenFridge);
 			/**
 			 * Start Testing another 30000