3rd Repo, trying to figure this out.
Fork of SOFT253_Template_Weather_OS_54 by
MessageLogger/MessageLogger.h
- Committer:
- aburch1
- Date:
- 2017-05-11
- Revision:
- 81:996c0a3319b4
- Parent:
- 80:959151952153
- Child:
- 83:0d3572a8a851
File content as of revision 81:996c0a3319b4:
#ifndef MESSAGELOGGER_H #define MESSAGELOGGER_H #include "mbed.h" #include "rtos.h" #include <string> #include <sstream> #include <iostream> class MessageLogger { public: // constructor MessageLogger(); // public methods: void SendError(string errorMessage); void SendMessage(char* message); bool GetError(); bool GetMessage(); void SetThread(Thread* logger); private: Thread* loggingThread; ostringstream fatalError; int messageCount; bool hasError; osStatus stat; char c; Mutex messageLock; void PrintError(); void PrintMessage(); }; #endif