mirror of
https://github.com/espressif/openthread.git
synced 2026-07-08 13:20:25 +00:00
Add version command. (#237)
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <openthread.h>
|
||||
#include <openthread-config.h>
|
||||
|
||||
#include "cli.hpp"
|
||||
#include <common/encoding.hpp>
|
||||
@@ -79,6 +80,7 @@ const struct Command Interpreter::sCommands[] =
|
||||
{ "start", &ProcessStart },
|
||||
{ "state", &ProcessState },
|
||||
{ "stop", &ProcessStop },
|
||||
{ "version", &ProcessVersion },
|
||||
{ "whitelist", &ProcessWhitelist },
|
||||
};
|
||||
|
||||
@@ -1267,6 +1269,12 @@ exit:
|
||||
AppendResult(error);
|
||||
}
|
||||
|
||||
void Interpreter::ProcessVersion(int argc, char *argv[])
|
||||
{
|
||||
sServer->OutputFormat("%s\r\n", PACKAGE_NAME "/" PACKAGE_VERSION "; " __DATE__ " " __TIME__);
|
||||
AppendResult(kThreadError_None);
|
||||
}
|
||||
|
||||
void Interpreter::ProcessWhitelist(int argc, char *argv[])
|
||||
{
|
||||
ThreadError error = kThreadError_None;
|
||||
|
||||
Reference in New Issue
Block a user