![]() |
Open FFBoard
Open source force feedback firmware
|
#include <CommandInterface.h>
Public Member Functions | |
| StringCommandInterface (uint32_t bufferMaxCapacity=512) | |
| bool | addBuf (char *Buf, uint32_t *Len) |
| uint32_t | bufferCapacity () |
| bool | getNewCommands (std::vector< ParsedCommand > &commands) override |
| const std::string | getHelpstring () |
Public Member Functions inherited from CommandInterface | |
| CommandInterface () | |
| virtual | ~CommandInterface () |
| virtual bool | hasNewCommands () |
| virtual void | sendReplies (const std::vector< CommandResult > &results, CommandInterface *originalInterface)=0 |
| virtual void | sendReplyAsync (std::vector< CommandReply > &reply, CommandHandler *handler, uint32_t cmdId, CMDtype type) |
| virtual bool | readyToSend () |
| virtual void | batchDone () |
Static Public Member Functions | |
| static void | formatReply (std::string &reply, const std::vector< CommandResult > &results, const bool formatWriteAsRead=false) |
| static std::string | formatOriginalCommandFromResult (const ParsedCommand &originalCommand, CommandHandler *commandHandler, const bool formatWriteAsRead=false) |
| static void | generateReplyValueString (std::string &replyPart, const CommandReply &reply) |
| static void | generateReplyFromCmd (std::string &replyPart, const ParsedCommand &originalCommand) |
Static Public Member Functions inherited from CommandInterface | |
| static CommandResult | makeCommandReply (const std::vector< CommandReply > &reply, CommandHandler *handler, uint32_t cmdId, CMDtype type=CMDtype::get, CommandInterface *originalInterface=nullptr) |
| static void | broadcastCommandReplyAsync (const std::vector< CommandReply > &reply, CommandHandler *handler, uint32_t cmdId, CMDtype type=CMDtype::get) |
Protected Attributes | |
| CmdParser | parser |
Protected Attributes inherited from CommandInterface | |
| bool | parserReady = false |
Additional Inherited Members | |
Static Public Attributes inherited from CommandInterface | |
| static std::vector< CommandInterface * > | cmdInterfaces |
Helper class for string based interfaces
Definition at line 46 of file CommandInterface.h.
|
inline |
Definition at line 48 of file CommandInterface.h.
| bool StringCommandInterface::addBuf | ( | char * | Buf, |
| uint32_t * | Len ) |
Definition at line 105 of file CommandInterface.cpp.
| uint32_t StringCommandInterface::bufferCapacity | ( | ) |
Definition at line 114 of file CommandInterface.cpp.
|
static |
Formats a command string from a reply result
Definition at line 166 of file CommandInterface.cpp.
|
static |
Definition at line 118 of file CommandInterface.cpp.
|
static |
Definition at line 225 of file CommandInterface.cpp.
|
static |
Creates the value part of the reply string
Definition at line 210 of file CommandInterface.cpp.
|
inlinevirtual |
Reimplemented from CommandInterface.
Reimplemented in UART_CommandInterface.
Definition at line 56 of file CommandInterface.h.
|
overridevirtual |
Implements CommandInterface.
Definition at line 96 of file CommandInterface.cpp.
|
protected |
Definition at line 60 of file CommandInterface.h.