From 68c05650eeea45a6cd55caf7c62e6b602cc94644 Mon Sep 17 00:00:00 2001 From: jrhodie <139580534+jrhodie@users.noreply.github.com> Date: Sun, 13 Aug 2023 14:41:43 -0700 Subject: [PATCH] [docs] added Doxygen tags to 4 CLIs (#9352) --- src/cli/cli.cpp | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/src/cli/cli.cpp b/src/cli/cli.cpp index 6c12e432426..dcc87e801ff 100644 --- a/src/cli/cli.cpp +++ b/src/cli/cli.cpp @@ -237,10 +237,31 @@ template <> otError Interpreter::Process(Arg aArgs[]) { otError error = OT_ERROR_NONE; + /** + * @cli version + * @code + * version + * OPENTHREAD/gf4f2f04; Jul 1 2016 17:00:09 + * Done + * @endcode + * @par api_copy + * #otGetVersionString + */ if (aArgs[0].IsEmpty()) { OutputLine("%s", otGetVersionString()); } + + /** + * @cli version api + * @code + * version api + * 28 + * Done + * @endcode + * @par + * Prints the API version number. + */ else if (aArgs[0] == "api") { OutputLine("%u", OPENTHREAD_API_VERSION); @@ -7214,6 +7235,16 @@ template <> otError Interpreter::Process(Arg aArgs[]) { otError error = OT_ERROR_NONE; + /** + * @cli uptime + * @code + * uptime + * 12:46:35.469 + * Done + * @endcode + * @par api_copy + * #otInstanceGetUptimeAsString + */ if (aArgs[0].IsEmpty()) { char string[OT_UPTIME_STRING_SIZE]; @@ -7221,6 +7252,17 @@ template <> otError Interpreter::Process(Arg aArgs[]) otInstanceGetUptimeAsString(GetInstancePtr(), string, sizeof(string)); OutputLine("%s", string); } + + /** + * @cli uptime ms + * @code + * uptime ms + * 426238 + * Done + * @endcode + * @par api_copy + * #otInstanceGetUptime + */ else if (aArgs[0] == "ms") { OutputUint64Line(otInstanceGetUptime(GetInstancePtr()));