Verbose mode.
More...
#include <Handler.h>
Verbose mode.
Command handler class
◆ Handler() [1/3]
CommandProcessing::Handler::Handler |
( |
| ) |
|
Instantiate a CommandHandler.
◆ Handler() [2/3]
◆ Handler() [3/3]
CommandProcessing::Handler::Handler |
( |
const Handler & |
rhs | ) |
|
|
delete |
◆ ~Handler()
CommandProcessing::Handler::~Handler |
( |
| ) |
|
|
inline |
◆ getCommandDelegate()
Command CommandProcessing::Handler::getCommandDelegate |
( |
const String & |
commandString | ) |
|
Get the command delegate for a command.
- Parameters
-
- Return values
-
CommandDelegate | The command delegate matching the command |
◆ getCommandEOL()
char CommandProcessing::Handler::getCommandEOL |
( |
| ) |
const |
|
inline |
Get the end of line character.
- Return values
-
- Note
- Only supports one EOL, unlike Windows
◆ getCommandPrompt()
const String& CommandProcessing::Handler::getCommandPrompt |
( |
| ) |
const |
|
inline |
Get the command line prompt.
- Return values
-
- Note
- This is what is shown on the command line before user input Default is Sming>
◆ getCommandWelcomeMessage()
const String& CommandProcessing::Handler::getCommandWelcomeMessage |
( |
| ) |
const |
|
inline |
Get the welcome message.
- Return values
-
String | The welcome message that is shown when clients connect |
- Note
- Only if verbose mode is enabled
◆ getOutputStream()
◆ isVerbose()
bool CommandProcessing::Handler::isVerbose |
( |
| ) |
const |
|
inline |
Get the verbose mode.
- Return values
-
◆ process() [1/2]
size_t CommandProcessing::Handler::process |
( |
char |
charToWrite | ) |
|
◆ process() [2/2]
size_t CommandProcessing::Handler::process |
( |
const char * |
buffer, |
|
|
size_t |
size |
|
) |
| |
|
inline |
Write chars to stream.
- Parameters
-
buffer | Pointer to buffer to write to the stream |
size | Quantity of chars to write |
- Return values
-
size_t | Quantity of chars processed |
◆ processNow()
String CommandProcessing::Handler::processNow |
( |
const char * |
buffer, |
|
|
size_t |
size |
|
) |
| |
◆ registerCommand()
bool CommandProcessing::Handler::registerCommand |
( |
Command |
reqDelegate | ) |
|
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.
◆ registerSystemCommands()
void CommandProcessing::Handler::registerSystemCommands |
( |
| ) |
|
Register default system commands.
- Note
- Adds the following system commands to the command handler
- status
- echo
- help
- debugon
- debugoff
- command
◆ setCommandEOL()
void CommandProcessing::Handler::setCommandEOL |
( |
char |
reqEOL | ) |
|
|
inline |
Set the end of line character.
- Parameters
-
- Note
- Only supports one EOL, unlike Windows
◆ setCommandPrompt()
void CommandProcessing::Handler::setCommandPrompt |
( |
const String & |
reqPrompt | ) |
|
|
inline |
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>
◆ setCommandWelcomeMessage()
void CommandProcessing::Handler::setCommandWelcomeMessage |
( |
const String & |
reqWelcomeMessage | ) |
|
|
inline |
Set the welcome message.
- Parameters
-
reqWelcomeMessage | The welcome message that is shown when clients connect |
- Note
- Only if verbose mode is enabled
◆ setOutputStream()
void CommandProcessing::Handler::setOutputStream |
( |
ReadWriteStream * |
stream, |
|
|
bool |
owned = true |
|
) |
| |
|
inline |
sets the output stream
- Parameters
-
stream | pointer to the output stream |
owned | specifies if the output stream should be deleted in this class(owned=true) |
◆ setVerbose()
void CommandProcessing::Handler::setVerbose |
( |
bool |
mode | ) |
|
|
inline |
Set the verbose mode.
- Parameters
-
reqVerboseMode | Verbose mode to set |
◆ unregisterCommand()
bool CommandProcessing::Handler::unregisterCommand |
( |
Command |
reqDelegate | ) |
|
Remove a command from the command handler.
reqDelegate Delegate to remove from command handler
The documentation for this class was generated from the following file: