mirror of
https://github.com/espressif/openthread.git
synced 2026-07-26 22:09:05 +00:00
[diag] remove diag sleep command (#2378)
So then platforms could define their own sleep behavior.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user