Open FFBoard
Open source force feedback firmware
ErrorPrinter Class Reference

#include <ErrorHandler.h>

Inheritance diagram for ErrorPrinter:
ErrorHandler cpp_freertos::Thread

Public Member Functions

 ErrorPrinter ()
 
void errorCallback (const Error &error, bool cleared)
 
void setEnabled (bool enable)
 
bool getEnabled ()
 
void Run ()
 

Private Attributes

bool enabled = true
 

Additional Inherited Members

- Private Member Functions inherited from ErrorHandler
 ErrorHandler ()
 
virtual ~ErrorHandler ()
 
- Private Member Functions inherited from cpp_freertos::Thread
 Thread (const std::string Name, uint16_t StackDepth, UBaseType_t Priority)
 
 Thread (const char *Name, uint16_t StackDepth, UBaseType_t Priority)
 
 Thread (uint16_t StackDepth, UBaseType_t Priority)
 
bool Start ()
 
virtual ~Thread ()
 
TaskHandle_t GetHandle ()
 
void Suspend ()
 
void Resume ()
 
void ResumeFromISR ()
 
void Notify ()
 
void NotifyFromISR ()
 
uint32_t WaitForNotification (TickType_t Timeout=portMAX_DELAY)
 
UBaseType_t GetPriority ()
 
UBaseType_t GetPriorityFromISR ()
 
void SetPriority (UBaseType_t NewPriority)
 
std::string GetName ()
 
char * GetName ()
 
virtual void Cleanup ()
 
void Delay (const TickType_t Delay)
 
void DelayUntil (const TickType_t Period)
 
void ResetDelayUntil ()
 
bool Wait (ConditionVariable &Cv, Mutex &CvLock, TickType_t Timeout=portMAX_DELAY)
 
- Static Private Member Functions inherited from ErrorHandler
static void addError (const Error &error)
 
static void clearError (const Error &error)
 
static void clearError (ErrorCode errorcode)
 
static void clearTemp ()
 
static void clearAll ()
 
static std::span< ErrorgetErrors ()
 
static void sortErrors ()
 
- Static Private Member Functions inherited from cpp_freertos::Thread
static void Yield ()
 
static void StartScheduler ()
 
static void EndScheduler ()
 
- Static Private Attributes inherited from ErrorHandler
static std::vector< ErrorHandler * > errorHandlers
 
static std::array< Error, ERRORHANDLER_MAXERRORS > errors
 

Detailed Description

Definition at line 105 of file ErrorHandler.h.

Constructor & Destructor Documentation

◆ ErrorPrinter()

ErrorPrinter::ErrorPrinter ( )

Definition at line 154 of file ErrorHandler.cpp.

Member Function Documentation

◆ errorCallback()

void ErrorPrinter::errorCallback ( const Error error,
bool  cleared 
)
virtual

Reimplemented from ErrorHandler.

Definition at line 173 of file ErrorHandler.cpp.

◆ getEnabled()

bool ErrorPrinter::getEnabled ( )

Definition at line 197 of file ErrorHandler.cpp.

◆ Run()

void ErrorPrinter::Run ( )
virtual

Implementation of your actual thread code. You must override this function.

Note
If INCLUDE_vTaskDelete is defined, then you may return from your Run method. This will cause the task to be deleted from FreeRTOS, however you are still responsible to delete the task object. If this is not defined, then retuning from your Run() method will result in an assert.

Implements cpp_freertos::Thread.

Definition at line 158 of file ErrorHandler.cpp.

◆ setEnabled()

void ErrorPrinter::setEnabled ( bool  enable)

Definition at line 184 of file ErrorHandler.cpp.

Member Data Documentation

◆ enabled

bool ErrorPrinter::enabled = true
private

Definition at line 118 of file ErrorHandler.h.


The documentation for this class was generated from the following files: