linux

canReadErrorCounters

Syntax


#include <canlib.h>
canStatus canReadErrorCounters(
    int handle, 
    unsigned int* txErr, 
    unsigned int* rxErr, 
    unsigned int* ovErr);

Description

Reads the error counters of the CAN controller.

Input Parameters

handle
A handle to an open circuit.
Input/Output Parameters

txErr
A pointer to an UNSIGNED INT which receives the transmit error counter.
rxErr
A pointer to an UNSIGNED INT which receives the receive error counter.
ovErr
A pointer to an UNSIGNED INT which receives the number of overrun errors.
Return Value

canOK (zero) if success
canERR_xxx (negative) if failure.

Notes
Related Topics

canIoCtl to clear the counters.