Avisaro Online Documentation - Wiki
Impressum Kontakt Sitemap

CSTAT?

Description

This command prints out statistics counters of the CAN (Controller Area Network) interface.
The output consist of five decimal numbers separated by whitespace (0x20) characters.


From left to right:


1. RX_OK: Number of successfully received and buffered CAN frames.


2. RX_LOST: Is incremented when the input FIFO has not enough room to store a received CAN Frame, so that frame must be thrown away.


3. TX_OK: Number of successfully transmitted CAN frames.


4. TX_FAILED: Is incremented when a frame could not be transmitted because the CAN interface is temporarily busy.


5. BUS_ERRORS: Is incremented on bus errors. e.g. there's no other node that acknowledge our retransmissions.


If the CAN driver is not active (on a module that doesn't use it), all counters remain zero.

Parameter

CSTAT? doesn't need any arguments.

Return value

ERR_OK (0) - Always

Example

CSTAT?

outputs the following: 411 0 17 1 4

Remarks

The CSTAT? command is only meaningful if the CAN interface is active. This command only prints statistics counters for the primary CAN interface.