![]() |
Open FFBoard
Open source force feedback firmware
|
#include <CommandInterface.h>
Public Member Functions | |
CommandInterface () | |
virtual | ~CommandInterface () |
virtual const std::string | getHelpstring () |
virtual bool | getNewCommands (std::vector< ParsedCommand > &commands)=0 |
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 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) |
Static Public Attributes | |
static std::vector< CommandInterface * > | cmdInterfaces |
Protected Attributes | |
bool | parserReady = false |
Different command interface implementations
Definition at line 24 of file CommandInterface.h.
CommandInterface::CommandInterface | ( | ) |
Definition at line 18 of file CommandInterface.cpp.
|
virtual |
Definition at line 22 of file CommandInterface.cpp.
|
virtual |
Command thread signals that all commands in this batch are done
Reimplemented in CDC_CommandInterface, and UART_CommandInterface.
Definition at line 85 of file CommandInterface.cpp.
|
static |
Broadcasts an unrequested reply to all command interfaces
Definition at line 30 of file CommandInterface.cpp.
|
inlinevirtual |
Reimplemented in StringCommandInterface, CDC_CommandInterface, UART_CommandInterface, and HID_CommandInterface.
Definition at line 30 of file CommandInterface.h.
|
pure virtual |
Implemented in HID_CommandInterface, and StringCommandInterface.
|
virtual |
Command thread requests new commands Return true if any are ready, false otherwise If true it will request the vector of parsed commands
Definition at line 70 of file CommandInterface.cpp.
|
static |
Definition at line 47 of file CommandInterface.cpp.
|
virtual |
Returns true if it can send replies. False if the command thread should wait until previous replies are processed
Reimplemented in UART_CommandInterface, HID_CommandInterface, and CDC_CommandInterface.
Definition at line 78 of file CommandInterface.cpp.
|
pure virtual |
Implemented in HID_CommandInterface, CDC_CommandInterface, and UART_CommandInterface.
|
virtual |
Sends an unrequested reply to this specific interface
Definition at line 42 of file CommandInterface.cpp.
|
static |
Definition at line 26 of file CommandInterface.h.
|
protected |
Definition at line 40 of file CommandInterface.h.