Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MTS-Serial libxDot-mbed5
CommandTerminal/CmdDisplayStats.cpp@18:72b6b49d363d, 2019-01-16 (annotated)
- Committer:
- jreiss
- Date:
- Wed Jan 16 14:20:49 2019 +0000
- Revision:
- 18:72b6b49d363d
- Parent:
- 14:f9a77400b622
Update libxDot to latest and mbed-os to 5.7.7; Update PacketRx for new library
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Mike Fiore |
1:e52ae6584f1c | 1 | #include "CmdDisplayStats.h" |
| Mike Fiore |
1:e52ae6584f1c | 2 | |
| Mike Fiore |
14:f9a77400b622 | 3 | CmdDisplayStats::CmdDisplayStats() : |
| Mike Fiore |
14:f9a77400b622 | 4 | Command("Display Stats", "AT&S", "Display statistics", "TABLE") { |
| Mike Fiore |
14:f9a77400b622 | 5 | |
| Mike Fiore |
1:e52ae6584f1c | 6 | } |
| Mike Fiore |
1:e52ae6584f1c | 7 | |
| Mike Fiore |
1:e52ae6584f1c | 8 | uint32_t CmdDisplayStats::action(std::vector<std::string> args) { |
| Mike Fiore |
1:e52ae6584f1c | 9 | |
| Mike Fiore |
14:f9a77400b622 | 10 | mDot::mdot_stats stats = CommandTerminal::Dot()->getStats(); |
| Mike Fiore |
1:e52ae6584f1c | 11 | |
| Mike Fiore |
14:f9a77400b622 | 12 | CommandTerminal::Serial()->writef("Join Attempts: %5lu\r\n", stats.Joins); |
| Mike Fiore |
14:f9a77400b622 | 13 | CommandTerminal::Serial()->writef("Join Fails: %5lu\r\n", stats.JoinFails); |
| Mike Fiore |
14:f9a77400b622 | 14 | CommandTerminal::Serial()->writef("Up Packets: %5lu\r\n", stats.Up); |
| Mike Fiore |
14:f9a77400b622 | 15 | CommandTerminal::Serial()->writef("Down Packets: %5lu\r\n", stats.Down); |
| Mike Fiore |
14:f9a77400b622 | 16 | CommandTerminal::Serial()->writef("Missed Acks: %5lu\r\n", stats.MissedAcks); |
| Mike Fiore |
14:f9a77400b622 | 17 | CommandTerminal::Serial()->writef("CRC Errors: %5lu\r\n", stats.CRCErrors); |
| Mike Fiore |
1:e52ae6584f1c | 18 | |
| Mike Fiore |
1:e52ae6584f1c | 19 | return 0; |
| Mike Fiore |
1:e52ae6584f1c | 20 | } |
| Mike Fiore |
1:e52ae6584f1c | 21 |