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@16:d5cf2af81a6d, 2017-06-19 (annotated)
- Committer:
- jenkins@jenkinsdm1
- Date:
- Mon Jun 19 14:33:21 2017 -0500
- Revision:
- 16:d5cf2af81a6d
- Parent:
- 14:f9a77400b622
mdot-firmware revision 3.0.0-rc7
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Mike Fiore |
1:e52ae6584f1c | 1 | #include "CmdFrequencyBand.h" |
| Mike Fiore |
1:e52ae6584f1c | 2 | |
| Mike Fiore |
14:f9a77400b622 | 3 | CmdFrequencyBand::CmdFrequencyBand() : |
| jenkins@jenkinsdm1 | 16:d5cf2af81a6d | 4 | 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)") |
| Mike Fiore |
1:e52ae6584f1c | 5 | { |
| Mike Fiore |
1:e52ae6584f1c | 6 | _queryable = true; |
| Mike Fiore |
1:e52ae6584f1c | 7 | } |
| Mike Fiore |
1:e52ae6584f1c | 8 | |
| Mike Fiore |
1:e52ae6584f1c | 9 | uint32_t CmdFrequencyBand::action(std::vector<std::string> args) |
| Mike Fiore |
14:f9a77400b622 | 10 | { |
| Mike Fiore |
1:e52ae6584f1c | 11 | if (args.size() == 1) |
| Mike Fiore |
1:e52ae6584f1c | 12 | { |
| jenkins@jenkinsdm1 | 16:d5cf2af81a6d | 13 | // using getChannelPlanName here instead of mDot::FrequencyBandStr allows AT firmware to properly display custom channel plan names |
| jenkins@jenkinsdm1 | 16:d5cf2af81a6d | 14 | CommandTerminal::Serial()->writef("%s\r\n", CommandTerminal::Dot()->getChannelPlanName().c_str()); |
| Mike Fiore |
14:f9a77400b622 | 15 | } |
| Mike Fiore |
14:f9a77400b622 | 16 | |
| Mike Fiore |
1:e52ae6584f1c | 17 | return 0; |
| Mike Fiore |
1:e52ae6584f1c | 18 | } |
| Mike Fiore |
1:e52ae6584f1c | 19 | |
| Mike Fiore |
1:e52ae6584f1c | 20 | bool CmdFrequencyBand::verify(std::vector<std::string> args) |
| Mike Fiore |
14:f9a77400b622 | 21 | { |
| Mike Fiore |
1:e52ae6584f1c | 22 | if (args.size() == 1) |
| Mike Fiore |
1:e52ae6584f1c | 23 | return true; |
| Mike Fiore |
1:e52ae6584f1c | 24 | |
| Mike Fiore |
14:f9a77400b622 | 25 | CommandTerminal::setErrorMessage("Invalid arguments"); |
| Mike Fiore |
1:e52ae6584f1c | 26 | return false; |
| Mike Fiore |
1:e52ae6584f1c | 27 | } |
