diff eventLogger.h @ 28:e2c62db1e265

Started timer stuff
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Mon, 18 Feb 2013 11:45:05 +0000
parents ae4d2c3ce5e0
children fabb3a5cdfc9
line wrap: on
line diff
--- a/eventLogger.h	Wed Feb 13 17:03:56 2013 +0000
+++ b/eventLogger.h	Mon Feb 18 11:45:05 2013 +0000
@@ -28,7 +28,7 @@
 
 
 
-
+#define EVENT_THIN_FACTOR 10
 #define EVENT_LOG_FILENAME "log.json"
 #define SERVER_URL "http://127.0.0.1:8080/testservice/"
 #define UPLOAD_CHUNK_SIZE 500
@@ -75,7 +75,7 @@
         val2 = v2;
         sliderID = sID;
         
-        double timemsd = [NSDate timeIntervalSinceReferenceDate];
+        double timemsd = [NSDate timeIntervalSinceReferenceDate]; // MILLISECONDS
         eventTime = (unsigned long long)(timemsd*1000) - APP_CREATION_TIME;
         
     }
@@ -146,7 +146,7 @@
     void setUsername(const char *u);
     void newUser();
     void logEvent(const leventType& evtType,const TwoVector& centre = TwoVector(), const double& scale = 1.0, const int& sliderID = -1, const double& sliderVal = 0.0);
-    void questionnaireAnswersObtained(vector<int> answers);
+    void questionnaireAnswersObtained(vector<int> answers, const char* userComments);
     void urlResponse(ofHttpResponse & response);
 private:
     // what we need...
@@ -157,11 +157,13 @@
     int currentHTTPRequestID;
     vector<lEvent> theEvents;
     
+    void thinnedLogEvent(lEvent nextEvent);
     
     // values applicable to all events
 
     unsigned int nextUploadQty;
 
+    string questionnaireComments;
     
     ofxiPhoneDeviceType iOSdeviceType;
     
@@ -169,6 +171,7 @@
     vector<int> questionnaireAnswers;
     bool questionnaireCompleted;
     bool questionnaireUploaded;
+    int interfaceOrder;
 
     
     void checkLogFile();