Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Homepage FreeRTOS+ Products FreeRTOS Labs Integration Services Contact / Enquiries

FreeRTOS_CLIProcessCommand()

FreeRTOS_CLI.h

BaseType_t FreeRTOS_CLIProcessCommand( int8_t *pcCommandInput, 
                                          int8_t *pcWriteBuffer, 
                                          size_t xWriteBufferLen  );
		

FreeRTOS+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+CLI, and how to implement a FreeRTOS+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.

Parameters:

pcCommandInput   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).
pcWriteBuffer   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.

xWriteBufferLen   The the size of the buffer pointed to by the pcWriteBuffer parameter. Writing more than xWriteBufferLen characters into pcWriteBuffer will cause a buffer overflow.

Returns:

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 page.


Examples

The FreeRTOS+CLI Task Implementation page contains example code that includes a demonstration of how FreeRTOS_CLIProcessCommand() is used.


[ Back to the top ]    [ About FreeRTOS ]    [ FreeRTOS+ Sitemap ]    [ Main FreeRTOS Sitemap ]    [ ]


Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.