[api] add API to get Thread Version (#4225)

This commit is contained in:
wgtdkp
2019-10-15 01:24:30 +08:00
committed by Jonathan Hui
parent ea0cc8f3bb
commit ff789e4ded
6 changed files with 47 additions and 18 deletions
+4
View File
@@ -3077,6 +3077,10 @@ void Interpreter::ProcessThread(int argc, char *argv[])
{
SuccessOrExit(error = otThreadSetEnabled(mInstance, false));
}
else if (strcmp(argv[0], "version") == 0)
{
mServer->OutputFormat("%u\r\n", otThreadGetVersion());
}
else
{
ExitNow(error = OT_ERROR_INVALID_ARGS);