diff eventLogger.h @ 33:92dba082d957

Added trail and EVALUATION_POINT event type.
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Tue, 26 Mar 2013 18:41:42 +0000
parents ab7c86d0f3d8
children 94df2cd72d7b
line wrap: on
line diff
--- a/eventLogger.h	Fri Mar 08 14:54:55 2013 +0000
+++ b/eventLogger.h	Tue Mar 26 18:41:42 2013 +0000
@@ -26,16 +26,17 @@
 #include "testApp.h"
 #include "presetManager.h"
 #import "ServerComms.h"
- 
-#define EVENT_THIN_FACTOR 10
+#include "grid.h"
+
+#define EVENT_THIN_FACTOR 15
 #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 1000
+#define APP_CREATION_TIME 381429000000   // milliseconds to the time i wrote this wee blighter. saves digits
+#define SCROLL_TRAIL_LENGTH 200
+#define PROGRAM_VERSION 0.3 // IMPORTANT TOCHNAGE!
 
-#define APP_CREATION_TIME 381429000000   // milliseconds to the time i wrote this wee blighter. saves digits
+#define SUPERVISED // this def will save files
 
-#define PROGRAM_VERSION 0.3 // IMPORTANT TOCHNAGE!
 
 // can add but don't change ordering - this will invalidate logs
 enum leventType {SAVE_PRESET,  // 0
@@ -58,7 +59,9 @@
     PLAY_PRESSED,           // 17
     PAUSE_PRESSED,         // 18
     HELP_PRESSED,            // 19
-    QUESTIONNAIRE_COMPLETED};     // 20
+    QUESTIONNAIRE_COMPLETED,  // 20
+    EVALUATION_POINT,       // 21
+    EMPTY_EVENT};          // 22
 
 //---------------------------------------------------------------------------
 
@@ -102,6 +105,7 @@
         jevt["eTime"] = eventTime;
         return jevt;
     }
+    void draw();
 };
 //---------------------------------------------------------------------------
 // streams no longer used
@@ -167,11 +171,15 @@
     
     void printAll();
     void saveSessionToFile();
+    void drawTrail(const TwoVector min, const TwoVector max);
+    vector<lEvent> getDrawableEventsInRange(const TwoVector min, const TwoVector max);
+    vector<TwoVector> getRecentPath(int numEvents);
 private:
   
     vector<lEvent> theEvents;
 
     void thinnedLogEvent(lEvent nextEvent);
+    void thinnedScrollEvent(lEvent nextEvent);
     unsigned int nextUploadQty;
 
     string questionnaireComments;