diff eventLogger.h @ 1:23efe1f0cd8a

work on event logging
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Thu, 22 Nov 2012 17:59:13 +0000
parents 307e5fb699fb
children 7541aeaebcdc
line wrap: on
line diff
--- a/eventLogger.h	Mon Nov 19 12:56:47 2012 +0000
+++ b/eventLogger.h	Thu Nov 22 17:59:13 2012 +0000
@@ -11,8 +11,18 @@
 #ifndef __oscSenderExample__eventLogger__
 #define __oscSenderExample__eventLogger__
 
+
+
 #include <iostream>
+#include "2dvector.h"
+enum eventType {PRESET, DESET, SCROLL, ZOOM, SLIDER};
 
+class Event{
+    // try and make this as compact as possible.
+    int eventType; // -4 save deset, -3 save preset, -2 zoom, -1 scroll, 0-D slider index
+    double val1; // x coord, scale if zoom
+    double val2; // y coord, 0 if zoom
+};
 
 class EventLogger{
 public:
@@ -20,7 +30,13 @@
     /*
      time, type, value
      */
+    vector<Event> events;
     
+    int userID; // get something from hardware??
+    
+    EventLogger();
+    void logEvent(int evtType,TwoVector centre, double scale);
+    void sendHttp();
 };