⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makehcplot

📁 大名鼎鼎的传感器网络仿真实验室平台SENSE
💻
字号:
#! /bin/bash# Make a graph showing packet hop count vs delivery time# The x axis is the time of delivery# The y axis is the hop count for the packet delivered at the simulation time#   The input file doesn't contain information about failed packets.## The input file is the output from the run with VISUAL_ROUTE enabled.if [ $# -ne 1 ]; then    echo "usage: $0 <fileName>"    exit 1;fi# extract source nodes from output fileVRfile=$1.VRif [ ! -e $VRfile ]; then    grep VR $1 > $VRfilefiawk -F\; '{ printf( "%s %s\n", $1, $6)}' $VRfile > tempawk '{ gsub("{", " ", $0); gsub("}", " ", $0); printf( "%f %s\n", $2, $3)}' temp > hopCount.datrm temp# create the gnuplot command filecat > hopCount.dem <<EOFset term jpeg medium size 1280, 960set output "${1}-HC.jpg"set key offset xlabel "Delivery time (sec)"set ylabel "Hop Count"#set label "xxx" at 250, 24 centerplot "hopCount.dat" using 1:2 with impulsesEOF# create the plotgnuplot hopCount.demrm hopCount.dat hopCount.dem

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -