Merge pull request #184 from g-oikonomou/bug-fixes/rimestats
Rimestats Fix (#183)
This commit is contained in:
commit
5df586e09d
11 changed files with 53 additions and 47 deletions
|
@ -36,7 +36,6 @@
|
|||
* \author
|
||||
* Adam Dunkels <adam@sics.se>
|
||||
*/
|
||||
|
||||
#include "contiki.h"
|
||||
#include "net/rime.h"
|
||||
#include "lib/random.h"
|
||||
|
@ -72,11 +71,12 @@ static void
|
|||
print_rime_stats()
|
||||
{
|
||||
PRINTF("\nNetwork Stats\n");
|
||||
PRINTF(" TX=%lu , RX=%lu\n", rimestats.tx, rimestats.rx);
|
||||
PRINTF("LL-TX=%lu , LL-RX=%lu\n", rimestats.lltx, rimestats.llrx);
|
||||
PRINTF(" Long=%lu , Short=%lu\n", rimestats.toolong, rimestats.tooshort);
|
||||
PRINTF("T/Out=%lu , CCA-Err=%lu\n", rimestats.timedout,
|
||||
rimestats.contentiondrop);
|
||||
PRINTF(" TX=%lu , RX=%lu\n", RIMESTATS_GET(tx), RIMESTATS_GET(rx));
|
||||
PRINTF("LL-TX=%lu , LL-RX=%lu\n", RIMESTATS_GET(lltx), RIMESTATS_GET(llrx));
|
||||
PRINTF(" Long=%lu , Short=%lu\n", RIMESTATS_GET(toolong),
|
||||
RIMESTATS_GET(tooshort));
|
||||
PRINTF("T/Out=%lu , CCA-Err=%lu\n", RIMESTATS_GET(timedout),
|
||||
RIMESTATS_GET(contentiondrop));
|
||||
}
|
||||
|
||||
static const struct broadcast_callbacks bc_rx = { broadcast_recv };
|
||||
|
|
|
@ -45,5 +45,6 @@
|
|||
#define PROJECT_CONF_H_
|
||||
|
||||
#define BUTTON_SENSOR_CONF_ON 1
|
||||
#define RIMESTATS_CONF_ENABLED 1
|
||||
|
||||
#endif /* PROJECT_CONF_H_ */
|
||||
|
|
|
@ -104,10 +104,10 @@ static void
|
|||
print_stats()
|
||||
{
|
||||
PRINTF("tl=%lu, ts=%lu, bs=%lu, bc=%lu\n",
|
||||
rimestats.toolong, rimestats.tooshort, rimestats.badsynch,
|
||||
rimestats.badcrc);
|
||||
PRINTF("llrx=%lu, lltx=%lu, rx=%lu, tx=%lu\n", rimestats.llrx,
|
||||
rimestats.lltx, rimestats.rx, rimestats.tx);
|
||||
RIMESTATS_GET(toolong), RIMESTATS_GET(tooshort),
|
||||
RIMESTATS_GET(badsynch), RIMESTATS_GET(badcrc));
|
||||
PRINTF("llrx=%lu, lltx=%lu, rx=%lu, tx=%lu\n", RIMESTATS_GET(llrx),
|
||||
RIMESTATS_GET(lltx), RIMESTATS_GET(rx), RIMESTATS_GET(tx));
|
||||
}
|
||||
#else
|
||||
#define print_stats()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue