This mDot firmware will allow USB to directly utilize AT command without the need the use of RS232 DB9 port.

Dependencies:   MTS-Serial libmDot mbed-rtos mbed

Fork of mDot_USB_AT_firmware by Hadi Ho

CommandTerminal/CmdDataPending.cpp

Committer:
ahario
Date:
2016-10-19
Revision:
14:eecf7851d6ff
Parent:
1:e52ae6584f1c

File content as of revision 14:eecf7851d6ff:

#include "CmdDataPending.h"

CmdDataPending::CmdDataPending(mDot* dot, mts::MTSSerial& serial) :
        Command(dot, "Data Pending", "AT+DP", "Indicator of data in queue on server"),
        _serial(serial)
{
    _help = std::string(text()) + ": " + std::string(desc());
    _usage = "(0,1)";
    _queryable = true;
}

uint32_t CmdDataPending::action(std::vector<std::string> args)
{
    if (_dot->getVerbose())
        _serial.writef("Data Pending: ");

    _serial.writef("%d\r\n", _dot->getDataPending());

    return 0;
}