mirror of
https://github.com/espressif/openthread.git
synced 2026-09-04 08:10:11 +00:00
[radio] add radio statistics of tx/rx/sleep cycle (#9071)
This commit implements time counting in radio to collect the time when radio is in sleep/tx/rx time. 2 new APIs are added to get and reset the statistics. This feature is only available on FTD and MTD. This PR also adds cli commands to call the APIs on example cli firmware. This feature is by default disabled in OT core config. It's enabled on simulation platform by default now. Regarding implementation, this feature is totally implemented by software. It uses a simplified model to calculate the time. It may not be very accurate, but it should be enough to give us an overview of the time.
This commit is contained in:
@@ -285,4 +285,15 @@
|
||||
#define OPENTHREAD_CONFIG_PLATFORM_POWER_CALIBRATION_ENABLE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_RADIO_STATS_ENABLE
|
||||
*
|
||||
* Set to 1 to enable support for Radio Statistics. Note that this option only works for OPENTHREAD_FTD and
|
||||
* OPENTHREAD_MTD.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_RADIO_STATS_ENABLE
|
||||
#define OPENTHREAD_CONFIG_RADIO_STATS_ENABLE 1
|
||||
#endif
|
||||
|
||||
#endif // OPENTHREAD_CORE_SIMULATION_CONFIG_H_
|
||||
|
||||
Reference in New Issue
Block a user