33 void addCommand(
const std::string& longName,
const std::string& shortName, std::function<
void(std::queue<std::string> argumentQueue ,std::string&)> funcPtr);
34 void executeCommand(
const std::string& command, std::queue<std::string> arugments);
41 UART->println(message.c_str());
43 void print(
const std::string& message){
44 UART->print(message.c_str());
51 std::string shortName;
52 std::function<void(std::queue<std::string>, std::string&)> funcPtr;
54 std::vector<Command> commands{};
57 std::string fullLine = {
""};
58 std::string inputBuffer =
"";
59 std::string argBuffer =
"";
60 std::string command =
"";
62 std::queue<std::string> argumentQueue{};
63 bool isCommandParsed =
false;
65 std::array<std::string, MAX_HISTORY> fullLineHistory = {};
66 std::array<std::string, MAX_HISTORY> commandHistory = {};
67 std::array<std::array<std::string, MAX_ARGUMENTS>,
MAX_HISTORY> argumentHistory = {};
68 std::array<int, MAX_HISTORY> argSize = {};
72 void displayCommandFromHistory();
73 std::string combineArguments(std::queue<std::string> arguments);
74 void trimSpaces(std::string& str);