25 #ifndef CLI_COMMAND_MANAGER_H
26 #define CLI_COMMAND_MANAGER_H
28 #include <AceRoutine.h>
29 #include "CommandDispatcher.h"
30 #include "StreamLineReader.h"
80 template<u
int8_t BUF_SIZE, u
int8_t ARGV_SIZE>
96 Stream& serial,
const char* prompt =
nullptr):
98 mNumCommands(numCommands),
101 mStreamLineReader(mChannel, mSerial, mLineBuffer, BUF_SIZE),
102 mDispatcher(mChannel, mSerial, mCommands, mNumCommands,
103 mArgv, ARGV_SIZE, mPrompt) {}
105 int runCoroutine()
override {
106 mStreamLineReader.runCoroutine();
107 mDispatcher.runCoroutine();
116 uint8_t
const mNumCommands;
118 const char*
const mPrompt;
119 ace_routine::Channel<InputLine> mChannel;
122 char mLineBuffer[BUF_SIZE];
123 const char* mArgv[ARGV_SIZE];