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/CmdTxNextMs.cpp

Committer:
ahario
Date:
2016-10-19
Revision:
14:eecf7851d6ff
Parent:
2:e5eebd74d36d

File content as of revision 14:eecf7851d6ff:

#include "CmdTxNextMs.h"

CmdTxNextMs::CmdTxNextMs(mDot* dot, mts::MTSSerial& serial)
: Command(dot, "Tx Next", "AT+TXN", "Get time in ms until next free channel"), _serial(serial) {
    _help = std::string(text()) + ": " + std::string(desc());
    _usage = "(0-2793000)";
    _queryable = true;
}

uint32_t CmdTxNextMs::action(std::vector<std::string> args) {

    if (_dot->getVerbose())
        _serial.writef("Next Tx in: ");

    _serial.writef("%lu\r\n", _dot->getNextTxMs());

    return 0;
}

bool CmdTxNextMs::verify(std::vector<std::string> args) {

    if (args.size() > 1)
        return false;

    return true;
}