Update simulator

This commit is contained in:
Loic Guegan 2019-05-26 15:52:46 +02:00
parent 5e3c82d06e
commit abe8eae55c
5 changed files with 6 additions and 14 deletions

View file

@ -12,7 +12,6 @@ logsFinalDst=~/logs/
[ "$1" == "subscribe" ] && subscribe=1 ||subscribe=0
[ "$1" == "deploy" ] && deploy=1 || deploy=0
[ "$1" == "-p" ] && progress=1 || progress=0
[ "$1" == "scan" ] && scan=1 || scan=0
handleSim () {
[ -z "${argId}" ] && argId=1 || argId=$(( argId + 1 ))
@ -66,7 +65,7 @@ then
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${NS3_PATH}/build/lib
# Default Parameters
sensorsSendInterval=1 # DON'T GO BELOW 1 SECONDS !!!!!!! Simulator will stay stuck
sensorsSendInterval=10 # DON'T GO BELOW 1 SECONDS !!!!!!! Simulator will stay stuck
sensorsPktSize=192 # 1 byte temperature (-128 à +128 °C) and 4Byte sensorsId
sensorsNumber=5
nbHop=10 # Cf paper AC/Yunbo
@ -120,7 +119,7 @@ then
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${NS3_PATH}/build/lib
# Default Parameters
sensorsSendInterval=1 # DON'T GO BELOW 1 SECONDS !!!!!!! Simulator will stay stuck
sensorsSendInterval=10 # DON'T GO BELOW 1 SECONDS !!!!!!! Simulator will stay stuck
sensorsPktSize=192 # 1 byte temperature (-128 à +128 °C) and 4Byte sensorsId
sensorsNumber=5
nbHop=10 # Cf paper AC/Yunbo
@ -177,7 +176,7 @@ then
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${NS3_PATH}/build/lib
# Default Parameters
sensorsSendInterval=1 # DON'T GO BELOW 1 SECONDS !!!!!!! Simulator will stay stuck
sensorsSendInterval=10 # DON'T GO BELOW 1 SECONDS !!!!!!! Simulator will stay stuck
sensorsPktSize=192 # 1 byte temperature (-128 à +128 °C) and 4Byte sensorsId
sensorsNumber=5
nbHop=10 # Cf paper AC/Yunbo
@ -254,13 +253,6 @@ then
alreadyFinished=$(cat $finishedFile| tail -n +2| wc -l)
percent=$(echo $alreadyFinished $nHost| awk '{print $1/$2*100}')
echo "Progression: " $alreadyFinished/$nHost "(${percent}%)"
elif [ $scan -eq 1 ]
then
for host in $(cat $OAR_NODE_FILE|uniq)
do
proc=$(oarsh $host "ps -e|grep -i simulator")
[ ! -z "$proc" ] && { echo "- Processes for node $host:"; echo "$proc"; }
done
else
echo "Invalid arguments, make sure you know what you are doing !"
exit 1

View file

@ -21,7 +21,7 @@ do
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${NS3_PATH}/build/lib
# Default Parameters
sensorsSendInterval=1 # DON'T GO BELOW 1 SECONDS !!!!!!! Simulator will stay stuck
sensorsSendInterval=10 # DON'T GO BELOW 1 SECONDS !!!!!!! Simulator will stay stuck
sensorsPktSize=192 # 1 byte temperature (-128 à +128 °C) and 4Byte sensorsId
sensorsNumber=5
nbHop=10 # Cf paper AC/Yunbo

View file

@ -11,7 +11,7 @@ NS_LOG_COMPONENT_DEFINE ("WIFISensorsSimulator");
*/
int main(int argc, char* argv[]){
uint32_t sensorsFrequency=1; // One pkt every second
uint32_t sensorsFrequency=10; // 1 pkt every 10 seconds
uint32_t sensorsPktSize=192; // 128 bits for sensors id and 32 bit for the temperature (an arbitrary Integer) and a timestamp (32bits)
uint32_t sensorsNumber=5;
uint32_t nbHop=10;

View file

@ -115,7 +115,7 @@
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${NS3_PATH}/build/lib
# Default Parameters
sensorsSendInterval=1 # DON'T GO BELOW 1 SECONDS !!!!!!! Simulator will stay stuck
sensorsSendInterval=10 # DON'T GO BELOW 1 SECONDS !!!!!!! Simulator will stay stuck
sensorsPktSize=192 # 1 byte temperature (-128 à +128 °C) and 4Byte sensorsId
sensorsNumber=5
nbHop=10 # Cf paper AC/Yunbo

Binary file not shown.