mirror of
https://github.com/espressif/openthread.git
synced 2026-07-05 20:00:23 +00:00
[mle] add MLE counters (#2982)
This commit adds support for a set of MLE counters (e.g., counters to track number of times device entered different roles, or counters tracking number of attach attempts, partition ID or parent changes).
This commit is contained in:
committed by
Jonathan Hui
parent
abfb16eb7f
commit
144a4e3e06
@@ -524,3 +524,17 @@ const otIpCounters *otThreadGetIp6Counters(otInstance *aInstance)
|
||||
|
||||
return &instance.GetThreadNetif().GetMeshForwarder().GetCounters();
|
||||
}
|
||||
|
||||
const otMleCounters *otThreadGetMleCounters(otInstance *aInstance)
|
||||
{
|
||||
Instance &instance = *static_cast<Instance *>(aInstance);
|
||||
|
||||
return &instance.GetThreadNetif().GetMle().GetCounters();
|
||||
}
|
||||
|
||||
void otThreadResetMleCounters(otInstance *aInstance)
|
||||
{
|
||||
Instance &instance = *static_cast<Instance *>(aInstance);
|
||||
|
||||
instance.GetThreadNetif().GetMle().ResetCounters();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user