[cli] cleanup dataset implementation (#3474)

This commit is contained in:
Yakun Xu
2019-01-18 11:32:36 -08:00
committed by Jonathan Hui
parent f4c10c0ae1
commit 820d231067
4 changed files with 131 additions and 156 deletions
+9 -8
View File
@@ -301,13 +301,14 @@ Interpreter::Interpreter(Instance *aInstance)
#endif
, mUdp(*this)
#endif
, mInstance(aInstance)
, mDataset(*this)
#if OPENTHREAD_ENABLE_APPLICATION_COAP
, mCoap(*this)
#endif
#if OPENTHREAD_ENABLE_APPLICATION_COAP_SECURE
, mCoapSecure(*this)
#endif
, mInstance(aInstance)
{
#ifdef OTDLL
assert(mApiInstance);
@@ -852,13 +853,6 @@ void Interpreter::ProcessCounters(int argc, char *argv[])
}
}
void Interpreter::ProcessDataset(int argc, char *argv[])
{
otError error;
error = Dataset::Process(mInstance, argc, argv, *mServer);
AppendResult(error);
}
#if OPENTHREAD_FTD
void Interpreter::ProcessDelayTimerMin(int argc, char *argv[])
{
@@ -2999,6 +2993,13 @@ exit:
AppendResult(error);
}
void Interpreter::ProcessDataset(int argc, char *argv[])
{
otError error;
error = mDataset.Process(argc, argv);
AppendResult(error);
}
#ifndef OTDLL
void Interpreter::ProcessTxPower(int argc, char *argv[])
{