Add 'factoryreset' cli (#892)

* add 'factoryreset' cli to delete all stored settings and then reset

* use 'factoryreset' in THCI reset API to ensure that there is no pre-settings in DUT before running any test
This commit is contained in:
Shu Chen
2016-10-28 02:08:39 +08:00
committed by Jonathan Hui
parent f0a5239a59
commit f3ebcff818
6 changed files with 34 additions and 6 deletions
+8
View File
@@ -87,6 +87,7 @@ const struct Command Interpreter::sCommands[] =
#endif
{ "extaddr", &Interpreter::ProcessExtAddress },
{ "extpanid", &Interpreter::ProcessExtPanId },
{ "factoryreset", &Interpreter::ProcessFactoryReset },
{ "hashmacaddr", &Interpreter::ProcessHashMacAddress },
{ "ifconfig", &Interpreter::ProcessIfconfig },
{ "ipaddr", &Interpreter::ProcessIpAddr },
@@ -650,6 +651,13 @@ exit:
AppendResult(error);
}
void Interpreter::ProcessFactoryReset(int argc, char *argv[])
{
otFactoryReset(mInstance);
(void)argc;
(void)argv;
}
void Interpreter::ProcessHashMacAddress(int argc, char *argv[])
{
ThreadError error = kThreadError_None;