Working scripts and plots for 4 devices (smart plugs)
[pingpong.git] / main_flow.sh
index 499845b95f4db51ed0cf478ab041e4a6feb94d34..cbc97fb335159affbce5194d369f382d3059adb3 100755 (executable)
@@ -1,11 +1,10 @@
 #!/bin/sh
 
 # This is the main script that calls every other script that is needed for the main flow
-if [ $# -ne 5 ]
+if [ $# -ne 4 ]
     then
-        echo "Usage: main_flow.sh <json-file-local> <json-file-internet> <output-file-name>"
-        echo "       <json-file-local>    = JSON file of local traffic captured on WLAN interfaces"
-        echo "       <json-file-internet> = JSON file of internet traffic captured on ETH interfaces"
+        echo "Usage: main_flow.sh <json-file> <output-file-name> <device-name> <device-mac-address>"
+        echo "       <json-file>    = JSON file of local/traffic captured on WLAN interfaces"
         echo "       <output-file-name>   = base name for the output files"
         echo "       <device-name>        = device name"
         echo "       <device-mac-address> = device MAC address"
@@ -13,12 +12,9 @@ if [ $# -ne 5 ]
 fi
 
 # Check result folder and create one if it does not exist yet
-[ -d $5 ] || mkdir $5
+[ -d result ] || mkdir result
 
 # Run the analysis
-python ./base_gexf_generator.py $1 $3_local.gexf
-python ./base_gexf_generator.py $2 $3_internet.gexf
-python ./parser/parse_packet_frequency.py $1 $3_local $4 $5
-python ./parser/parse_packet_frequency.py $2 $3_internet $4 $5
-gnuplot ./plot_scripts/plot_ts_graph_wemo
+python ./base_gexf_generator.py $1 $2.gexf
+python ./parser/parse_packet_frequency.py $1 $2 $3 $4