apps: Add more configurability to ndn::ConsumerWindow
By default, it will zero out the window upon timeout
diff --git a/apps/ndn-consumer-window.h b/apps/ndn-consumer-window.h
index 5713c70..32ad8aa 100644
--- a/apps/ndn-consumer-window.h
+++ b/apps/ndn-consumer-window.h
@@ -37,11 +37,11 @@
*/
class ConsumerWindow: public Consumer
{
-public:
+public:
static TypeId GetTypeId ();
-
+
/**
- * \brief Default constructor
+ * \brief Default constructor
*/
ConsumerWindow ();
@@ -58,14 +58,14 @@
virtual void
OnTimeout (uint32_t sequenceNumber);
-
+
protected:
/**
* \brief Constructs the Interest packet and sends it using a callback to the underlying NDN protocol
*/
virtual void
ScheduleNextPacket ();
-
+
private:
virtual void
SetWindow (uint32_t window);
@@ -84,11 +84,14 @@
void
SetMaxSize (double size);
-
+
private:
uint32_t m_payloadSize; // expected payload size
double m_maxSize; // max size to request
+ uint32_t m_initialWindow;
+ bool m_setInitialWindowOnTimeout;
+
TracedValue<uint32_t> m_window;
TracedValue<uint32_t> m_inFlight;
};