mirror of
https://github.com/espressif/openthread.git
synced 2026-06-05 21:14:49 +00:00
5783555d4c
This commit introduces a structured state machine to `Mlr::Manager` to coordinate Multicast Listener Registration (MLR) activities more efficiently. The previous implementation relied on independent delay variables and the global `TimeTicker`, which could lead to redundant or premature registrations, especially when a Primary Backbone Router (PBBR) was newly discovered or updated. The new state machine (`kStateStopped`, `kStateIdle`, `kStateToRegisterAll`, `kStateRegistering`, `kStateRegistered`, `kStateNewAddrToRegister`) provides explicit transitions for the entire MLR lifecycle. This ensures that registrations are properly aggregated and that periodic renewals are correctly rescheduled after successful out-of-band registrations. Additionally, the manager now uses a dedicated `TimerMilli` instead of `TimeTicker`, reducing system-wide overhead and providing more precise timing control.