This module includes functions that control the Thread stack's execution.
Summary
Typedefs |
|
|---|---|
otCliOutputCallback)(void *aContext, const char *aFormat, va_list aArguments)
|
typedef
Pointer is called to notify about Console output. |
Functions |
|
|---|---|
otCliAppendResult(otError aError)
|
Write error code to the CLI console. |
otCliInit(otInstance *aInstance, otCliOutputCallback aCallback, void *aContext)
|
Initialize the CLI module. |
otCliInputLine(char *aBuf)
|
Is called to feed in a console input line. |
otCliOutputBytes(const uint8_t *aBytes, uint8_t aLength)
|
Write a number of bytes to the CLI console as a hex string. |
otCliOutputFormat(const char *aFmt, ...)
|
Write formatted string to the CLI console. |
otCliPlatLogv(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list aArgs)
|
Callback to write the OpenThread Log to the CLI console. |
otCliSetUserCommands(const otCliCommand *aUserCommands, uint8_t aLength, void *aContext)
|
Set a user command table. |
otCliVendorSetUserCommands(void)
|
Callback to allow vendor specific commands to be added to the user command table. |
Typedefs
otCliOutputCallback
int(* otCliOutputCallback)(void *aContext, const char *aFormat, va_list aArguments)
Pointer is called to notify about Console output.
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters |
|
||||||
| Returns |
Number of bytes written by the callback. |
||||||
Functions
otCliAppendResult
void otCliAppendResult( otError aError )
Write error code to the CLI console.
If the aError is OT_ERROR_PENDING nothing will be outputted.
| Details | |||
|---|---|---|---|
| Parameters |
|
||
otCliInit
void otCliInit( otInstance *aInstance, otCliOutputCallback aCallback, void *aContext )
Initialize the CLI module.
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters |
|
||||||
otCliInputLine
void otCliInputLine( char *aBuf )
Is called to feed in a console input line.
| Details | |||
|---|---|---|---|
| Parameters |
|
||
otCliOutputBytes
void otCliOutputBytes( const uint8_t *aBytes, uint8_t aLength )
Write a number of bytes to the CLI console as a hex string.
| Details | |||||
|---|---|---|---|---|---|
| Parameters |
|
||||
otCliOutputFormat
void otCliOutputFormat( const char *aFmt, ... )
Write formatted string to the CLI console.
| Details | |||||
|---|---|---|---|---|---|
| Parameters |
|
||||
otCliPlatLogv
void otCliPlatLogv( otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list aArgs )
Callback to write the OpenThread Log to the CLI console.
| Details | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Parameters |
|
||||||||
otCliSetUserCommands
otError otCliSetUserCommands( const otCliCommand *aUserCommands, uint8_t aLength, void *aContext )
Set a user command table.
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters |
|
||||||
| Return Values |
|
||||||
otCliVendorSetUserCommands
void otCliVendorSetUserCommands( void )
Callback to allow vendor specific commands to be added to the user command table.
Available when OPENTHREAD_CONFIG_CLI_VENDOR_COMMANDS_ENABLE is enabled and OPENTHREAD_CONFIG_CLI_MAX_USER_CMD_ENTRIES is greater than 1.
Resources
OpenThread API Reference topics originate from the source code, available on GitHub. For more information, or to contribute to our documentation, refer to Resources.