[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:
Li Cao
2023-06-15 04:30:02 +08:00
committed by GitHub
parent 0178ac83e5
commit 4b0b93ad00
21 changed files with 593 additions and 14 deletions

View File

@ -446,7 +446,7 @@ do_expect()
fi
fi
else
test_patterns=(-name 'cli-*.exp' -o -name 'simulation-*.exp')
test_patterns=(-name 'cli-*.exp' -o -name 'simulation-*.exp' -o -name 'cli_non_rcp-*.exp')
fi
if [[ $# != 0 ]]; then