Command Line Interface#
This module includes functions that control the Thread stack's execution.
Modules#
Typedefs#
Pointer is called to notify about Console output.
Functions#
Initialize the CLI module.
Is called to feed in a console input line.
Set a user command table.
Write a number of bytes to the CLI console as a hex string.
Write formatted string to the CLI console.
Write error code to the CLI console.
Callback to write the OpenThread Log to the CLI console.
Callback to allow vendor specific commands to be added to the user command table.
Typedef Documentation#
otCliOutputCallback#
typedef int(* otCliOutputCallback) (void *aContext, const char *aFormat, va_list aArguments) )(void *aContext, const char *aFormat, va_list aArguments)
Pointer is called to notify about Console output.
[out] | aContext | A user context pointer. |
[in] | aFormat | The format string. |
[in] | aArguments | The format string arguments. |
Returns
Number of bytes written by the callback.
80
of file include/openthread/cli.h
otCliCommand#
typedef struct otCliCommand otCliCommand
10
of file doxygen_overrides.txt
Function Documentation#
otCliInit#
void otCliInit (otInstance * aInstance, otCliOutputCallback aCallback, void * aContext)
Initialize the CLI module.
[in] | aInstance | The OpenThread instance structure. |
[in] | aCallback | A callback method called to process CLI output. |
[in] | aContext | A user context pointer. |
90
of file include/openthread/cli.h
otCliInputLine#
void otCliInputLine (char * aBuf)
Is called to feed in a console input line.
[in] | aBuf | A pointer to a null-terminated string. |
98
of file include/openthread/cli.h
otCliSetUserCommands#
otError otCliSetUserCommands (const otCliCommand * aUserCommands, uint8_t aLength, void * aContext)
Set a user command table.
[in] | aUserCommands | A pointer to an array with user commands. |
[in] | aLength |
|
[in] | aContext |
|
110
of file include/openthread/cli.h
otCliOutputBytes#
void otCliOutputBytes (const uint8_t * aBytes, uint8_t aLength)
Write a number of bytes to the CLI console as a hex string.
[in] | aBytes | A pointer to data which should be printed. |
[in] | aLength |
|
119
of file include/openthread/cli.h
otCliOutputFormat#
void otCliOutputFormat (const char * aFmt, ... )
Write formatted string to the CLI console.
[in] | aFmt | A pointer to the format string. |
[in] | A matching list of arguments. |
128
of file include/openthread/cli.h
otCliAppendResult#
void otCliAppendResult (otError aError)
Write error code to the CLI console.
[in] | aError | Error code value. |
If the aError
is OT_ERROR_PENDING
nothing will be outputted.
138
of file include/openthread/cli.h
otCliPlatLogv#
void otCliPlatLogv (otLogLevel aLogLevel, otLogRegion aLogRegion, const char * aFormat, va_list aArgs)
Callback to write the OpenThread Log to the CLI console.
[in] | aLogLevel | The log level. |
[in] | aLogRegion | The log region. |
[in] | aFormat | A pointer to the format string. |
[in] | aArgs | va_list matching aFormat. |
149
of file include/openthread/cli.h
otCliVendorSetUserCommands#
void otCliVendorSetUserCommands (void )
Callback to allow vendor specific commands to be added to the user command table.
N/A |
Available when OPENTHREAD_CONFIG_CLI_VENDOR_COMMANDS_ENABLE
is enabled and OPENTHREAD_CONFIG_CLI_MAX_USER_CMD_ENTRIES
is greater than 1.
158
of file include/openthread/cli.h