Components/Libraries/XF/FreeRTOS/ErrorHandler
|
Error Handler
This class is a thread used to handle error that could occur during the execution ot the XFOS.
Only one instance of the class must exist in the XFOS so it implements the singleton pattern.
Member Attributes
ErrorHandler* _pInstance : the instance of the Error Handler
Queue _errorQueue : the error queue
Member Functions Documentation
ErrorHandler* getInstance() [static]
Description
Return the instance of the ErrorHandler.
If the ErrorHandler does not already exists, it is created
~ErrorHandler() [virtual]
Description
The destructor of the ErrorHandler
void pushError(Error* oError, timeSize oTimeToWait)
Description
Add an error to the error queue.
Parameters
Error* oError : the error to push
timeSize oTimeToWait : the time to wait (in ms) if queue is full (basically set as INFINIT_TIME)
void threadMain() [virtual] [protected]
Description
This method is inherited from BaseThread, this function do nothing it must be reimplemented in a subclass.
ErrorHandler(std::string oName = "ErrorHandler", PRIORITY_SIZE oPriority, STACKSIZE_SIZE oStackDepth) [private]
Description
The constructor of the class
Parameters
string oName : the name of the Error Handler (basically set as "ErrorHandler")
PRIORITY_SIZE oPriortiy : the priority of the error Handler (basically set as MAX_SYSTEM_PRIORITY-2)
STACKSIZE_SIZE oStackDepth : the size of the stack (basically set as THREAD_STACK_SIZE)
void initErrorQueue() [private]
Description
Initialize the error queue