]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - tests/rtt.sh
f0ce6673a2c28fb93a9cb28e41ce0ae1d2a1c08f
[can-benchmark.git] / tests / rtt.sh
1 #!/bin/bash
2
3 . _lib.sh
4
5 t() {
6     PID_S=`vca_canping -s 1 -b -R FF:$RTPRIO -d $CAN1`
7     vca_canping -m 1 -R FF:$RTPRIO -v -e $DRIVER-times -g $DRIVER -t 1 -d $CAN0 -w 0 -n 10 -c $COUNT
8     kill $PID_S
9 }
10
11
12
13 PLOT_CMD='
14 set title "Round-trip time"
15 set logscale y
16 set grid
17 set xlabel "Time [{/Symbol m}s]"
18 set ylabel "Latency profile [messages]"
19 plot [0:] "socketcan-1000.dat" with lp title "Socketcan",\
20               "lincan-1000.dat" with lp title "Lincan"
21 '
22
23 PLOT_CMD[1]='
24 set title "Round-trip time history"
25 set logscale y
26 set grid
27 set xlabel "Ping number"
28 set ylabel "Round-trip time [{/Symbol m}s]"
29 plot "socketcan-times-1000.dat" with lines, "lincan-times-1000.dat" with lines
30 '