--- /dev/null
+/* $Id$
+
+This file is part of NetVis
+Copyright @ 2008 Mikko Rasa, Mikkosoft Productions
+Distributed unter the GPL
+*/
+
+#ifndef HISTORY_H_
+#define HISTORY_H_
+
+#include <msp/gl/mesh.h>
+#include <msp/gl/texture2d.h>
+#include <msp/time/timestamp.h>
+#include "ringbuffer.h"
+
+class NetVis;
+
+class History
+{
+private:
+ struct Bandwidth
+ {
+ unsigned down;
+ unsigned up;
+
+ Bandwidth();
+ };
+
+ NetVis &netvis;
+ unsigned width;
+ unsigned height;
+ Bandwidth accum;
+ RingBuffer<Bandwidth> buffer;
+ Msp::Time::TimeStamp next_push;
+ unsigned scale;
+ Msp::GL::Texture2D texture;
+ Msp::GL::Mesh mesh;
+
+public:
+ History(NetVis &, unsigned, unsigned);
+ void activity(unsigned, unsigned);
+ void tick(const Msp::Time::TimeStamp &);
+ void render() const;
+private:
+ void create_texture();
+};
+
+#endif