Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/wiimote/src/external/wiicpp/log/sample.h @ 10256

Last change on this file since 10256 was 9780, checked in by georgr, 11 years ago

WiiCpp library successfully (?) added - won't work without libbluetooth-dev

File size: 703 bytes
Line 
1#ifndef SAMPLE_H
2#define SAMPLE_H
3
4#include <sys/time.h>
5#include <fstream>
6#include <iostream>
7#include <sstream>
8
9#define WIIC_LOG_NONE   0x0
10#define WIIC_LOG_ACC    0x1
11#define WIIC_LOG_GYRO   0x2
12
13using namespace std;
14
15class Sample
16{
17public:
18        Sample() : relTimestamp(0) { }
19        ~Sample() {}
20        virtual void save(ofstream& out) =0;
21       
22        inline void setLogType(int l) { logType = l; }
23        inline int getLogType() const { return logType; }
24        inline void setTimestampFromGestureStart(unsigned long t) { relTimestamp = t; }
25        inline unsigned long getTimestampFromGestureStart() const { return relTimestamp; }
26       
27protected:     
28
29        unsigned long relTimestamp; // msec (from the beginning of the gesture)
30        int logType;
31};
32
33#endif
34
Note: See TracBrowser for help on using the repository browser.