mirror of
https://github.com/espressif/openthread.git
synced 2026-08-18 08:29:52 +00:00
[mle-router] add RouterRoleTransition nested class (#9490)
This commit adds `RouterRoleTransition` nested class to `MleRouter`. This class tracks the timeout and jitter intervals for router role transitions, i.e., device upgrading to router role from REED or downgrading from router to REED. It provides helper methods like `IsPending()` and `StartTimeout()` to check if role transition is pending or to start the timeout countdown. These methods help to simplify the code and make it more readable.
This commit is contained in:
@@ -334,7 +334,7 @@ void DuaManager::HandleNotifierEvents(Events aEvents)
|
||||
else if (mle.IsExpectedToBecomeRouterSoon())
|
||||
{
|
||||
// Will check again in case the device decides to stay REED when jitter timeout expires.
|
||||
UpdateRegistrationDelay(mle.GetRouterSelectionJitterTimeout() + kNewRouterRegistrationDelay + 1);
|
||||
UpdateRegistrationDelay(mle.GetRouterRoleTransitionTimeout() + kNewRouterRegistrationDelay + 1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user