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
CommandTerminal/CmdFrequencyBand.cpp
- Committer:
- jenkins@jenkinsdm1
- Date:
- 2017-06-19
- Revision:
- 16:d5cf2af81a6d
- Parent:
- 14:f9a77400b622
File content as of revision 16:d5cf2af81a6d:
#include "CmdFrequencyBand.h"
CmdFrequencyBand::CmdFrequencyBand() :
Command("Current Frequency Band", "AT+FREQ", "Current Frequency Band of Device 'US915', 'AU915', 'EU868', 'AS923', 'KR920', or 'AS923-JAPAN'", "(US915,AU915,EU868,AS923,KR920,AS923-JAPAN)")
{
_queryable = true;
}
uint32_t CmdFrequencyBand::action(std::vector<std::string> args)
{
if (args.size() == 1)
{
// using getChannelPlanName here instead of mDot::FrequencyBandStr allows AT firmware to properly display custom channel plan names
CommandTerminal::Serial()->writef("%s\r\n", CommandTerminal::Dot()->getChannelPlanName().c_str());
}
return 0;
}
bool CmdFrequencyBand::verify(std::vector<std::string> args)
{
if (args.size() == 1)
return true;
CommandTerminal::setErrorMessage("Invalid arguments");
return false;
}
