ThroughputSensor.h 516 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
// ThroughputSensor.h

// For every ack, this calculates the

#ifndef THROUGHPUT_SENSOR_H_STUB_2
#define THROUGHPUT_SENSOR_H_STUB_2

#include "Sensor.h"

class PacketSensor;

class ThroughputSensor : public Sensor
{
public:
  ThroughputSensor(PacketSensor * newPacketHistory);
  int getThroughputInKbps(void) const;
protected:
  virtual void localSend(PacketInfo * packet);
  virtual void localAck(PacketInfo * packet);
private:
  int throughputInKbps;
  Time lastAckTime;
  PacketSensor * packetHistory;
};

#endif