24#ifndef TAPROOT_ERROR_CONTROLLER_HPP_
25#define TAPROOT_ERROR_CONTROLLER_HPP_
31#include "modm/container.hpp"
52 using error_index_t = modm::BoundedDeque<SystemError, ERROR_LIST_MAX_SIZE>::Index;
73 static constexpr char USAGE[] =
74 "Usage: error <target>\n"
75 " Where <target> is one of:\n"
76 " - [-H]: displays possible commands.\n"
77 " - [printall]: prints all errors in errorList, displaying their"
78 "description, lineNumber, fileName, and index.\n"
79 " - [remove [index]]: removes the error at the given index. Example: error remove 1.\n"
80 " - [removeall]: removes all errors from the errorList.\n";
86 modm::BoundedDeque<SystemError, ERROR_LIST_MAX_SIZE> errorList;
90 void removeAllSystemErrors();
92 void displayAllErrors(modm::IOStream& outputStream);
94 void removeTerminalError(
int index, modm::IOStream& outputStream);
96 void clearAllTerminalErrors(modm::IOStream& outputStream);
Definition drivers.hpp:70
Definition terminal_serial.hpp:59
Definition error_controller.hpp:49
friend class ErrorControllerTester
Definition error_controller.hpp:82
void init()
Definition error_controller.cpp:55
static constexpr std::size_t ERROR_LIST_MAX_SIZE
Definition error_controller.hpp:51
mockable void addToErrorList(const SystemError &error)
Definition error_controller.cpp:34
bool terminalSerialCallback(char *inputLine, modm::IOStream &outputStream, bool) override
Definition error_controller.cpp:97
ErrorController(Drivers *drivers)
Definition error_controller.hpp:54
void terminalSerialStreamCallback(modm::IOStream &) override
Definition error_controller.hpp:70
modm::BoundedDeque< SystemError, ERROR_LIST_MAX_SIZE >::Index error_index_t
Definition error_controller.hpp:52
Definition system_error.hpp:30
Definition create_errors.hpp:30
Definition ballistics.cpp:29
tap::Drivers Drivers
Definition drivers.hpp:11
fang::Drivers & drivers
Definition robot_singleton.cpp:45
#define mockable
Wrap class functions that are not already virtual in this function if you wish to mock them.
Definition util_macros.hpp:38
#define DISALLOW_COPY_AND_ASSIGN(Typename)
Definition util_macros.hpp:27