CAN CoreX 2.3.1
Table-driven CAN, CAN FD, ISO-TP, network simulation, and bus monitoring library
Loading...
Searching...
No Matches
CCX_GlobalStats_t Struct Reference

Global statistics for CAN instance. More...

#include <can_corex.h>

Data Fields

uint32_t total_rx_messages
 Total messages received and pushed to RX buffer.
uint32_t total_tx_messages
 Total messages successfully transmitted (call CCX_OnMessageTransmitted from ISR).
uint32_t rx_buffer_overflows
 Number of times RX buffer was full.
uint32_t tx_buffer_overflows
 Number of times TX buffer was full.
uint32_t parser_calls_count
 Total number of parser function invocations.
uint32_t timeout_calls_count
 Total number of timeout callback invocations.
uint16_t peak_rx_depth
 Highest RX buffer depth observed since stats reset.
uint16_t peak_tx_depth
 Highest TX buffer depth observed since stats reset.

Detailed Description

Global statistics for CAN instance.

These statistics are always enabled and have minimal performance overhead. All counters are automatically maintained by the library.

Usage:

const CCX_GlobalStats_t *stats = CCX_GetGlobalStats(&can_instance);
printf("RX: %lu, TX: %lu, Overflows: %lu\n",
const CCX_GlobalStats_t * CCX_GetGlobalStats(const CCX_instance_t *Instance)
Get global statistics.
Global statistics for CAN instance.
Definition can_corex.h:299
uint32_t total_rx_messages
Total messages received and pushed to RX buffer.
Definition can_corex.h:300
uint32_t rx_buffer_overflows
Number of times RX buffer was full.
Definition can_corex.h:303
uint32_t total_tx_messages
Total messages successfully transmitted (call CCX_OnMessageTransmitted from ISR).
Definition can_corex.h:302

The documentation for this struct was generated from the following file: