wlan-nav
来自「柯老师网站上找到的」· 代码 · 共 32 行
TXT
32 行
#!/bin/tcsh## Channel utilization:# works on a trace file produced by ns# outputs idle time and the collision time on the channel between# the first and the (possibly unfinished) last transmission# for now: assumes that all MACs are on a single channelif ( $#argv != 1 ) then echo usage: echo " " $0 \<scenario\> exit 1endifset scenario = $1set tracefile = $scenario.trset outfile = $scenario.navrm -f $outfileegrep "\-Nl MAC " $tracefile | gawk -v outfile=$outfile '{ \ if (($1 == "x") && ($29 == "BEACON")) { \ print $3, 0.0 >> outfile; \ print $3, 1.0 >> outfile; \ nav = 1; \ } \ if ((nav == 1) && ($1 == "s")) { \ print $3, 1.0 >> outfile; \ print $3, 0.0 >> outfile; \ nav = 0; \ } \}'
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?