MicroLabo / Mbed OS mbed-Dot-AT-Firmware

Dependencies:   MTS-Serial libmDot-mbed5

Fork of Dot-AT-Firmware by MultiTech

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers CmdSessionDataRate.cpp Source File

CmdSessionDataRate.cpp

00001 #include "CmdSessionDataRate.h"
00002 
00003 CmdSessionDataRate::CmdSessionDataRate()
00004 : Command("Session Data Rate", "AT+SDR", "Get the current datarate", "US:(7-10|DR0-DR4|DR8-DR13)) EU:(7-12|DR0-DR7))")
00005 {
00006     _queryable = true;
00007 }
00008 
00009 uint32_t CmdSessionDataRate::action(std::vector<std::string> args) {
00010     if (args.size() == 1) {
00011         CommandTerminal::Serial()->writef("DR%d - %s\r\n", CommandTerminal::Dot()->getSessionDataRate(), CommandTerminal::Dot()->getDateRateDetails(CommandTerminal::Dot()->getSessionDataRate()).c_str());
00012     }
00013 
00014     return 0;
00015 }
00016 
00017 bool CmdSessionDataRate::verify(std::vector<std::string> args) {
00018     if (args.size() == 1)
00019         return true;
00020 
00021     CommandTerminal::setErrorMessage("Invalid arguments");
00022     return false;
00023 }