]> git.tdb.fi Git - netvis.git/blobdiff - source/host.h
Move activity tracking to a separate class
[netvis.git] / source / host.h
index 2910ad694577f2412d459d95205cb54c2f415d08..ec2741d6b7127183381cb6f858b054b8d0fd5dc2 100644 (file)
@@ -11,6 +11,7 @@ Distributed unter the GPL
 #include <map>
 #include <string>
 #include <msp/time/timedelta.h>
+#include "activity.h"
 #include "vector2.h"
 
 class NetVis;
@@ -25,7 +26,7 @@ private:
        bool local;
        Vector2 pos;
        bool active;
-       float activity;
+       Activity activity;
        float throttle;
 
 public:
@@ -41,12 +42,11 @@ public:
        void set_active(bool);
        bool get_active() const { return active; }
        void add_activity(unsigned);
-       float get_activity() const { return activity; }
+       float get_activity() const { return activity.get_average(); }
        float send_packet();
 
        void tick(const Msp::Time::TimeDelta &);
        void render() const;
-       void render_label() const;
 };
 
 #endif