summaryrefslogtreecommitdiff
path: root/firmware/include/simtrace_usb.h
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-03-23 00:03:45 +0100
committerHarald Welte <laforge@gnumonks.org>2012-03-23 00:03:45 +0100
commit868b6d0c68f52385f7924e7d63eb1a5e92642f3a (patch)
tree81ea5fc541c1ede08a8f5297399decdd921bc9fd /firmware/include/simtrace_usb.h
parent4c0cf591b03148b9450d4009d2a3e908ec0c87a8 (diff)
simtrace: introduce statisticsv0.5
the statistics count various events like overruns, parity errors, missing rctx and can dump those stats via USB as well as on the serial console.
Diffstat (limited to 'firmware/include/simtrace_usb.h')
-rw-r--r--firmware/include/simtrace_usb.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/firmware/include/simtrace_usb.h b/firmware/include/simtrace_usb.h
index b8b62d3..08e4523 100644
--- a/firmware/include/simtrace_usb.h
+++ b/firmware/include/simtrace_usb.h
@@ -15,6 +15,7 @@ enum simtrace_usb_msgt {
SIMTRACE_MSGT_NULL,
SIMTRACE_MSGT_DATA,
SIMTRACE_MSGT_RESET, /* reset was asserted, no more data */
+ SIMTRACE_MSGT_STATS, /* statistics */
};
/* flags for MSGT_DATA */
@@ -22,4 +23,15 @@ enum simtrace_usb_msgt {
#define SIMTRACE_FLAG_WTIME_EXP 0x04 /* work waiting time expired */
#define SIMTRACE_FLAG_PPS_FIDI 0x08 /* Fi/Di values in res[2] */
+struct simtrace_stats {
+ u_int32_t no_rctx;
+ u_int32_t rctx_sent;
+ u_int32_t rst;
+ u_int32_t pps;
+ u_int32_t bytes;
+ u_int32_t parity_err;
+ u_int32_t frame_err;
+ u_int32_t overrun;
+} stats;
+
#endif /* SIMTRACE_USB_H */
personal git repositories of Harald Welte. Your mileage may vary