![](/media/cache/profiles/ba5be68d3d541f2ca043d77fc54fe702.jpg.50x50_q85.jpg)
3rd Repo, trying to figure this out.
Fork of SOFT253_Template_Weather_OS_54 by
Diff: MessageLogger/MessageLogger.h
- Revision:
- 74:749727490f44
- Child:
- 75:b44645bbf2d2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MessageLogger/MessageLogger.h Mon Apr 24 13:15:51 2017 +0000 @@ -0,0 +1,27 @@ +#include "mbed.h" +#include "rtos.h" +#include <string> +#include <sstream> +#include <iostream> + +class MessageLogger +{ + public: + // constructor + MessageLogger(Thread* logger); + + // public methods: + void SendError(string errorMessage); + void SendMessage(string message); + bool GetError(); + bool GetMessage(); + + private: + Thread loggingThread; + ostringstream fatalError; + Mail<ostringstream, 16> message_mail; + int messageCount; + + void PrintError(); + void PrintMessage(); +}; \ No newline at end of file