diff eventLogger.h @ 31:23ef179c3748

Ben / Christian 0.2
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Fri, 01 Mar 2013 13:28:45 +0000
parents c0a6f7c66719
children ab7c86d0f3d8
line wrap: on
line diff
--- a/eventLogger.h	Wed Feb 27 11:39:07 2013 +0000
+++ b/eventLogger.h	Fri Mar 01 13:28:45 2013 +0000
@@ -31,12 +31,11 @@
 #define EVENT_LOG_FILENAME "log.json"
 //#define LOGGING_SERVER_URL "http://www.isophonics.net/datacollector/"
 #define LOGGING_SERVER_URL "http://127.0.0.1:8080/testservice/"
-#define UPLOAD_CHUNK_SIZE 20
+#define UPLOAD_CHUNK_SIZE 2000
 
-#define QUESTIONNAIRE_ENABLE_TIME 100000 // milliseconds
-#define APP_CREATION_TIME 381429000000   // milliseconds to the time i wrote this wee blighter saves digits
+#define APP_CREATION_TIME 381429000000   // milliseconds to the time i wrote this wee blighter. saves digits
 
-#define PROGRAM_VERSION 0.1 // IMPORTANT TOCHNAGE!
+#define PROGRAM_VERSION 0.2 // IMPORTANT TOCHNAGE!
 
 // can add but don't change ordering - this will invalidate logs
 enum leventType {SAVE_PRESET,  // 0
@@ -58,7 +57,8 @@
     SYNTH_LOCKED,           // 16
     PLAY_PRESSED,           // 17
     PAUSE_PRESSED,         // 18
-    HELP_PRESSED};          // 19
+    HELP_PRESSED,            // 19
+    QUESTIONNAIRE_COMPLETED};     // 20
 
 //---------------------------------------------------------------------------
 
@@ -142,16 +142,21 @@
 public:
     int nextUploadNumber;
     bool loggingEnabled;
+    
     bool logUploadInProgress;
     bool serverConnectionOK;
     bool consentGiven;
     bool questionnaireCompleted;
     bool questionnaireUploaded;
+    
     unsigned int deviceID;
     unsigned int totalInteractionTime, savedInteractionTime, sessionTime, sessionStartTime;
     string userName; // not unique
 
+// constr
     EventLogger();
+    
+// public methods:
     void init();
     void exitAndSave();
     void setUsername(const char *u);
@@ -169,10 +174,7 @@
     
     void printAll();
 private:
-
-    int currentHTTPRequestID;
-    
-    
+  
     vector<lEvent> theEvents;
 
     void thinnedLogEvent(lEvent nextEvent);
@@ -186,7 +188,7 @@
     vector<int> questionnaireAnswers;
     int interfaceOrder;
 
-    
+// private methods
     void checkLogFile();
     void deleteLogs(); // new user
     bool uploadEventLog(bool async);