mirror of
https://github.com/espressif/openthread.git
synced 2026-09-20 07:57:41 +00:00
[link] add public OT API otLinkResetCounters to reset MAC counters (#4286)
This commit is contained in:
committed by
Jonathan Hui
parent
bf03f40bd7
commit
7d80c16df8
@@ -751,6 +751,14 @@ int8_t otLinkConvertLinkQualityToRss(otInstance *aInstance, uint8_t aLinkQuality
|
||||
*/
|
||||
const otMacCounters *otLinkGetCounters(otInstance *aInstance);
|
||||
|
||||
/**
|
||||
* Reset the MAC layer counters.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
*
|
||||
*/
|
||||
void otLinkResetCounters(otInstance *aInstance);
|
||||
|
||||
/**
|
||||
* This function pointer is called when an IEEE 802.15.4 frame is received.
|
||||
*
|
||||
|
||||
@@ -371,6 +371,13 @@ const otMacCounters *otLinkGetCounters(otInstance *aInstance)
|
||||
return &instance.Get<Mac::Mac>().GetCounters();
|
||||
}
|
||||
|
||||
void otLinkResetCounters(otInstance *aInstance)
|
||||
{
|
||||
Instance &instance = *static_cast<Instance *>(aInstance);
|
||||
|
||||
instance.Get<Mac::Mac>().ResetCounters();
|
||||
}
|
||||
|
||||
otError otLinkActiveScan(otInstance * aInstance,
|
||||
uint32_t aScanChannels,
|
||||
uint16_t aScanDuration,
|
||||
|
||||
Reference in New Issue
Block a user