|
Fang-Robotics-MCB
Fang Robotics Team Codebase
|
#include <error_controller.hpp>


Public Types | |
| using | error_index_t = modm::BoundedDeque< SystemError, ERROR_LIST_MAX_SIZE >::Index |
Public Member Functions | |
| ErrorController (Drivers *drivers) | |
| mockable | ~ErrorController ()=default |
| mockable void | addToErrorList (const SystemError &error) |
| void | init () |
| bool | terminalSerialCallback (char *inputLine, modm::IOStream &outputStream, bool) override |
| void | terminalSerialStreamCallback (modm::IOStream &) override |
Static Public Attributes | |
| static constexpr std::size_t | ERROR_LIST_MAX_SIZE = 16 |
Friends | |
| class | ErrorControllerTester |
The ErrorController stores the errors that are currently active and allows the user to query errors via the terminal serial interface.
Use the RAISE_ERROR macro to add errors to the main ErrorController.
| using tap::errors::ErrorController::error_index_t = modm::BoundedDeque<SystemError, ERROR_LIST_MAX_SIZE>::Index |
|
inline |
|
default |
| void tap::errors::ErrorController::addToErrorList | ( | const SystemError & | error | ) |
Adds the passed in error to the ErrorController if no identical errors are already in the ErrorController.
| [in] | error | The SystemError to add to the ErrorController. |
| void tap::errors::ErrorController::init | ( | ) |
|
overridevirtual |
| [in] | inputLine | The user input to be processed. |
| [out] | outputStream | The stream to write information to. |
| [in] | streamingEnabled | Set to true when the streaming is initially enabled. Subsequent interactions with the callback handler will be via terminalSerialStreamCallback until streaming has been disabled. |
true if the inputLine was valid and was parsed correctly, false otherwise. Implements tap::communication::serial::TerminalSerialCallbackInterface.
|
inlineoverridevirtual |
Called repeatedly by the TerminalSerial when in streaming mode.
Implements tap::communication::serial::TerminalSerialCallbackInterface.
|
friend |
|
staticconstexpr |