3rd Repo, trying to figure this out.
Fork of SOFT253_Template_Weather_OS_54 by
MessageLogger/MessageLogger.h@83:0d3572a8a851, 2017-05-11 (annotated)
- Committer:
- aburch1
- Date:
- Thu May 11 19:23:55 2017 +0000
- Revision:
- 83:0d3572a8a851
- Parent:
- 81:996c0a3319b4
Comments cleaned and improved throughout classes. Main header class comment complete, other class comments still need to be written.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
aburch1 | 81:996c0a3319b4 | 1 | #ifndef MESSAGELOGGER_H |
aburch1 | 81:996c0a3319b4 | 2 | #define MESSAGELOGGER_H |
aburch1 | 81:996c0a3319b4 | 3 | |
aburch1 | 74:749727490f44 | 4 | #include "mbed.h" |
aburch1 | 74:749727490f44 | 5 | #include "rtos.h" |
aburch1 | 81:996c0a3319b4 | 6 | |
aburch1 | 74:749727490f44 | 7 | #include <string> |
aburch1 | 74:749727490f44 | 8 | #include <sstream> |
aburch1 | 74:749727490f44 | 9 | #include <iostream> |
aburch1 | 74:749727490f44 | 10 | |
aburch1 | 74:749727490f44 | 11 | class MessageLogger |
aburch1 | 74:749727490f44 | 12 | { |
aburch1 | 74:749727490f44 | 13 | public: |
aburch1 | 75:b44645bbf2d2 | 14 | MessageLogger(); |
aburch1 | 74:749727490f44 | 15 | |
aburch1 | 77:db3384071634 | 16 | void SendError(string errorMessage); |
aburch1 | 81:996c0a3319b4 | 17 | void SendMessage(char* message); |
aburch1 | 74:749727490f44 | 18 | bool GetError(); |
aburch1 | 74:749727490f44 | 19 | bool GetMessage(); |
aburch1 | 75:b44645bbf2d2 | 20 | void SetThread(Thread* logger); |
aburch1 | 74:749727490f44 | 21 | |
aburch1 | 74:749727490f44 | 22 | private: |
aburch1 | 75:b44645bbf2d2 | 23 | Thread* loggingThread; |
aburch1 | 77:db3384071634 | 24 | ostringstream fatalError; |
aburch1 | 74:749727490f44 | 25 | int messageCount; |
aburch1 | 75:b44645bbf2d2 | 26 | bool hasError; |
aburch1 | 75:b44645bbf2d2 | 27 | osStatus stat; |
aburch1 | 79:4e6b53eb678b | 28 | char c; |
aburch1 | 81:996c0a3319b4 | 29 | Mutex messageLock; |
aburch1 | 74:749727490f44 | 30 | |
aburch1 | 74:749727490f44 | 31 | void PrintError(); |
aburch1 | 74:749727490f44 | 32 | void PrintMessage(); |
aburch1 | 81:996c0a3319b4 | 33 | }; |
aburch1 | 81:996c0a3319b4 | 34 | #endif |