Linux-CAN / SocketCAN user space applications
 
 
 
 
Go to file
Michal Sojka 2206f92de7 canbusload: Add exact CAN frame length calculation (including bitstuffing)
This adds an algorithm for calculating the exact number of bits a CAN
frame occupies on the bus and uses this algorithm in canbusload. It
also moves the other methods for CAN frame length calculation, already
present in canbusload, to the new file.

The added algorithm calculates the exact number of stuffed bit in a
CAN frame. Note that in order to calculate that correctly, we must
also know the frame's CRC. Hence, the algorithm also includes CRC
calculation routine.

The correctness of the algorithm was verified on an oscilloscope for
several different SFF and EFF frames.

Currently only CAN frames are supported. For CANFD frames, a different
algorithm is needed. CANFD uses different CRC polynomials and
calculates the CRC from the staffed bit-stream (CAN calculates CRC
from de-stuffed bit-stream).

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2014-01-30 16:23:25 +01:00
config/m4 add autotools infrastructure 2010-04-19 12:12:18 +00:00
include/linux isotp: fix path mentioned in file 2014-01-23 14:31:10 +01:00
.gitignore gitignore: added tarballs 2012-01-11 12:14:15 +01:00
Android.mk Android.mk: remove executable bit 2014-01-16 16:50:42 +01:00
GNUmakefile.am canbusload: Add exact CAN frame length calculation (including bitstuffing) 2014-01-30 16:23:25 +01:00
Makefile canbusload: Add exact CAN frame length calculation (including bitstuffing) 2014-01-30 16:23:25 +01:00
asc2log.c asc2log: inform about uninstalled locales at date conversion failures 2013-11-28 16:12:17 +01:00
autogen.sh add autotools infrastructure 2010-04-19 12:12:18 +00:00
bcmserver.c remove obsolete SVN ID tags 2012-11-14 20:57:16 +01:00
can-calc-bit-timing.c can-calc-bit-timing: fix MCP251x bit rate calculation 2014-01-06 10:35:45 +01:00
canbusload.c canbusload: Add exact CAN frame length calculation (including bitstuffing) 2014-01-30 16:23:25 +01:00
candump.c can-utils: trivial: fix typos concerning "separation" and "useful" 2013-08-15 21:09:27 +02:00
canfdtest.c treewide: replace berlios contact email by linux-can@vger.kernel.org 2012-01-11 12:14:15 +01:00
canframelen.c canbusload: Add exact CAN frame length calculation (including bitstuffing) 2014-01-30 16:23:25 +01:00
canframelen.h canbusload: Add exact CAN frame length calculation (including bitstuffing) 2014-01-30 16:23:25 +01:00
cangen.c cangen: use long long in time computation for -g to support >2.1s 2013-02-07 13:57:49 +01:00
cangw.c cangw: add an option for the per rule limitation of frame hops 2013-09-04 20:30:34 +02:00
canlogserver.c can-utils: trivial: fix typos concerning "separation" and "useful" 2013-08-15 21:09:27 +02:00
canplayer.c remove obsolete SVN ID tags 2012-11-14 20:57:16 +01:00
cansend.c can-utils: trivial: fix typos concerning "separation" and "useful" 2013-08-15 21:09:27 +02:00
cansniffer.c cansniffer: fix file name in header 2013-08-17 19:04:48 +02:00
configure.ac configure: enable silent rules if available 2012-11-26 21:57:45 +01:00
isotpdump.c remove obsolete SVN ID tags 2012-11-14 20:57:16 +01:00
isotprecv.c remove obsolete SVN ID tags 2012-11-14 20:57:16 +01:00
isotpsend.c remove obsolete SVN ID tags 2012-11-14 20:57:16 +01:00
isotpserver.c remove obsolete SVN ID tags 2012-11-14 20:57:16 +01:00
isotpsniffer.c remove obsolete SVN ID tags 2012-11-14 20:57:16 +01:00
isotptun.c remove obsolete SVN ID tags 2012-11-14 20:57:16 +01:00
lib.c can-utils: trivial: fix typos concerning "separation" and "useful" 2013-08-15 21:09:27 +02:00
lib.h can-utils: trivial: fix typos concerning "separation" and "useful" 2013-08-15 21:09:27 +02:00
log2asc.c remove obsolete SVN ID tags 2012-11-14 20:57:16 +01:00
log2long.c remove obsolete SVN ID tags 2012-11-14 20:57:16 +01:00
slcan_attach.c remove obsolete SVN ID tags 2012-11-14 20:57:16 +01:00
slcand.c slcand: accept both tty* and /dev/tty* device names 2014-01-23 13:46:19 +01:00
slcanpty.c slcanpty: declare command buffer static 2014-01-16 16:31:50 +01:00
terminal.h remove obsolete SVN ID tags 2012-11-14 20:57:16 +01:00