summaryrefslogtreecommitdiff
path: root/vfg/src/Asterisk.h
diff options
context:
space:
mode:
authorComment <tim@gray.(none)>2012-12-05 22:10:04 +0000
committerComment <tim@gray.(none)>2012-12-05 22:10:04 +0000
commit8fe8572729f186269b02ac2bb149fe9a25671cae (patch)
treefb30ccab57f4c3ed50c6fc76fd28db4c63255cc0 /vfg/src/Asterisk.h
parent7e99d4291172f4dadb59b81cf525817dd8a210e5 (diff)
asterisk with thread
Diffstat (limited to 'vfg/src/Asterisk.h')
-rwxr-xr-xvfg/src/Asterisk.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/vfg/src/Asterisk.h b/vfg/src/Asterisk.h
index 0640c4b..5033a5c 100755
--- a/vfg/src/Asterisk.h
+++ b/vfg/src/Asterisk.h
@@ -10,28 +10,40 @@
#define PLAYING 3
-class Asterisk
+class Asterisk: public ofThread
{
public:
- Asterisk();
- void setup(string passcode="1111");
+ Asterisk(){
+ }
+
+ void start(){
+
+ }
+ void stop(){
+ stopThread();
+ }
+
+ //--------------------------
+
+ void setup(string passcode="1111",int millis=1000);
virtual ~Asterisk();
void startGame();
void endGame(string score);
int update();
- void requestStatus();
int state;
bool isPlaying;
int queued;
protected:
- void cmd(string s);
+ void cmd(string s);
+ void threadedFunction();
private:
int startTime;
FILE *file;
int filenum;
ofxUDPManager udpConnection;
string playerCode;
+ int statusPollMillis;
};