mirror of
https://github.com/espressif/openthread.git
synced 2026-08-03 09:27:47 +00:00
[neighbor-table] add 'NeighborTable' class (#5354)
This commit adds a `NeighborTable` class which provides helper methods dealing with neighbor, e.g., finding a `Neighbor` (i.e., a `Child` from `ChildTable`, a `Router` from `RouterTable`, or parent or parent candidate entries), or iterating through all neighbors. These methods use the newly added `Neighbor::AddressMacther` to simplify the implementation. The `NeighborTable` methods replace the similar ones in `Mle` and `MleRouter`.
This commit is contained in:
committed by
Jonathan Hui
parent
6c75a53bdc
commit
36b9ecbf11
@@ -304,7 +304,7 @@ otError otThreadGetNextNeighborInfo(otInstance *aInstance, otNeighborInfoIterato
|
||||
|
||||
OT_ASSERT((aInfo != nullptr) && (aIterator != nullptr));
|
||||
|
||||
return instance.Get<Mle::MleRouter>().GetNextNeighborInfo(*aIterator, *static_cast<Neighbor::Info *>(aInfo));
|
||||
return instance.Get<NeighborTable>().GetNextNeighborInfo(*aIterator, *static_cast<Neighbor::Info *>(aInfo));
|
||||
}
|
||||
|
||||
otDeviceRole otThreadGetDeviceRole(otInstance *aInstance)
|
||||
|
||||
Reference in New Issue
Block a user