-
-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
130 changed files
with
5,205 additions
and
1,859 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule pico-sdk
updated
57 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
Command Processing | ||
================== | ||
|
||
.. highlight:: c++ | ||
|
||
Introduction | ||
------------ | ||
|
||
Command handler provides a common command line interface (CLI). Command line must be text. Commands should be separated with a single character. | ||
CLI can be used with: | ||
|
||
- Serial | ||
- Network (Websockets, Telnet) | ||
|
||
and all communication protocols that are exchanging text data. | ||
|
||
Commands can be added to and removed from the command handler. Each command will trigger a defined Delegate. | ||
|
||
A welcome message may be shown when a user connects and end-of-line (EOL) character may be defined. An automatic "help" display is available. | ||
|
||
For more examples take a look at the | ||
:sample:`CommandLine`, | ||
:sample:`TelnetServer` | ||
and :sample:`HttpServer_WebSockets` | ||
samples. | ||
|
||
|
||
Using | ||
----- | ||
|
||
1. Add these lines to your application componenent.mk file:: | ||
|
||
COMPONENT_DEPENDS += CommandProcessing | ||
|
||
2. Add these lines to your application:: | ||
|
||
#include <CommandProcessing/Utils.h> | ||
|
||
3. Basic example:: | ||
|
||
#include <CommandProcessing/Utils.h> | ||
|
||
CommandProcessing::Handler commandHandler; | ||
void processShutdownCommand(String commandLine, ReadWriteStream& commandOutput) | ||
{ | ||
// ... | ||
} | ||
|
||
void init() | ||
{ | ||
commandHandler.registerSystemCommands(); | ||
commandHandler.registerCommand(CommandProcessing::Command("shutdown", "Shutdown Server Command", "Application", processShutdownCommand)); | ||
} | ||
|
||
API Documentation | ||
----------------- | ||
|
||
.. doxygengroup:: commandhandler | ||
:content-only: | ||
:members: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
COMPONENT_SRCDIRS := \ | ||
src \ | ||
$(call ListAllSubDirs,$(COMPONENT_PATH)/src) \ | ||
|
||
COMPONENT_INCDIRS := $(COMPONENT_SRCDIRS) | ||
|
||
COMPONENT_DOXYGEN_INPUT := src | ||
|
||
COMPONENT_DOCFILES := \ | ||
docs/* |
Empty file.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.