Factory Diagnostics - Thread Stack#

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

Functions#

otDiagProcessCmd(otInstance *aInstance, uint8_t aArgsLength, char *aArgs[], char *aOutput, size_t aOutputMaxLen)

Processes a factory diagnostics command line.

otDiagProcessCmdLine(otInstance *aInstance, const char *aString, char *aOutput, size_t aOutputMaxLen)

Processes a factory diagnostics command line.

bool
otDiagIsEnabled(otInstance *aInstance)

Indicates whether or not the factory diagnostics mode is enabled.

Function Documentation#

otDiagProcessCmd#

otError otDiagProcessCmd (otInstance * aInstance, uint8_t aArgsLength, char * aArgs, char * aOutput, size_t aOutputMaxLen)

Processes a factory diagnostics command line.

Parameters
TypeDirectionArgument NameDescription
otInstance *[in]aInstance

A pointer to an OpenThread instance.

uint8_t[in]aArgsLength

The number of elements in aArgs.

char *[in]aArgs

An array of arguments.

char *[out]aOutput

The diagnostics execution result.

size_t[in]aOutputMaxLen

The output buffer size.

The output of this function (the content written to aOutput) MUST terminate with \0 and the \0 is within the output buffer.


otDiagProcessCmdLine#

otError otDiagProcessCmdLine (otInstance * aInstance, const char * aString, char * aOutput, size_t aOutputMaxLen)

Processes a factory diagnostics command line.

Parameters
TypeDirectionArgument NameDescription
otInstance *[in]aInstance

A pointer to an OpenThread instance.

const char *[in]aString

A NULL-terminated input string.

char *[out]aOutput

The diagnostics execution result.

size_t[in]aOutputMaxLen

The output buffer size.

The output of this function (the content written to aOutput) MUST terminate with \0 and the \0 is within the output buffer.


otDiagIsEnabled#

bool otDiagIsEnabled (otInstance * aInstance)

Indicates whether or not the factory diagnostics mode is enabled.

Parameters
TypeDirectionArgument NameDescription
otInstance *[in]aInstance

A pointer to an OpenThread instance.