Logging facility for endpoints
Fork of ErrorHandler by
Diff: ErrorHandler.h
- Revision:
- 8:cc73ab137ae9
- Parent:
- 7:4844475a4135
- Child:
- 9:cec063a0b9a9
--- a/ErrorHandler.h Sun Sep 21 07:08:09 2014 +0000 +++ b/ErrorHandler.h Tue Sep 23 16:56:15 2014 +0000 @@ -44,6 +44,10 @@ #define LCDCLASS void // not used #endif + /** + ErrorHandler + Error handling class for mbed endpoints + */ class ErrorHandler { private: RawSerial *m_pc; @@ -51,21 +55,73 @@ char m_message[MAX_LOG_MESSAGE+1]; public: + /** + Default constructor + @param pc RawSerial instance + @param lcd LCDCLASS instance (or NULL) + */ ErrorHandler(RawSerial *pc,LCDCLASS *lcd); + + /** + Default destructor + */ virtual ~ErrorHandler(); + /** + log message to the serial console and LCD (if enabled) + @param format variable argument format + */ void log(const char *format, ...); + + /** + log message to the serial console only + @param format variable argument format + */ void logConsole(const char *format, ...); + /** + turn the multi-colored LED red + */ void turnLEDRed(); + + /** + turn the multi-colored LED green + */ void turnLEDGreen(); + + /** + turn the multi-colored LED blue + */ void turnLEDBlue(); + + /** + turn the multi-colored LED purple + */ void turnLEDPurple(); + + /** + turn the multi-colored LED black + */ void turnLEDBlack(); + + /** + turn the multi-colored LED yellow + */ void turnLEDYellow(); + + /** + turn the multi-colored LED orange + */ void turnLEDOrange(); + /** + blink the transmit LED + */ void blinkTransportTxLED(); + + /** + blink the receiver LED + */ void blinkTransportRxLED(); private: