CommandProcessing/src/CommandProcessing/Handler.h
Go to the documentation of this file.
CommandLine commandLine
Command delegate class.
Definition: CommandProcessing/src/CommandProcessing/Command.h:80
Command handler class.
Definition: CommandProcessing/src/CommandProcessing/Handler.h:28
~Handler()
Definition: CommandProcessing/src/CommandProcessing/Handler.h:43
ReadWriteStream & getOutputStream()
Definition: CommandProcessing/src/CommandProcessing/Handler.h:67
void registerSystemCommands()
Register default system commands.
Handler(ReadWriteStream *stream, bool owned=true)
Definition: CommandProcessing/src/CommandProcessing/Handler.h:37
void setCommandWelcomeMessage(const String &message)
Set the welcome message.
Definition: CommandProcessing/src/CommandProcessing/Handler.h:201
void setVerbose(bool mode)
Set the verbose mode.
Definition: CommandProcessing/src/CommandProcessing/Handler.h:148
String processNow(const char *buffer, size_t size)
Process command input and return response text.
void setCommandPrompt(const String &prompt)
Set the command line prompt.
Definition: CommandProcessing/src/CommandProcessing/Handler.h:165
bool isVerbose() const
Get the verbose mode.
Definition: CommandProcessing/src/CommandProcessing/Handler.h:140
bool registerCommand(const Command &command)
Add a new command to the command handler.
Command getCommand(const String &name) const
Find command object.
char getCommandEOL() const
Get the end of line character.
Definition: CommandProcessing/src/CommandProcessing/Handler.h:175
void setCommandEOL(char eol)
Set the end of line character.
Definition: CommandProcessing/src/CommandProcessing/Handler.h:185
String getCommandPrompt() const
Get the command line prompt.
void setOutputStream(ReadWriteStream *stream, bool owned=true)
sets the output stream
Definition: CommandProcessing/src/CommandProcessing/Handler.h:57
Handler()
Instantiate a CommandHandler.
Definition: CommandProcessing/src/CommandProcessing/Handler.h:33
size_t process(const char *buffer, size_t size)
Write chars to stream.
Definition: CommandProcessing/src/CommandProcessing/Handler.h:84
String getCommandWelcomeMessage() const
Get the welcome message.
Handler(const Handler &rhs)=delete
bool unregisterCommand(const Command &command)
Remove a command from the command handler.
size_t process(char charToWrite)
Definition: CommandProcessing/src/CommandProcessing/Command.h:30
constexpr size_t MAX_COMMANDSIZE
Definition: CommandProcessing/src/CommandProcessing/Handler.h:24