trabalho final

Dependencies:   X_NUCLEO_IKS01A1-f255a2c75ecb mbed-rtos mbed

Revision:
25:2197b8bb930c
Parent:
21:849e5636076e
Child:
30:b1d50b25d87e
Child:
31:8bbdfea60151
--- a/userMethods.cpp	Tue May 17 21:38:21 2016 +0000
+++ b/userMethods.cpp	Tue May 17 21:59:20 2016 +0000
@@ -5,11 +5,13 @@
 #include <stdexcept>
 #include <vector>
 
+// FIFO buffer
 vector<log_data> * UserMethods::v;
 int * UserMethods::n;
 ExpansionBoard * UserMethods::e;
 bool UserMethods::flag;
 
+// Method that processes the ReadAll command
 void UserMethods::readAllData(const void*)
 {
     vector<log_data> vector = *v;
@@ -33,6 +35,7 @@
                ExpansionBoard::printDouble(buffer, vector[i].pressure, 2), ExpansionBoard::printDouble(buffer, vector[i].humidity, 2));
 }
 
+// Method to proccess Read <n> command 
 void UserMethods::readNData(const void*)
 {
     vector<log_data> vector = *v;
@@ -49,6 +52,8 @@
                ExpansionBoard::printDouble(buffer, vector[i].pressure, 2), ExpansionBoard::printDouble(buffer, vector[i].humidity, 2));
 }
 
+
+// Method that proccesses the DeleteAll command
 int UserMethods::deleteAllData(const void*)
 {
     vector<log_data> vector = *v;
@@ -68,6 +73,7 @@
     return num;
 }
 
+// Method thar proccesses the Read<n> command 
 int UserMethods::deleteNData(const void*)
 {
     vector<log_data> vector = *v;
@@ -93,11 +99,7 @@
     return nOfRecords;
 }
 
-void UserMethods::logging(const void*)
-{
-    return;
-}
-
+// Constructor of the class 
 UserMethods::UserMethods(vector<log_data> vector, int num, ExpansionBoard sensor, bool lFlag)
 {
     v = &vector;