Command handler class.
More...
#include <CommandHandler.h>
CommandHandler::CommandHandler |
( |
| ) |
|
Get the command delegate for a command.
- Parameters
-
commandString | Command to query |
- Return values
-
char CommandHandler::getCommandEOL |
( |
| ) |
|
Get the end of line character.
- Return values
-
- Note
- Only supports one EOL, unlike Windows
String CommandHandler::getCommandPrompt |
( |
| ) |
|
Get the command line prompt.
- Return values
-
- Note
- This is what is shown on the command line before user input Default is Sming>
String CommandHandler::getCommandWelcomeMessage |
( |
| ) |
|
Get the welcome message.
- Return values
-
String | The welcome message that is shown when clients connect |
- Note
- Only if verbose mode is enabled
Get the verbose mode.
- Return values
-
Add a new command to the command handler.
- Parameters
-
reqDelegate | Command delegate to register |
- Return values
-
- Note
- If command already exists, it will not be replaced and function will fail. Call unregisterCommand first if you want to replace a command.
void CommandHandler::registerSystemCommands |
( |
| ) |
|
Register default system commands.
- Note
- Adds the following system commmands to the command handler
- status
- echo
- help
- debugon
- debugoff
- command
void CommandHandler::setCommandEOL |
( |
char |
reqEOL | ) |
|
Set the end of line character.
- Parameters
-
- Note
- Only supports one EOL, unlike Windows
void CommandHandler::setCommandPrompt |
( |
String |
reqPrompt | ) |
|
Set the command line prompt.
- Parameters
-
reqPrompt | The command line prompt |
- Note
- This is what is shown on the command line before user input Default is Sming>
void CommandHandler::setCommandWelcomeMessage |
( |
String |
reqWelcomeMessage | ) |
|
Set the welcome message.
- Parameters
-
reqWelcomeMessage | The welcome message that is shown when clients connect |
- Note
- Only if verbose mode is enabled
void CommandHandler::setVerboseMode |
( |
VerboseMode |
reqVerboseMode | ) |
|
Set the verbose mode.
- Parameters
-
reqVerboseMode | Verbose mode to set |
Remove a command from the command handler.
reqDelegate Delegate to remove from command handler