mirror of
https://github.com/espressif/openthread.git
synced 2026-09-13 04:30:08 +00:00
THCI: setMinDelayTimer() API (#1329)
This commit is contained in:
@@ -16,6 +16,7 @@ OpenThread test scripts use the CLI to execute test cases.
|
||||
* [contextreusedelay](#contextreusedelay)
|
||||
* [counter](#counter)
|
||||
* [dataset](#dataset)
|
||||
* [delaytimermin](#delaytimermin)
|
||||
* [discover](#discover)
|
||||
* [eidcache](#eidcache)
|
||||
* [eui64](#eui64)
|
||||
@@ -117,6 +118,7 @@ Remove an IEEE 802.15.4 Extended Address from the blacklist.
|
||||
> blacklist remove 166e0a0000000002
|
||||
Done
|
||||
```
|
||||
|
||||
### channel
|
||||
|
||||
Get the IEEE 802.15.4 Channel value.
|
||||
@@ -664,6 +666,25 @@ Set user specific data for the command.
|
||||
Done
|
||||
```
|
||||
|
||||
### delaytimermin
|
||||
|
||||
Get the minimal delay timer (in seconds).
|
||||
|
||||
```bash
|
||||
> delaytimermin
|
||||
30
|
||||
Done
|
||||
```
|
||||
|
||||
### delaytimermin \<delaytimermin\>
|
||||
|
||||
Set the minimal delay timer (in seconds).
|
||||
|
||||
```bash
|
||||
> delaytimermin 60
|
||||
Done
|
||||
```
|
||||
|
||||
### discover \[channel\]
|
||||
|
||||
Perform an MLE Discovery operation.
|
||||
|
||||
@@ -79,6 +79,7 @@ const struct Command Interpreter::sCommands[] =
|
||||
{ "contextreusedelay", &Interpreter::ProcessContextIdReuseDelay },
|
||||
{ "counter", &Interpreter::ProcessCounters },
|
||||
{ "dataset", &Interpreter::ProcessDataset },
|
||||
{ "delaytimermin", &Interpreter::ProcessDelayTimerMin},
|
||||
#if OPENTHREAD_ENABLE_DIAG
|
||||
{ "diag", &Interpreter::ProcessDiag },
|
||||
#endif
|
||||
@@ -568,6 +569,29 @@ void Interpreter::ProcessDataset(int argc, char *argv[])
|
||||
AppendResult(error);
|
||||
}
|
||||
|
||||
void Interpreter::ProcessDelayTimerMin(int argc, char *argv[])
|
||||
{
|
||||
ThreadError error = kThreadError_None;
|
||||
|
||||
if (argc == 0)
|
||||
{
|
||||
sServer->OutputFormat("%d\r\n", (otGetDelayTimerMinimal(mInstance) / 1000));
|
||||
}
|
||||
else if (argc == 1)
|
||||
{
|
||||
unsigned long value;
|
||||
SuccessOrExit(error = ParseUnsignedLong(argv[0], value));
|
||||
SuccessOrExit(error = otSetDelayTimerMinimal(mInstance, static_cast<uint32_t>(value * 1000)));
|
||||
}
|
||||
else
|
||||
{
|
||||
error = kThreadError_InvalidArgs;
|
||||
}
|
||||
|
||||
exit:
|
||||
AppendResult(error);
|
||||
}
|
||||
|
||||
void Interpreter::ProcessDiscover(int argc, char *argv[])
|
||||
{
|
||||
ThreadError error = kThreadError_None;
|
||||
|
||||
@@ -153,6 +153,7 @@ private:
|
||||
void ProcessContextIdReuseDelay(int argc, char *argv[]);
|
||||
void ProcessCounters(int argc, char *argv[]);
|
||||
void ProcessDataset(int argc, char *argv[]);
|
||||
void ProcessDelayTimerMin(int argc, char *argv[]);
|
||||
#if OPENTHREAD_ENABLE_DIAG
|
||||
void ProcessDiag(int argc, char *argv[]);
|
||||
#endif // OPENTHREAD_ENABLE_DIAG
|
||||
|
||||
Reference in New Issue
Block a user