-#!/bin/sh
+#!/bin/bash
. _lib.sh
t() {
PID_S=`vca_canping -s 1 -b -R FF:$RTPRIO -d $CAN0`
- vca_canping -m 1 -R FF:$RTPRIO -v -g $DRIVER -t 1 -d $CAN0 -w 1 -c 10000
+ vca_canping -m 1 -R FF:$RTPRIO -v -g $DRIVER -t 1 -d $CAN0 -w 0 -c $COUNT
+# vca_canping -m 1 -R FF:$RTPRIO -v -g $DRIVER-1 -t 1 -d $CAN0 -w 1 -c $COUNT
+# vca_canping -m 1 -R FF:$RTPRIO -v -g $DRIVER-2 -t 1 -d $CAN0 -w 2 -c $COUNT
kill $PID_S
}
-TESTS="lincan_virtual socketcan_virtual"
+TESTS=${TESTS:-lincan_virtual socketcan_virtual}
-PLOT_CMD='
-set title "Round-trip time - virtual CAN (`uname -r`)"
+p() { cat <<EOF
+set title "Round-trip time - virtual CAN"
set logscale y
set grid
-set xlabel "Time [{/Symbol m}s]"
+set xlabel "Time [ms]"
set ylabel "Latency profile [messages]"
-plot [0:] "socketcan-virtual-1000.dat" with lp title "Socketcan",\
- "lincan-virtual-1000.dat" with lp title "Lincan"
-'
-
+plot [0:] "socketcan-virtual-1000.dat" with lp title "Socketcan - 0 ms delay",\
+ "lincan-virtual-1000.dat" with lp title "Lincan - 0 ms delay"
+EOF
+}