Command Handler
Provide command line interface. More...
Classes | |
class | CommandDelegate |
Command delegate class. More... | |
class | CommandHandler |
Command handler class. More... | |
Typedefs | |
using | CommandFunctionDelegate = Delegate< void(String commandLine, CommandOutput *commandOutput)> |
Command delegate function. More... | |
typedef CommandFunctionDelegate | commandFunctionDelegate |
Enumerations | |
enum | VerboseMode { VERBOSE, SILENT } |
Verbose mode. More... | |
Variables | |
CommandHandler | commandHandler |
Global instance of CommandHandler. More... | |
Detailed Description
Provide command line interface.
Command handler provides a common command line interface. CLI is available for the following remote access methods:
- Serial
- Telnet
- Websockets
By default, CLI is disabled. Enable CLI by calling "commandProcessing" on the appropriate access class object, e.g.
Serial.commandProcessing(true)
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 character may be defined. An automatic "help" display is available.
Typedef Documentation
◆ CommandFunctionDelegate
using CommandFunctionDelegate = Delegate<void(String commandLine, CommandOutput* commandOutput)> |
Command delegate function.
- Parameters
-
commandLine Command line entered by user at CLI, including command and parameters commandOutput Pointer to the CLI print stream
- Note
- CommandFunctionDelegate defines the structure of a function that handles individual commands
- Can use standard print functions on commandOutput
◆ commandFunctionDelegate
- Deprecated:
- Use
CommandFunctionDelegate
instead
Enumeration Type Documentation
◆ VerboseMode
enum VerboseMode |
Variable Documentation
◆ commandHandler
CommandHandler commandHandler |
Global instance of CommandHandler.