X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fport.h;h=7fdd87e9a3b49cc70ec95101bea9197d835ce8e1;hb=e7ccd0d35487219da5d1e447e5fd435ad763ba4c;hp=4ce9427fc6df5b6913afd0743e8a8fb38dbe9a22;hpb=9954e8cbf9bae21f5a727f9c92e9c33dc6d8eaf1;p=netvis.git diff --git a/source/port.h b/source/port.h index 4ce9427..7fdd87e 100644 --- a/source/port.h +++ b/source/port.h @@ -11,6 +11,7 @@ Distributed unter the GPL #include #include #include +#include "activity.h" class NetVis; @@ -23,15 +24,22 @@ private: std::string name; Msp::GL::Color color; Msp::GL::Mesh mesh; + Activity activity; public: Port(NetVis &, unsigned); unsigned get_number() const { return number; } bool is_registered() const { return registered; } + void set_name(const std::string &); const std::string &get_name() const { return name; } const Msp::GL::Color &get_color() const { return color; } + void add_activity(unsigned); + float get_activity() const { return activity.get_average(); } + + void tick(const Msp::Time::TimeDelta &); + void render() const; };