Last change
on this file since 12067 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 | |
---|
13 | using namespace std; |
---|
14 | |
---|
15 | class Sample |
---|
16 | { |
---|
17 | public: |
---|
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 | |
---|
27 | protected: |
---|
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.