-
-
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
1 parent
b6719df
commit 7ba5fdf
Showing
4 changed files
with
68 additions
and
4 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
6 changes: 3 additions & 3 deletions
6
Sming/Components/CommandProcessing/samples/TelnetServer/README.rst
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Arducam | ||
======= | ||
TelnetServer | ||
============ | ||
|
||
A demonstration application for controlling ArduCAM camera modules via web or telnet interface. | ||
A demonstration of a telnet server built using ``CommandProcessing``. |
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,63 @@ | ||
From v4.7 to v5.1 | ||
================= | ||
|
||
.. highlight:: c++ | ||
|
||
Command Processing | ||
------------------ | ||
|
||
The CommandProcessing service has been refactored and moved to a component. | ||
This means that the following classes ``CommandHandler``, ``CommandExecutor`` and ``CommandOutput`` are no longer available. | ||
|
||
|
||
Enabling | ||
~~~~~~~~ | ||
|
||
The command processing component used to be enabled by setting the directive ``ENABLE_CMD_EXECUTOR`` to 1 in your ``component.mk`` file or during compilation. | ||
This has to be replaced with the directive ``COMPONENT_DEPENDS += CommandProcessing`` in your ``component.mk`` file. | ||
|
||
|
||
Including Header Files | ||
~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
To include the command processing headers in your C/C++ application we used to do the following | ||
|
||
For example:: | ||
|
||
#include <Services/CommandProcessing/CommandProcessingDependencies.h> | ||
|
||
becomes:: | ||
|
||
#include <CommandProcessing/Utils.h> | ||
|
||
|
||
Usage | ||
~~~~~ | ||
|
||
There is no longer a global instance of commandHandler. This means that you will need to create one yourself when you need it. | ||
This can be done using the code below:: | ||
|
||
CommandProcessing::CommandHandler commandHandler; | ||
In order to register a command the old example code:: | ||
|
||
commandHandler.registerCommand( | ||
CommandDelegate("example", "Example Command", "Application", processExampleCommand)); | ||
becomes:: | ||
|
||
commandHandler.registerCommand( | ||
CommandProcessing::Command("example", "Example Command", "Application", processExampleCommand)); | ||
HardwareSerial no longer is dependent on CommandProcessing classes. And the following command will no longer work:: | ||
|
||
Serial.commandProcessing(true); | ||
The line above has to be replaced with:: | ||
|
||
CommandProcessing::enable(commandProcessing, Serial); | ||
See the modified samples | ||
:sample:`CommandLine`, | ||
:sample:`TelnetServer` | ||
and :sample:`HttpServer_WebSockets` for details. |
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ For newer versions we have dedicated pages. | |
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
4.7-5.1 | ||
4.6-4.7 | ||
4.5-4.6 | ||
4.4-4.5 | ||
|