Checkpoint
diff --git a/.gitignore b/.gitignore
index f10621d..43ade2e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
*.pyc
doc/html
.DS_Store
+animation.xml
diff --git a/model/sync-logic.cc b/model/sync-logic.cc
index 7b45e38..c0f2bd4 100644
--- a/model/sync-logic.cc
+++ b/model/sync-logic.cc
@@ -453,8 +453,9 @@
m_ccnxHandle->sendInterest (os.str (),
bind (&SyncLogic::processSyncData, this, _1, _2));
+ _LOG_DEBUG ("What the fuck?? " << m_syncInterestReexpress);
m_scheduler.cancel (REEXPRESSING_INTEREST);
- m_scheduler.schedule (TIME_SECONDS (4),
+ m_scheduler.schedule (TIME_SECONDS (m_syncInterestReexpress),
bind (&SyncLogic::sendSyncInterest, this),
REEXPRESSING_INTEREST);
}
diff --git a/model/sync-logic.h b/model/sync-logic.h
index 3505d35..c413808 100644
--- a/model/sync-logic.h
+++ b/model/sync-logic.h
@@ -151,10 +151,12 @@
ns3::UniformVariable m_rangeUniformRandom;
#endif
-#ifndef NS3_MODULE
- static const int m_syncResponseFreshness = 60;
+#ifdef NS3_MODULE
+ static const int m_syncResponseFreshness = 10000; //
+ static const int m_syncInterestReexpress = 10000; // make sure it doesn't happen
#else
static const int m_syncResponseFreshness = 2;
+ static const int m_syncInterestReexpress = 4;
#endif
enum EventLabels
diff --git a/ns3/sync-ccnx-wrapper.cc b/ns3/sync-ccnx-wrapper.cc
index d66b78a..b61f034 100644
--- a/ns3/sync-ccnx-wrapper.cc
+++ b/ns3/sync-ccnx-wrapper.cc
@@ -110,7 +110,7 @@
CcnxInterestHeader interestHeader;
interestHeader.SetNonce (m_rand.GetValue ());
interestHeader.SetName (name);
- interestHeader.SetInterestLifetime (Seconds (60.0));
+ interestHeader.SetInterestLifetime (Seconds (10000.0)); // really long-lived interests
Ptr<Packet> packet = Create<Packet> ();
packet->AddPacketTag (CreateObject<TypeTag> (TypeTag::INTEREST));
diff --git a/ns3/sync-scheduler.cc b/ns3/sync-scheduler.cc
index 7f39f38..95e4bf8 100644
--- a/ns3/sync-scheduler.cc
+++ b/ns3/sync-scheduler.cc
@@ -50,6 +50,8 @@
void
Scheduler::schedule (const TimeDuration &reltime, Event event, uint32_t label)
{
+ NS_LOG_DEBUG ("Schedule event for " << (Simulator::Now () +reltime).ToDouble (Time::S) << "s for label " << label);
+
list< EventId > &eventsForLabel = m_labeledEvents [label];
list< EventId >::iterator i = eventsForLabel.begin ();
while (i != eventsForLabel.end ())
@@ -73,6 +75,7 @@
Scheduler::cancel (uint32_t label)
{
list< EventId > &eventsForLabel = m_labeledEvents [label];
+ NS_LOG_DEBUG ("Canceling events for label " << label << " (" << eventsForLabel.size () << " events)");
for (list< EventId >::iterator i = eventsForLabel.begin ();
i != eventsForLabel.end ();