]> rtime.felk.cvut.cz Git - sojka/can-utils.git/commit
Minor fix and cosmetics in color handling in candump.c .
authorOliver Hartkopp <socketcan@hartkopp.net>
Sat, 6 Jan 2007 15:43:12 +0000 (15:43 +0000)
committerOliver Hartkopp <socketcan@hartkopp.net>
Sat, 6 Jan 2007 15:43:12 +0000 (15:43 +0000)
commit4d129ea348ef62f296f3882cb8e1272907fe7b6a
tree4b821317c9fde1b0121ef9567d977f4e70ce6105
parentf95fc47ec86c4cb061c9d3636b28ac62135b6f16
Minor fix and cosmetics in color handling in candump.c .

Added new tool 'canplayer' to replay logfiles generated by candump -l .

Features of canplayer:

- Input from stdin or file.
- throttling of the replay to get nearly original timestamps / message gaps
- mapping and selection of CAN interfaces (assignment)
  e.g. canplay -I logfile vcan2=can2 vcan0=can1 can2=can3
  means: send frames received on can1 in the logfile to vcan0 and so on ...
- if no assignment is made the original interfaces are used for replay
- handling of multiple CAN interfaces simultaneously (if in logfile)
- option: throttle disable (do not look on timestamps => very FAST replay!)
- option: change the 'sleep time' in milli seconds

Remarks:
canplayer uses nanosleep() for throttling which means that the resolution of
the canplayer is about 1ms (Kernel HZ = 1000) or 10ms (Kernel HZ = 100).
After each nanosleep() all the CAN frames are send that had to be transmitted
until the timestamp at the current time. Giving e.g. the option '-g 500' for
500ms let's you see the behaviour. Using nanosleep() makes canplay a very
performant tool with minimum CPU load.

To transfer CAN frames over a TCP/IP network you may now say something like:
candump -> netcat -> netcat -> canplayer
Makefile
candump.c
canplayer.c [new file with mode: 0644]