[diag] remove diag sleep command (#2378)

So then platforms could define their own sleep behavior.
This commit is contained in:
Shu Chen
2017-12-02 02:00:10 +00:00
committed by Jonathan Hui
parent 9270cb4377
commit aa3d17fa5f
3 changed files with 0 additions and 21 deletions
-16
View File
@@ -52,7 +52,6 @@ const struct Command Diag::sCommands[] =
{ "power", &ProcessPower },
{ "send", &ProcessSend },
{ "repeat", &ProcessRepeat },
{ "sleep", &ProcessSleep },
{ "stats", &ProcessStats },
};
@@ -304,21 +303,6 @@ exit:
AppendErrorResult(error, aOutput, aOutputMaxLen);
}
void Diag::ProcessSleep(int argc, char *argv[], char *aOutput, size_t aOutputMaxLen)
{
otError error = OT_ERROR_NONE;
VerifyOrExit(otPlatDiagModeGet(), error = OT_ERROR_INVALID_STATE);
otPlatRadioSleep(sContext);
snprintf(aOutput, aOutputMaxLen, "sleeping now...\r\n");
exit:
OT_UNUSED_VARIABLE(argc);
OT_UNUSED_VARIABLE(argv);
AppendErrorResult(error, aOutput, aOutputMaxLen);
}
void Diag::ProcessStats(int argc, char *argv[], char *aOutput, size_t aOutputMaxLen)
{
otError error = OT_ERROR_NONE;
-1
View File
@@ -76,7 +76,6 @@ public:
private:
static void AppendErrorResult(otError error, char *aOutput, size_t aOutputMaxLen);
static void ProcessSleep(int argc, char *argv[], char *aOutput, size_t aOutputMaxLen);
static void ProcessStart(int argc, char *argv[], char *aOutput, size_t aOutputMaxLen);
static void ProcessStop(int argc, char *argv[], char *aOutput, size_t aOutputMaxLen);
static void ProcessSend(int argc, char *argv[], char *aOutput, size_t aOutputMaxLen);
-4
View File
@@ -139,10 +139,6 @@ void TestDiag()
"diag repeat 100 100\n",
"sending packets of length 0x64 at the delay of 0x64 ms\r\nstatus 0x00\r\n"
},
{
"diag sleep\n",
"sleeping now...\r\n",
},
{
"diag stop\n",
"received packets: 0\r\nsent packets: 0\r\nfirst received packet: rssi=0, lqi=0\r\n\nstop diagnostics mode\r\nstatus 0x00\r\n",