mirror of
https://github.com/espressif/openthread.git
synced 2026-07-19 10:34:07 +00:00
[mle] simplify Start(), Stop(), and SendAnnounce() (#6986)
This commit updates `Start()`, `Stop()` and `SendAnnounce()` in `Mle` to remove the extra parameters from the `public` versions of these methods (adding a `private` version with extra parameter for use by `Mle` class itself). It also adds `StartMode`, `StopMode`, and `AnnounceMode` enumerations to use as parameter type (instead of `bool`) in these methods which helps with code readability.
This commit is contained in:
committed by
GitHub
parent
db3c64410b
commit
9e631d816e
@@ -481,11 +481,11 @@ otError otThreadSetEnabled(otInstance *aInstance, bool aEnabled)
|
||||
|
||||
if (aEnabled)
|
||||
{
|
||||
error = instance.Get<Mle::MleRouter>().Start(/* aAnnounceAttach */ false);
|
||||
error = instance.Get<Mle::MleRouter>().Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
instance.Get<Mle::MleRouter>().Stop(true);
|
||||
instance.Get<Mle::MleRouter>().Stop();
|
||||
}
|
||||
|
||||
return error;
|
||||
|
||||
Reference in New Issue
Block a user