0.01.00
Command Line Interface

This module includes functions that control the Thread stack's execution. More...

Typedefs

typedef int(* otCliConsoleOutputCallback) (const char *aBuf, uint16_t aBufLength, void *aContext)
 This function pointer is called to notify about Console output. More...
 

Functions

void otCliConsoleInit (otInstance *aInstance, otCliConsoleOutputCallback aCallback, void *aContext)
 Initialize the CLI CONSOLE module. More...
 
void otCliConsoleInputLine (char *aBuf, uint16_t aBufLength)
 This method is called to feed in a console input line. More...
 
void otCliUartInit (otInstance *aInstance)
 Initialize the CLI UART module. More...
 
void otCliUartSetUserCommands (const otCliCommand *aUserCommands, uint8_t aLength)
 Set a user command table. More...
 
void otCliUartOutputBytes (const uint8_t *aBytes, uint8_t aLength)
 Write a number of bytes to the CLI console as a hex string. More...
 
void otCliUartOutputFormat (const char *aFmt,...)
 Write formatted string the CLI console. More...
 
void otCliUartAppendResult (otError aError)
 Write error code the CLI console. More...
 
void otCliPlatLogv (otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list ap)
 Callback to write the OpenThread Log to the CLI console. More...
 

Detailed Description

This module includes functions that control the Thread stack's execution.

Typedef Documentation

§ otCliConsoleOutputCallback

typedef int(* otCliConsoleOutputCallback) (const char *aBuf, uint16_t aBufLength, void *aContext)

This function pointer is called to notify about Console output.

Parameters
[in]aBufA pointer to a buffer with an output.
[in]aBufLengthA length of the output data stored in the buffer.
[out]aContextA user context pointer.
Returns
Number of bytes processed by the callback.

Function Documentation

§ otCliConsoleInit()

void otCliConsoleInit ( otInstance aInstance,
otCliConsoleOutputCallback  aCallback,
void *  aContext 
)

Initialize the CLI CONSOLE module.

Parameters
[in]aInstanceThe OpenThread instance structure.
[in]aCallbackA callback method called to process console output.
[in]aContextA user context pointer.

§ otCliConsoleInputLine()

void otCliConsoleInputLine ( char *  aBuf,
uint16_t  aBufLength 
)

This method is called to feed in a console input line.

Parameters
[in]aBufA pointer to a buffer with an input.
[in]aBufLengthA length of the input data stored in the buffer.

§ otCliPlatLogv()

void otCliPlatLogv ( otLogLevel  aLogLevel,
otLogRegion  aLogRegion,
const char *  aFormat,
va_list  ap 
)

Callback to write the OpenThread Log to the CLI console.

Parameters
[in]aLogLevelThe log level.
[in]aLogRegionThe log region.
[in]aFormatA pointer to the format string.
[in]apva_list matching aFormat.

§ otCliUartAppendResult()

void otCliUartAppendResult ( otError  aError)

Write error code the CLI console.

Parameters
[in]aErrorError code value.

§ otCliUartInit()

void otCliUartInit ( otInstance aInstance)

Initialize the CLI UART module.

Parameters
[in]aInstanceThe OpenThread instance structure.

§ otCliUartOutputBytes()

void otCliUartOutputBytes ( const uint8_t *  aBytes,
uint8_t  aLength 
)

Write a number of bytes to the CLI console as a hex string.

Parameters
[in]aBytesA pointer to data which should be printed.
[in]aLengthaBytes length.

§ otCliUartOutputFormat()

void otCliUartOutputFormat ( const char *  aFmt,
  ... 
)

Write formatted string the CLI console.

Parameters
[in]aFmtA pointer to the format string.
[in]...A matching list of arguments.

§ otCliUartSetUserCommands()

void otCliUartSetUserCommands ( const otCliCommand aUserCommands,
uint8_t  aLength 
)

Set a user command table.

Parameters
[in]aUserCommandsA pointer to an array with user commands.
[in]aLengthaUserCommands length.