BaseType_t FreeRTOS_CLIProcessCommand( char *pcCommandInput,
size_t xWriteBufferLen );
FreeRTOS-Plus-CLI is an extensible framework that allows the application writer
to define and register their own command line input commands. Separate
documentation pages are provided that describe
how to write a function
that implements the behaviour of a user defined command,
how to registers user defined commands with FreeRTOS-Plus-CLI,
and how to implement a FreeRTOS-Plus-CLI task.
This page describes the FreeRTOS_CLIProcessCommand() function.
FreeRTOS_CLIProcessCommand() is the API function that takes the string entered
by the user at the command prompt, and if the string matches a
registered command, executes the function that implements the command behaviour.
The complete input string, exactly as entered by the user at the command prompt (which might
be a UART console, keyboard, telnet client, or other user input client).
If pcCommandInput does not contain a correctly formatted
command, then FreeRTOS_CLIProcessCommand() will output
a null terminated error message into the pcWriteBuffer buffer.
If pcCommandInput does contain a correctly formatted
command, then FreeRTOS_CLIProcessCommand() will execute
the function that implements the command behaviour,
which will place its generated output into
the pcWriteBuffer buffer.
The size of the buffer pointed to by the pcWriteBuffer
parameter. Writing more than xWriteBufferLen characters
into pcWriteBuffer will cause a buffer overflow.
FreeRTOS_CLIProcessCommand() executes a function that implements the
behaviour of a command, and returns the value returned by the function
it executed. These values are described on the
Implementing a Command
FreeRTOS-Plus-CLI Task Implementation
page contains example code that includes a demonstration of how FreeRTOS_CLIProcessCommand() is used.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.