10#ifndef SEMF_COMMUNICATION_ESH_SHELL_H_
11#define SEMF_COMMUNICATION_ESH_SHELL_H_
85 static constexpr char kDelete =
'\177';
87 static constexpr char kEscape =
'\33';
93 void onCharAvailable(
char character);
98 void onTabDone(
size_t charCount);
106 void updateStateAndPrint();
108 void onError(
Error error);
110 void readNextCharacter();
129 SEMF_SLOT(m_onCharAvailableSlot,
Shell, *
this, onCharAvailable,
char);
131 SEMF_SLOT(m_restartShell,
Shell, *
this,
start);
133 SEMF_SLOT(m_onTabDoneSlot,
Shell, *
this, onTabDone,
size_t);
135 SEMF_SLOT(m_onExecutedSlot,
Shell, *
this, onExecuted);
137 SEMF_SLOT(m_onArrowUpSlot,
Shell, *
this, onArrowUp);
139 SEMF_SLOT(m_onArrowDownSlot,
Shell, *
this, onArrowDown);
141 SEMF_SLOT(m_readNextCharSlot,
Shell, *
this, readNextCharacter);
143 SEMF_SLOT(m_onErrorSlot,
Shell, *
this, onError,
Error);
Class for representing errors. Every error should have a unique source code. As a user feel encourage...
LinkedList is an managed double linked list implementation.
Class for using UART hardware.
Detect up-arrow and down-arrow key strokes via the Printer.
Wrapper class for shell command. The user has to create object of this class for adding their functio...
Manages the shell's history.
Class for string related UART communication. Using this class outside of an esh-context can make sens...
Manages esh's command parsing and execution.
This class manages a semf's embedded shell (esh) operating on a single UART. The esh can be used for ...
void start()
Starts the reading process of the shell. The user should call this function once.
Shell(const Shell &other)=delete
void addCommand(Command &cmd)
Adds a command to the shell.
void loop()
Performs the command execution.
SEMF_SIGNAL(error, Error)
Shell(UartHardware &uart, const Config &config)
Constructor.
Handles the command auto completion.
Configuarion parameters of the shell.
const size_t numberOfEntries
const size_t lineBufferSize
const size_t argvBufferSize