Avionics
Core avionics package for CURE flight computers
Loading...
Searching...
No Matches
CommandLine Class Reference

Lightweight UART command-line interface with history and parsing. More...

#include <UARTCommandHandler.h>

Collaboration diagram for CommandLine:
Collaboration graph

Public Member Functions

 CommandLine (Stream *UART)
void addCommand (const std::string &longName, const std::string &shortName, std::function< void(std::queue< std::string > argumentQueue, std::string &)> funcPtr)
void executeCommand (const std::string &command, std::queue< std::string > arugments)
void readInput ()
void processCommand (const std::string &command)
void begin ()
void println (const std::string &message)
void print (const std::string &message)

Detailed Description

Lightweight UART command-line interface with history and parsing.

Note
When to use: add interactive commands for debugging or configuration over a serial terminal without bringing in a full shell.

Definition at line 29 of file UARTCommandHandler.h.

Constructor & Destructor Documentation

◆ CommandLine()

CommandLine::CommandLine ( Stream * UART)

Definition at line 6 of file UARTCommandHandler.cpp.

Member Function Documentation

◆ addCommand()

void CommandLine::addCommand ( const std::string & longName,
const std::string & shortName,
std::function< void(std::queue< std::string > argumentQueue, std::string &)> funcPtr )

Definition at line 191 of file UARTCommandHandler.cpp.

◆ begin()

void CommandLine::begin ( )

Definition at line 9 of file UARTCommandHandler.cpp.

◆ executeCommand()

void CommandLine::executeCommand ( const std::string & command,
std::queue< std::string > arugments )

Definition at line 197 of file UARTCommandHandler.cpp.

◆ print()

void CommandLine::print ( const std::string & message)
inline

Definition at line 43 of file UARTCommandHandler.h.

◆ println()

void CommandLine::println ( const std::string & message)
inline

Definition at line 40 of file UARTCommandHandler.h.

◆ processCommand()

void CommandLine::processCommand ( const std::string & command)

◆ readInput()

void CommandLine::readInput ( )

Definition at line 15 of file UARTCommandHandler.cpp.


The documentation for this class was generated from the following files: