On Sun, Feb 13, 2011 at 04:01:02PM +0100, Wolfgang Grandegger wrote:
> If "candump" is called with the option "-e", the error messages are
> dumped in human readable format:
>
>
> # candump -e any,0:0,#FFFFFFFF
> ...
> can0 20000088 [8] 00 00 80 19 00 00 00 00 ERRORFRAME
> protocol-violation{{error-on-tx}{acknowledge-slot}}
> bus-error
> error-counter{tx{128}rx{97}}
> ...
> can0 2000008C [8] 00 08 80 19 00 00 00 00 ERRORFRAME
> controller-problem{tx-error-warning}
> protocol-violation{{error-on-tx}{acknowledge-slot}}
> bus-error
> error-counter{tx{128}rx{97}}
cool
>
> "candump" actually calles a library function sprintf_can_error_frame()
> to do the formatting. It could be used for other purposes as well.
>
> Signed-off-by: Wolfgang Grandegger <[email protected]>
>
> ---
> + if (view & CANLIB_VIEW_ERROR && cf->can_id & CAN_ERR_FLAG) {
tiny little remark:
if ((view & CANLIB_VIEW_ERROR) && (cf->can_id & CAN_ERR_FLAG)) {
is faster to understand for the programmer.
>
> Signed-off-by: Wolfgang Grandegger <[email protected]>
Acked-by: Kurt Van Dijck <[email protected]>
Kurt
_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core