firm newest
Dependencies: MTS-Serial libmDot-dev-mbed5-deprecated
CommandTerminal/CmdDisplayStats.cpp@1:c1c6549b9333, 2018-10-22 (annotated)
- Committer:
- nguyenhoang9x5555
- Date:
- Mon Oct 22 01:56:09 2018 +0000
- Revision:
- 1:c1c6549b9333
- Parent:
- 0:3c869a8cb8f8
hey
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 1 | #include "CmdDisplayStats.h" |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 2 | |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 3 | CmdDisplayStats::CmdDisplayStats() : |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 4 | Command("Display Stats", "AT&S", "Display statistics", "TABLE") { |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 5 | |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 6 | } |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 7 | |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 8 | uint32_t CmdDisplayStats::action(std::vector<std::string> args) { |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 9 | |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 10 | mDot::mdot_stats stats = CommandTerminal::Dot()->getStats(); |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 11 | |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 12 | CommandTerminal::Serial()->writef("Join Attempts: %5lu\r\n", stats.Joins); |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 13 | CommandTerminal::Serial()->writef("Join Fails: %5lu\r\n", stats.JoinFails); |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 14 | CommandTerminal::Serial()->writef("Up Packets: %5lu\r\n", stats.Up); |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 15 | CommandTerminal::Serial()->writef("Down Packets: %5lu\r\n", stats.Down); |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 16 | CommandTerminal::Serial()->writef("Missed Acks: %5lu\r\n", stats.MissedAcks); |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 17 | CommandTerminal::Serial()->writef("CRC Errors: %5lu\r\n", stats.CRCErrors); |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 18 | |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 19 | return 0; |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 20 | } |
nguyenhoang9x5555 | 0:3c869a8cb8f8 | 21 |