#include <CommandInterface.h>
|
| UART_CommandInterface (uint32_t baud=115200) |
|
virtual | ~UART_CommandInterface () |
|
void | Run () |
|
void | sendReplies (const std::vector< CommandResult > &results, CommandInterface *originalInterface) override |
|
void | uartRcv (char &buf) |
|
bool | readyToSend () |
|
const std::string | getHelpstring () |
|
void | batchDone () override |
|
| UARTDevice () |
|
| UARTDevice (UARTPort &port) |
|
virtual | ~UARTDevice () |
|
virtual void | startUartTransfer (UARTPort *port, bool transmit) |
|
virtual void | endUartTransfer (UARTPort *port, bool transmit) |
|
| Thread (const std::string Name, uint16_t StackDepth, UBaseType_t Priority) |
|
| Thread (const char *Name, uint16_t StackDepth, UBaseType_t Priority) |
|
| Thread (uint16_t StackDepth, UBaseType_t Priority) |
|
bool | Start () |
|
virtual | ~Thread () |
|
TaskHandle_t | GetHandle () |
|
void | Suspend () |
|
void | Resume () |
|
void | ResumeFromISR () |
|
void | Notify () |
|
void | NotifyFromISR () |
|
uint32_t | WaitForNotification (TickType_t Timeout=portMAX_DELAY) |
|
UBaseType_t | GetPriority () |
|
UBaseType_t | GetPriorityFromISR () |
|
void | SetPriority (UBaseType_t NewPriority) |
|
std::string | GetName () |
|
char * | GetName () |
|
Public Member Functions inherited from StringCommandInterface |
| StringCommandInterface (uint32_t bufferMaxCapacity=512) |
|
bool | addBuf (char *Buf, uint32_t *Len) |
|
uint32_t | bufferCapacity () |
|
bool | getNewCommands (std::vector< ParsedCommand > &commands) override |
|
Public Member Functions inherited from CommandInterface |
| CommandInterface () |
|
virtual | ~CommandInterface () |
|
virtual bool | hasNewCommands () |
|
virtual void | sendReplyAsync (std::vector< CommandReply > &reply, CommandHandler *handler, uint32_t cmdId, CMDtype type) |
|
|
static void | Yield () |
|
static void | StartScheduler () |
|
static void | EndScheduler () |
|
Static Public Member Functions inherited from StringCommandInterface |
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) |
|
Static Public Attributes inherited from CommandInterface |
static std::vector< CommandInterface * > | cmdInterfaces |
|
virtual void | Cleanup () |
|
void | Delay (const TickType_t Delay) |
|
void | DelayUntil (const TickType_t Period) |
|
void | ResetDelayUntil () |
|
bool | Wait (ConditionVariable &Cv, Mutex &CvLock, TickType_t Timeout=portMAX_DELAY) |
|
UARTPort * | uartport = nullptr |
|
Protected Attributes inherited from StringCommandInterface |
CmdParser | parser |
|
Protected Attributes inherited from CommandInterface |
bool | parserReady = false |
|
Definition at line 91 of file CommandInterface.h.
◆ UART_CommandInterface()
UART_CommandInterface::UART_CommandInterface |
( |
uint32_t |
baud = 115200 | ) |
|
◆ ~UART_CommandInterface()
UART_CommandInterface::~UART_CommandInterface |
( |
| ) |
|
|
virtual |
◆ batchDone()
void UART_CommandInterface::batchDone |
( |
| ) |
|
|
overridevirtual |
◆ getHelpstring()
const std::string UART_CommandInterface::getHelpstring |
( |
| ) |
|
|
inlinevirtual |
◆ readyToSend()
bool UART_CommandInterface::readyToSend |
( |
| ) |
|
|
virtual |
◆ Run()
void UART_CommandInterface::Run |
( |
| ) |
|
|
virtual |
Implementation of your actual thread code. You must override this function.
- Note
- If INCLUDE_vTaskDelete is defined, then you may return from your Run method. This will cause the task to be deleted from FreeRTOS, however you are still responsible to delete the task object. If this is not defined, then retuning from your Run() method will result in an assert.
Implements cpp_freertos::Thread.
Definition at line 350 of file CommandInterface.cpp.
◆ sendReplies()
◆ uartRcv()
void UART_CommandInterface::uartRcv |
( |
char & |
buf | ) |
|
|
virtual |
◆ baud
uint32_t UART_CommandInterface::baud = 115200 |
|
private |
◆ bufferLength
uint32_t UART_CommandInterface::bufferLength = 0 |
|
private |
◆ enableBroadcastFromOtherInterfaces
bool UART_CommandInterface::enableBroadcastFromOtherInterfaces = false |
|
private |
◆ maxSendBuffer
const uint32_t UART_CommandInterface::maxSendBuffer = 512 |
|
private |
◆ nextFormat
bool UART_CommandInterface::nextFormat = false |
|
private |
◆ parserTimeout
const uint32_t UART_CommandInterface::parserTimeout = 2000 |
|
private |
◆ resultsBuffer
◆ sendBuffer
std::string UART_CommandInterface::sendBuffer |
|
private |
◆ uartconfig
UART_InitTypeDef UART_CommandInterface::uartconfig |
|
private |
The documentation for this class was generated from the following files: