Making sure that merging would fail if there is a situation where two sequences are...
[pingpong.git] / Code / Projects / SmartPlugDetector / src / main / java / edu / uci / iotproject / Main.java
index e878339c42508001c3ebc96ed4f049f5078ca0e0..4d0ead286701c9ac70b2bd7202789361dc9534fd 100644 (file)
@@ -83,6 +83,11 @@ public class Main {
 //        final String outputPcapFile = path + "/2018-07/stplug/stplug-processed.pcap";
 //        final String triggerTimesFile = path + "/2018-07/stplug/smartthings-july-25-2018.timestamps";
 //        final String deviceIp = "192.168.1.246"; // .246 == phone; .142 == SmartThings Hub (note: use eth0 capture for this!)
+        // October 18
+        final String inputPcapFile = path + "/2018-10/st-plug/st-plug.wlan1.local.pcap";
+        final String outputPcapFile = path + "/2018-10/st-plug/st-plug-processed.pcap";
+        final String triggerTimesFile = path + "/2018-10/st-plug/st-plug-oct-18-2018.timestamps";
+        final String deviceIp = "192.168.1.246"; // .246 == phone; .142 == SmartThings Hub (note: use eth0 capture for this!)
 
         // 4) Wemo July 30 experiment
 //        final String inputPcapFile = path + "/2018-07/wemo/wemo.wlan1.local.pcap";
@@ -122,6 +127,11 @@ public class Main {
 //        final String outputPcapFile = path + "/2018-08/hue-bulb/hue-bulb-processed.pcap";
 //        final String triggerTimesFile = path + "/2018-08/hue-bulb/hue-bulb-aug-7-2018.timestamps";
 //        final String deviceIp = "192.168.1.246";
+        // October 30 experiment
+//        final String inputPcapFile = path + "/2018-10/hue-bulb/hue-bulb.eth1.local.pcap";
+//        final String outputPcapFile = path + "/2018-10/hue-bulb/hue-bulb-processed.pcap";
+//        final String triggerTimesFile = path + "/2018-10/hue-bulb/hue-bulb-oct-30-2018.timestamps";
+//        final String deviceIp = "192.168.1.100"; // .246 == phone; .100 == Hue hub
 
         // 9) Lifx Bulb August 8 experiment
 //        final String inputPcapFile = path + "/2018-08/lifx-bulb/lifx-bulb.wlan1.local.pcap";
@@ -136,16 +146,16 @@ public class Main {
 //        final String deviceIp = "192.168.1.246"; // .246 == phone; .235 == camera
 
         // 11) Arlo Camera August 10 experiment
-        final String inputPcapFile = path + "/2018-08/arlo-camera/arlo-camera.wlan1.local.pcap";
-        final String outputPcapFile = path + "/2018-08/arlo-camera/arlo-camera-processed.pcap";
-        final String triggerTimesFile = path + "/2018-08/arlo-camera/arlo-camera-aug-10-2018.timestamps";
-        final String deviceIp = "192.168.1.246"; // .246 == phone; .140 == camera
+//        final String inputPcapFile = path + "/2018-08/arlo-camera/arlo-camera.wlan1.local.pcap";
+//        final String outputPcapFile = path + "/2018-08/arlo-camera/arlo-camera-processed.pcap";
+//        final String triggerTimesFile = path + "/2018-08/arlo-camera/arlo-camera-aug-10-2018.timestamps";
+//        final String deviceIp = "192.168.1.246"; // .246 == phone; .140 == camera
 
         // 12) Blossom sprinkler August 13 experiment
 //        final String inputPcapFile = path + "/2018-08/blossom/blossom.wlan1.local.pcap";
 //        final String outputPcapFile = path + "/2018-08/blossom/blossom-processed.pcap";
 //        final String triggerTimesFile = path + "/2018-08/blossom/blossom-aug-13-2018.timestamps";
-//        final String deviceIp = "192.168.1.246"; // .246 == phone; .229 == sprinkler
+//        final String deviceIp = "192.168.1.229"; // .246 == phone; .229 == sprinkler
 
 //        // 13) DLink siren August 14 experiment
 //        final String inputPcapFile = path + "/2018-08/dlink-siren/dlink-siren.wlan1.local.pcap";
@@ -320,8 +330,8 @@ public class Main {
             }
         }
         // TODO: Merging test
-        PcapPacketUtils.mergeSignatures(ppListOfListListOn, sortedAllConversation);
-        PcapPacketUtils.sortSignatures(ppListOfListListOn);
+        ppListOfListListOn = PcapPacketUtils.mergeSignatures(ppListOfListListOn, sortedAllConversation);
+        ppListOfListListOn = PcapPacketUtils.sortSignatures(ppListOfListListOn);
         PcapPacketUtils.printSignatures(ppListOfListListOn);
         //count = 0;
         /*for (List<List<PcapPacket>> ll : ppListOfListListOn) {
@@ -347,8 +357,8 @@ public class Main {
             }
         }
         // TODO: Merging test
-        PcapPacketUtils.mergeSignatures(ppListOfListListOff, sortedAllConversation);
-        PcapPacketUtils.sortSignatures(ppListOfListListOff);
+        ppListOfListListOff = PcapPacketUtils.mergeSignatures(ppListOfListListOff, sortedAllConversation);
+        ppListOfListListOff = PcapPacketUtils.sortSignatures(ppListOfListListOff);
         PcapPacketUtils.printSignatures(ppListOfListListOff);
         //count = 0;
         /*for (List<List<PcapPacket>> ll : ppListOfListListOff) {