Linux-CAN / SocketCAN user space applications
 
 
 
 
Go to file
Marc Kleine-Budde 44a2900bd8 can-calc-bit-timing: better sample point calculation
This patch tries to optimize the calculation of the sample point. To
understand what it does have a look at the original implementation.

If there is a combination of timing parameters where both the bitrate
and sample point error are 0 the current implementation will find it.

However if the reference clock doesn't allow an optimal bitrate (this
means the bitrate error is always != 0) there might be several timing
parameter combinations having the same bitrate error. The original
implementation will allways choose the one with the highest brp. The
actual sample point error isn't taken into account.

This patch changes the algorithm to minimize the sample point error,
too. Now a brp/tseg combination is accepted as better if one of these
condition are fulfilled:
1) the bit rate error must be smaller, or
2) the bit rate error must be equal and
   the sample point error must be equal or smaller

If a smaller bit rate error is found the sample point error is reset.
This ensures that we first optimize for small bit rate error and then
for small sample point errors.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-04-13 13:13:01 +02:00
config/m4 add autotools infrastructure 2010-04-19 12:12:18 +00:00
include/linux can: avoid using timeval for uapi 2015-11-05 21:36:42 +01:00
.gitignore gitignore: add isotpperf 2015-03-06 10:02:35 +01:00
Android.mk can-utils: added isotpperf tool for performance measurements 2015-02-04 10:17:38 +01:00
GNUmakefile.am configure: switch to new libtool-2.0 macro 2015-03-04 21:09:39 +01:00
Makefile can-utils: added isotpperf tool for performance measurements 2015-02-04 10:17:38 +01:00
README.md Create README.md 2015-09-04 11:16:17 +02:00
asc2log.c janitorial: asc2log: properly close infile 2015-03-06 10:02:35 +01:00
autogen.sh do not use --symlink for autoreconf 2014-07-02 16:03:34 +02: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: better sample point calculation 2016-04-13 13:13:01 +02:00
canbusload.c canbusload: print bitstuffing mode when showing current time is enabled 2014-02-01 21:30:12 +01:00
candump.c candump: check for joined filter support at runtime 2015-04-01 12:58:27 +02:00
canfdtest.c treewide: use if_nametoindex to avoid overflows 2015-06-30 21:00:04 +02:00
canframelen.c canbusload: Fix worst-case frame length estimation 2014-01-30 16:23:32 +01:00
canframelen.h Add license to canframelen.h 2014-01-31 11:52:15 +01:00
cangen.c cangen: added -b switch enabling bitrate switch in canfd frames. 2015-10-14 21:22:35 +02:00
cangw.c cangw: introduce uid command line option 2015-06-11 20:48:43 +02:00
canlogserver.c can-utils: trivial: fix typos concerning "separation" and "useful" 2013-08-15 21:09:27 +02:00
canplayer.c canplayer: convert skipgap to unsigned long 2015-04-10 21:20:58 +02:00
cansend.c treewide: use if_nametoindex to avoid overflows 2015-06-30 21:00:04 +02:00
cansniffer.c cansniffer: increase resolution for timeout values 2014-06-24 21:36:55 +02:00
configure.ac autotools: fix syntax error 2015-09-03 17:24:21 +02:00
isotpdump.c treewide: use if_nametoindex to avoid overflows 2015-06-30 21:00:04 +02:00
isotpperf.c isotp: fix printf warning on 32 bit systems 2015-03-03 08:29:36 +01:00
isotprecv.c treewide: use if_nametoindex to avoid overflows 2015-06-30 21:00:04 +02:00
isotpsend.c treewide: use if_nametoindex to avoid overflows 2015-06-30 21:00:04 +02:00
isotpserver.c treewide: use if_nametoindex to avoid overflows 2015-06-30 21:00:04 +02:00
isotpsniffer.c treewide: use if_nametoindex to avoid overflows 2015-06-30 21:00:04 +02:00
isotptun.c treewide: use if_nametoindex to avoid overflows 2015-06-30 21:00:04 +02:00
lib.c lib: Update error messages according to new state change handling 2014-12-18 14:40:42 +01:00
lib.h can-utils: trivial: fix typos concerning "separation" and "useful" 2013-08-15 21:09:27 +02:00
log2asc.c log2asc: include sys/time.h 2015-07-22 21:12:44 +02:00
log2long.c remove obsolete SVN ID tags 2012-11-14 20:57:16 +01:00
slcan_attach.c slcan: added listen-only flag 2015-10-15 10:18:15 +02:00
slcand.c Include linux/sockios.h to fix musl build 2015-07-22 21:12:51 +02:00
slcanpty.c treewide: use if_nametoindex to avoid overflows 2015-06-30 21:00:04 +02:00
terminal.h remove obsolete SVN ID tags 2012-11-14 20:57:16 +01:00

README.md

SocketCAN userspace utilities and tools

CAN is a message-based network protocol designed for vehicles originally initially created by Robert Bosch GmbH. SocketCAN is a set of open source CAN drivers and a networking stack contributed by Volkswagen Research to the Linux kernel.

This package contains some userspace utilities for Linux SocketCAN subsystem: asc2log, bcmserver, canbusload, can-calc-bit-timing, candump, canfdtest, cangen, cangw, canlogserver, canplayer, cansend, cansniffer, isotpdump, isotprecv, isotpperf, isotpsend, isotpserver, isotpsniffer, isotptun, log2asc, log2long, slcan_attach, slcand and slcanpty.


Description copied from https://packages.debian.org/sid/can-utils