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 libmDot-mbed5
Fork of Dot-AT-Firmware by
CmdNetworkLinkCheck.cpp
00001 #include "CmdNetworkLinkCheck.h" 00002 #include "CommandTerminal.h" 00003 00004 CmdNetworkLinkCheck::CmdNetworkLinkCheck() 00005 : 00006 Command("Network Link Check", "AT+NLC", "Perform network link check, displays dBm above floor, number of gateways in range and optional packet payload if received", "(-20.0-20.0),(1-)") { 00007 00008 } 00009 00010 uint32_t CmdNetworkLinkCheck::action(std::vector<std::string> args) { 00011 mDot::link_check lc; 00012 00013 lc = CommandTerminal::Dot()->networkLinkCheck(); 00014 if (lc.status) { 00015 CommandTerminal::Serial()->writef("%d,%lu\r\n", lc.dBm, lc.gateways); 00016 00017 if (!lc.payload.empty()) 00018 CommandTerminal::Serial()->writef("%s\r\n", CommandTerminal::formatPacketData(lc.payload, CommandTerminal::Dot()->getRxOutput()).c_str()); 00019 00020 } else { 00021 CommandTerminal::setErrorMessage(CommandTerminal::Dot()->getLastError()); 00022 return 1; 00023 } 00024 00025 return 0; 00026 } 00027
Generated on Tue Jul 12 2022 20:40:04 by
