[discover-scanner] adding Mle::DiscoverScanner (#5075)

This commit adds new class `DiscoverScanner` which implements the MLE
Discover Scan process (moving and simplifying all the code related to
this from `Mle` and `MeshForwarder` into same file/class).
This commit is contained in:
Abtin Keshavarzian
2020-01-22 17:30:25 -08:00
committed by Jonathan Hui
parent e653478c50
commit 54ad5a3960
15 changed files with 557 additions and 341 deletions
+3 -3
View File
@@ -457,15 +457,15 @@ otError otThreadDiscover(otInstance * aInstance,
{
Instance &instance = *static_cast<Instance *>(aInstance);
return instance.Get<Mle::MleRouter>().Discover(static_cast<Mac::ChannelMask>(aScanChannels), aPanId, aJoiner,
aEnableEui64Filtering, aCallback, aCallbackContext);
return instance.Get<Mle::DiscoverScanner>().Discover(static_cast<Mac::ChannelMask>(aScanChannels), aPanId, aJoiner,
aEnableEui64Filtering, aCallback, aCallbackContext);
}
bool otThreadIsDiscoverInProgress(otInstance *aInstance)
{
Instance &instance = *static_cast<Instance *>(aInstance);
return instance.Get<Mle::MleRouter>().IsDiscoverInProgress();
return instance.Get<Mle::DiscoverScanner>().IsInProgress();
}
const otIpCounters *otThreadGetIp6Counters(otInstance *aInstance)