3rd Repo, trying to figure this out.

Dependencies:   LPS25H hts221

Fork of SOFT253_Template_Weather_OS_54 by Stage-1 Students SoCEM

Committer:
aburch1
Date:
Mon Apr 24 13:15:51 2017 +0000
Revision:
74:749727490f44
Child:
75:b44645bbf2d2
Created a message logger and set up the framework ready for implementation

Who changed what in which revision?

UserRevisionLine numberNew contents of line
aburch1 74:749727490f44 1 #include "mbed.h"
aburch1 74:749727490f44 2 #include "rtos.h"
aburch1 74:749727490f44 3 #include <string>
aburch1 74:749727490f44 4 #include <sstream>
aburch1 74:749727490f44 5 #include <iostream>
aburch1 74:749727490f44 6
aburch1 74:749727490f44 7 class MessageLogger
aburch1 74:749727490f44 8 {
aburch1 74:749727490f44 9 public:
aburch1 74:749727490f44 10 // constructor
aburch1 74:749727490f44 11 MessageLogger(Thread* logger);
aburch1 74:749727490f44 12
aburch1 74:749727490f44 13 // public methods:
aburch1 74:749727490f44 14 void SendError(string errorMessage);
aburch1 74:749727490f44 15 void SendMessage(string message);
aburch1 74:749727490f44 16 bool GetError();
aburch1 74:749727490f44 17 bool GetMessage();
aburch1 74:749727490f44 18
aburch1 74:749727490f44 19 private:
aburch1 74:749727490f44 20 Thread loggingThread;
aburch1 74:749727490f44 21 ostringstream fatalError;
aburch1 74:749727490f44 22 Mail<ostringstream, 16> message_mail;
aburch1 74:749727490f44 23 int messageCount;
aburch1 74:749727490f44 24
aburch1 74:749727490f44 25 void PrintError();
aburch1 74:749727490f44 26 void PrintMessage();
aburch1 74:749727490f44 27 };