X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fport.h;h=8877ed9067df827cf8a332503d0bf1b72b42b835;hb=afeb198dfbe4929c8d95487bca64a84ec3b92148;hp=ebc9c22d98afee9e50035933a6568c2bc4c8a50d;hpb=c147c9caaf9bc2f6323baf188a438ced9f0f5894;p=netvis.git diff --git a/source/port.h b/source/port.h index ebc9c22..8877ed9 100644 --- a/source/port.h +++ b/source/port.h @@ -10,20 +10,36 @@ Distributed unter the GPL #include #include +#include +#include "activity.h" + +class NetVis; class Port { private: + NetVis &netvis; unsigned number; + bool registered; std::string name; Msp::GL::Color color; + Msp::GL::Mesh mesh; + Activity activity; public: - Port(unsigned, const Msp::GL::Color &); + Port(NetVis &, unsigned); unsigned get_number() const { return number; } + bool is_registered() const { return registered; } 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; }; #endif