X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fport.h;h=7fdd87e9a3b49cc70ec95101bea9197d835ce8e1;hb=e7ccd0d35487219da5d1e447e5fd435ad763ba4c;hp=d0511e96751c5ed6ca095a6a09a3677bb4fc9510;hpb=42bd2e83d66a98584540dd8cc5b47ee2349fe844;p=netvis.git diff --git a/source/port.h b/source/port.h index d0511e9..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; @@ -19,17 +20,26 @@ class Port private: NetVis &netvis; unsigned number; + bool registered; 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; };