mirror of
https://github.com/espressif/openthread.git
synced 2026-08-08 03:37:46 +00:00
[mlr] introduce Mlr namespace and rename types (#13053)
This commit introduces the `Mlr` namespace to encapsulate all Multicast Listener Registration related types and logic, improving overall code organization and readability. The following primary renames were performed: - `MlrManager` to `Mlr::Manager` - `MlrState` to `Mlr::State` - `MlrStatus` to `Mlr::Status` - Constants like `kMlrSuccess` to `Mlr::kStatusSuccess` Additionally, methods within the newly scoped `Mlr::Manager` class have been simplified by removing redundant `Mlr` prefixes (e.g., `SendMlr()` is now `Send()`, `FinishMlr()` is now `Finish()`). External modules and tests have been updated to reference the new scoped names.
This commit is contained in:
@@ -1855,7 +1855,7 @@ Error Mle::ProcessAddressRegistrationTlv(RxInfo &aRxInfo, Child &aChild)
|
||||
Ip6::Address oldDua;
|
||||
#endif
|
||||
#if OPENTHREAD_CONFIG_TMF_PROXY_MLR_ENABLE
|
||||
MlrManager::MlrAddressArray oldMlrRegisteredAddresses;
|
||||
Mlr::Manager::ChildAddressArray oldMlrRegisteredAddresses;
|
||||
#endif
|
||||
|
||||
OT_UNUSED_VARIABLE(storedCount);
|
||||
@@ -1879,7 +1879,7 @@ Error Mle::ProcessAddressRegistrationTlv(RxInfo &aRxInfo, Child &aChild)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (addrEntry.GetMlrState(aChild) == kMlrStateRegistered)
|
||||
if (addrEntry.GetMlrState(aChild) == Mlr::kStateRegistered)
|
||||
{
|
||||
IgnoreError(oldMlrRegisteredAddresses.PushBack(addrEntry));
|
||||
}
|
||||
@@ -1993,7 +1993,7 @@ Error Mle::ProcessAddressRegistrationTlv(RxInfo &aRxInfo, Child &aChild)
|
||||
#endif
|
||||
|
||||
#if OPENTHREAD_CONFIG_TMF_PROXY_MLR_ENABLE
|
||||
Get<MlrManager>().UpdateProxiedSubscriptions(aChild, oldMlrRegisteredAddresses);
|
||||
Get<Mlr::Manager>().UpdateProxiedSubscriptions(aChild, oldMlrRegisteredAddresses);
|
||||
#endif
|
||||
|
||||
if (count == 0)
|
||||
@@ -3855,7 +3855,7 @@ void Mle::SetChildStateToValid(Child &aChild)
|
||||
IgnoreError(mChildTable.StoreChild(aChild));
|
||||
|
||||
#if OPENTHREAD_CONFIG_TMF_PROXY_MLR_ENABLE
|
||||
Get<MlrManager>().UpdateProxiedSubscriptions(aChild, MlrManager::MlrAddressArray());
|
||||
Get<Mlr::Manager>().UpdateProxiedSubscriptions(aChild, Mlr::Manager::ChildAddressArray());
|
||||
#endif
|
||||
|
||||
mNeighborTable.Signal(NeighborTable::kChildAdded, aChild);
|
||||
|
||||
Reference in New Issue
Block a user