Skip to content

Commit

Permalink
[docs] added Doxygen tags to 4 CLIs (openthread#9352)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrhodie authored Aug 13, 2023
1 parent 73daf43 commit 68c0565
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions src/cli/cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,31 @@ template <> otError Interpreter::Process<Cmd("version")>(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);
Expand Down Expand Up @@ -7214,13 +7235,34 @@ template <> otError Interpreter::Process<Cmd("uptime")>(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];

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()));
Expand Down

0 comments on commit 68c0565

Please sign in to comment.