nRF5 SDK for Thread and Zigbee v1.0.0
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
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)
 

Functions

void otCliConsoleInit (otInstance *aInstance, otCliConsoleOutputCallback aCallback, void *aContext)
 
void otCliConsoleInputLine (char *aBuf, uint16_t aBufLength)
 
void otCliUartInit (otInstance *aInstance)
 
void otCliUartSetUserCommands (const otCliCommand *aUserCommands, uint8_t aLength)
 
void otCliUartOutputBytes (const uint8_t *aBytes, uint8_t aLength)
 
void otCliUartOutputFormat (const char *aFmt,...)
 
void otCliUartAppendResult (otError aError)
 
void otCliPlatLogv (otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list aArgs)
 

Detailed Description

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

Typedef Documentation

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

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.
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.
void otCliPlatLogv ( otLogLevel  aLogLevel,
otLogRegion  aLogRegion,
const char *  aFormat,
va_list  aArgs 
)

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]aArgsva_list matching aFormat.
void otCliUartAppendResult ( otError  aError)

Write error code the CLI console

Parameters
[in]aErrorError code value.
void otCliUartInit ( otInstance aInstance)

Initialize the CLI UART module.

Parameters
[in]aInstanceThe OpenThread instance structure.
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.
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.
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.