mirror of
https://github.com/espressif/openthread.git
synced 2026-08-06 10:47:46 +00:00
committed by
Jonathan Hui
parent
ab3a1ef6d4
commit
61088c7782
+12
-1
@@ -247,7 +247,7 @@ Done
|
||||
Get the supported counter names.
|
||||
|
||||
```bash
|
||||
>counters
|
||||
> counters
|
||||
mac
|
||||
mle
|
||||
Done
|
||||
@@ -304,6 +304,17 @@ Parent Changes: 0
|
||||
Done
|
||||
```
|
||||
|
||||
### counters \<countername\> reset
|
||||
|
||||
Reset the counter value.
|
||||
|
||||
```bash
|
||||
> counters mac reset
|
||||
Done
|
||||
> counters mle reset
|
||||
Done
|
||||
```
|
||||
|
||||
### networktime
|
||||
|
||||
Get the Thread network time and the time sync parameters.
|
||||
|
||||
+18
-3
@@ -892,9 +892,9 @@ void Interpreter::ProcessCounters(int argc, char *argv[])
|
||||
mServer->OutputFormat("mac\r\n");
|
||||
mServer->OutputFormat("mle\r\n");
|
||||
}
|
||||
else if (argc == 1)
|
||||
else if (strcmp(argv[0], "mac") == 0)
|
||||
{
|
||||
if (strcmp(argv[0], "mac") == 0)
|
||||
if (argc == 1)
|
||||
{
|
||||
const otMacCounters *macCounters = otLinkGetCounters(mInstance);
|
||||
|
||||
@@ -930,7 +930,18 @@ void Interpreter::ProcessCounters(int argc, char *argv[])
|
||||
mServer->OutputFormat(" RxErrFcs: %d\r\n", macCounters->mRxErrFcs);
|
||||
mServer->OutputFormat(" RxErrOther: %d\r\n", macCounters->mRxErrOther);
|
||||
}
|
||||
else if (strcmp(argv[0], "mle") == 0)
|
||||
else if ((argc == 2) && (strcmp(argv[0], "reset") == 0))
|
||||
{
|
||||
otLinkResetCounters(mInstance);
|
||||
}
|
||||
else
|
||||
{
|
||||
ExitNow(error = OT_ERROR_INVALID_ARGS);
|
||||
}
|
||||
}
|
||||
else if (strcmp(argv[0], "mle") == 0)
|
||||
{
|
||||
if (argc == 1)
|
||||
{
|
||||
const otMleCounters *mleCounters = otThreadGetMleCounters(mInstance);
|
||||
|
||||
@@ -945,6 +956,10 @@ void Interpreter::ProcessCounters(int argc, char *argv[])
|
||||
mleCounters->mBetterPartitionAttachAttempts);
|
||||
mServer->OutputFormat("Parent Changes: %d\r\n", mleCounters->mParentChanges);
|
||||
}
|
||||
else if ((argc == 2) && (strcmp(argv[0], "reset") == 0))
|
||||
{
|
||||
otThreadResetMleCounters(mInstance);
|
||||
}
|
||||
else
|
||||
{
|
||||
ExitNow(error = OT_ERROR_INVALID_ARGS);
|
||||
|
||||
Reference in New Issue
Block a user