mirror of
https://github.com/espressif/openthread.git
synced 2026-07-08 13:20:25 +00:00
Delay a random jitter period prior to request a Router ID for REED. (#554)
* Delay a random jitter period prior to request a Router ID for REED. * Update Cert_5_1_09_REEDAttachConnectivity.py to pass Travis check. * Add CLI to set/get the ROUTER_SELECTION_JITTER and update Certification scripts. - add 'posix-ncp' to allow failure list in .travis.yml.
This commit is contained in:
@@ -120,6 +120,7 @@ const struct Command Interpreter::sCommands[] =
|
||||
{ "router", &Interpreter::ProcessRouter },
|
||||
{ "routerdowngradethreshold", &Interpreter::ProcessRouterDowngradeThreshold },
|
||||
{ "routerrole", &Interpreter::ProcessRouterRole },
|
||||
{ "routerselectionjitter", &Interpreter::ProcessRouterSelectionJitter },
|
||||
{ "routerupgradethreshold", &Interpreter::ProcessRouterUpgradeThreshold },
|
||||
{ "scan", &Interpreter::ProcessScan },
|
||||
{ "singleton", &Interpreter::ProcessSingleton },
|
||||
@@ -1786,6 +1787,25 @@ exit:
|
||||
AppendResult(error);
|
||||
}
|
||||
|
||||
void Interpreter::ProcessRouterSelectionJitter(int argc, char *argv[])
|
||||
{
|
||||
ThreadError error = kThreadError_None;
|
||||
long value;
|
||||
|
||||
if (argc == 0)
|
||||
{
|
||||
sServer->OutputFormat("%d\r\n", otGetRouterSelectionJitter());
|
||||
}
|
||||
else
|
||||
{
|
||||
SuccessOrExit(error = ParseLong(argv[0], value));
|
||||
otSetRouterSelectionJitter(static_cast<uint8_t>(value));
|
||||
}
|
||||
|
||||
exit:
|
||||
AppendResult(error);
|
||||
}
|
||||
|
||||
void Interpreter::ProcessRouterUpgradeThreshold(int argc, char *argv[])
|
||||
{
|
||||
ThreadError error = kThreadError_None;
|
||||
|
||||
Reference in New Issue
Block a user