diff options
Diffstat (limited to 'src/obtsDevice.h')
| -rw-r--r-- | src/obtsDevice.h | 60 |
1 files changed, 55 insertions, 5 deletions
diff --git a/src/obtsDevice.h b/src/obtsDevice.h index 884600b..b300d64 100644 --- a/src/obtsDevice.h +++ b/src/obtsDevice.h @@ -16,15 +16,50 @@ functions: draw(time) getPosition(time) variables: pointer to icon image
+//draw the icons - passed the IMEI
+//colours for networks
+//connect & disconnect
+
*/
+class obtsDevice; //forward declaration
+
struct timeseg{
- timeseg(float _st,float _et){
- startTime=_st;
- endTime=_et;
+ timeseg(){
+ startTime=ofGetElapsedTimef();
+ endTime=0.0f;
+ }
+ float startTime;
+ float endTime;
+};
+
+struct tsms{
+ tsms(obtsDevice* to){
+ recipient=to;
+ time=ofGetElapsedTimef();
}
+ obtsDevice *recipient;
+ float time;
+};
+
+struct tcall{
+ tcall(obtsDevice* to,bool _connected){
+ recipient=to;
+ startTime=ofGetElapsedTimef();
+ endTime=0.0f;
+ connected=_connected;
+ if (connected) connectedTime=startTime;
+ else connectedTime=0.0f;
+ }
+ void connect(){
+ connected=true;
+ connectedTime=ofGetElapsedTimef();
+ }
+ obtsDevice *recipient;
float startTime;
+ float connectedTime;
float endTime;
+ bool connected;
};
@@ -32,17 +67,32 @@ class obtsDevice {
public:
obtsDevice();
- obtsDevice(string &imsi,ofImage *_icon,ofVec2f _coords);
+ obtsDevice(string &imsi,string &imei,string &num,ofImage *_icon,ofVec2f _coords);
virtual ~obtsDevice();
void draw(float timeScale); //units per second
void connect();
void disconnect();
+ void ringing(obtsDevice *to);
+ void call(obtsDevice *to);
+ void connectCall();
+ void endCall();
+ void sms(obtsDevice *to);
+ void excite(float amount=1.0);
protected:
private:
- string IMSI;
+ float exciteLevel;
+ string IMSI,IMEI,number;
ofVec2f coords; //angular coords
vector<timeseg> connectionHistory;
+ vector<tsms> smsHistory; //argle
+ vector<tcall> callHistory;
ofImage *icon;
+ bool active,calling;
+
+ float lastTime;
};
+
+
+
#endif // OBTSDEVICE_H
|
