3rd Repo, trying to figure this out.
Fork of SOFT253_Template_Weather_OS_54 by
Revision 85:422d0a1b95cf, committed 2017-05-13
- Comitter:
- niallfrancis
- Date:
- Sat May 13 17:35:58 2017 +0000
- Parent:
- 84:16a3eabfb61f
- Commit message:
- Finished commenting classes;
Changed in this revision
--- a/CircularArray/CircularArray.cpp Thu May 11 19:27:45 2017 +0000 +++ b/CircularArray/CircularArray.cpp Sat May 13 17:35:58 2017 +0000 @@ -2,6 +2,21 @@ #include <stdio.h> #include <ctype.h> +/** + @file : CircularArray.cpp + @authors : Radu Marcu, Jacob Williams, Niall Francis, Arron Burch + + @section DESCRIPTION + + This is the circular array class responsible for managing data stored in the circular array. + It handles all functions related to the stored measures, including pushing measures to the next available + space, pulling the first measure, as well as reading and deleting measures. As this is a circular buffer, + if there is a new measure added and not enough room for it, the oldest measures will be removed in order + to make space. + This class was written to be fairly robust; if it is asked to delete or read more measures than it + contains, the class can adapt and delete or read the highest possible value. + +*/ CircularArray::CircularArray(int limit, MessageLogger *newLogger) {
--- a/FakeSensor/FakeBarometer.cpp Thu May 11 19:27:45 2017 +0000 +++ b/FakeSensor/FakeBarometer.cpp Sat May 13 17:35:58 2017 +0000 @@ -2,6 +2,20 @@ #include "mbed.h" /** + @file : FakeBarometer.cpp + @authors : Radu Marcu, Jacob Williams, Niall Francis, Arron Burch + + @section DESCRIPTION + + This is the FakeBarometer class. It is used to generate fake data readings, + meant to simulate the results a real sensor would provide. It generates random + values for pressure. +*/ + + + + +/** Constructor Takes in minimum and maximum values for fake pressure readings
--- a/FakeSensor/FakeMeasurer.cpp Thu May 11 19:27:45 2017 +0000 +++ b/FakeSensor/FakeMeasurer.cpp Sat May 13 17:35:58 2017 +0000 @@ -1,6 +1,19 @@ #include "FakeSensor.h" #include "mbed.h" + /** + @file : FakeMeasurer.cpp + @authors : Radu Marcu, Jacob Williams, Niall Francis, Arron Burch + + @section DESCRIPTION + + This is the FakeMeasurer class. It is used to generate fake data readings, + meant to simulate the results a real sensor would provide. It generates random + values for humidity and temperature. +*/ + + + /** Constructor Takes in minimum and maximum values for both temperature and humidity fake readings
--- a/LocalDate/LocalDate.cpp Thu May 11 19:27:45 2017 +0000 +++ b/LocalDate/LocalDate.cpp Sat May 13 17:35:58 2017 +0000 @@ -1,6 +1,19 @@ #include "LocalDate.h" #include <stdio.h> +/** + @file : LocalDate.cpp + @authors : Radu Marcu, Jacob Williams, Niall Francis, Arron Burch + + @section DESCRIPTION + + This is class is the LocalDate class, reponsible for handling the date and + time. It allows for the date and time to be set during run time, and automatically + updates the time every second. The class also allows the date to be returned to + areas of the program. +*/ + + LocalDate::LocalDate(int d, int m, int y,int h,int mm,int s) { day = d;
--- a/Measure/Measure.cpp Thu May 11 19:27:45 2017 +0000 +++ b/Measure/Measure.cpp Sat May 13 17:35:58 2017 +0000 @@ -1,5 +1,19 @@ #include "Measure.h" + +/** + @file : Measure.cpp + @authors : Radu Marcu, Jacob Williams, Niall Francis, Arron Burch + + @section DESCRIPTION + + This is the Measure class. Each message object stores the values collected from + the sensor board (temperature, humidity, pressure). These objects are later + stored in the CircularArray. +*/ + + + // // Measure objects holding data collected from sensor board. //
--- a/Measure/Measure.h Thu May 11 19:27:45 2017 +0000 +++ b/Measure/Measure.h Sat May 13 17:35:58 2017 +0000 @@ -2,7 +2,6 @@ class Measure { - //Public properties / methods public: float temperature; float humidity; @@ -10,7 +9,6 @@ LocalDate date; - //Constructor Measure(float f, float h, float p); Measure(); Measure(LocalDate d, float f, float h, float p);
--- a/Message/Message.cpp Thu May 11 19:27:45 2017 +0000 +++ b/Message/Message.cpp Sat May 13 17:35:58 2017 +0000 @@ -1,6 +1,18 @@ #include "Message.h" /** + @file : Message.cpp + @authors : Radu Marcu, Jacob Williams, Niall Francis, Arron Burch + + @section DESCRIPTION + + This is the Message class, which is used by the MessageLogger to pass messages into the mail box + awaiting printing by the logger. The Message class is also used by the MessageLogger to get the + contents of the mail box back out to be printed. +*/ + + +/** Copies the content from ptr into the Message object text char array. @param ptr : Pointer to char array containing message.
--- a/MessageLogger/MessageLogger.cpp Thu May 11 19:27:45 2017 +0000 +++ b/MessageLogger/MessageLogger.cpp Sat May 13 17:35:58 2017 +0000 @@ -3,6 +3,18 @@ #define SIGNAL_printMessage 2 +/** + @file : MessageLogger.cpp + @authors : Radu Marcu, Jacob Williams, Niall Francis, Arron Burch + + @section DESCRIPTION + + This is the MessageLogger class, which is responsible for handling the printing + of messages. All messages are placed in a mailbox to be printed out in order of + oldest to newest, with the exception of error messages, which are prioritized by + the logging thread (main.cpp). + */ + Mail<Message, 16> message_mail;
--- a/main.cpp Thu May 11 19:27:45 2017 +0000 +++ b/main.cpp Sat May 13 17:35:58 2017 +0000 @@ -184,6 +184,7 @@ } int i; + /** Compares two char arrays and returns result