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 libxDot-dev-mbed5-deprecated
Fork of Dot-AT-Firmware by
CommandTerminal/CmdIdentification.cpp
- Committer:
- Mike Fiore 
- Date:
- 2016-11-04
- Revision:
- 14:f9a77400b622
- Parent:
- 1:e52ae6584f1c
- Child:
- 16:d5cf2af81a6d
File content as of revision 14:f9a77400b622:
#include "CmdIdentification.h"
#include "mts_at_version.h"
CmdIdentification::CmdIdentification() : Command("Request Id", "ATI", "Request Identification", "NONE")
{
}
uint32_t CmdIdentification::action(std::vector<std::string> args)
{
    std::string version = AT_APPLICATION_VERSION;
#ifdef DEBUG_MAC
    version += "-debug";
#endif
    char buf[16];
    size_t size = snprintf(buf, sizeof(buf), "-mbed%d", MBED_LIBRARY_VERSION);
    if (size > 0) {
        version.append(buf, size);
    }
#if defined(TARGET_MTS_MDOT_F411RE)
    CommandTerminal::Serial()->writef("MultiTech mDot\r\n");
#else
    CommandTerminal::Serial()->writef("MultiTech xDot\r\n");
#endif /* TARGET_MTS_MDOT_F411RE */
    CommandTerminal::Serial()->writef("Firmware: %s\r\n", version.c_str());
    CommandTerminal::Serial()->writef("Library : %s\r\n", CommandTerminal::Dot()->getId().c_str());
    return 0;
}
            
    