model+tracers: Implementing ability to trace satisfied/timed out interests
Implementing satsified/timed out interest tracing in L3AggregateTracer and L3RateTracer (only numbers)
diff --git a/model/fw/ndn-forwarding-strategy.cc b/model/fw/ndn-forwarding-strategy.cc
index 5b51993..6bfee78 100644
--- a/model/fw/ndn-forwarding-strategy.cc
+++ b/model/fw/ndn-forwarding-strategy.cc
@@ -79,6 +79,12 @@
.AddTraceSource ("InData", "InData", MakeTraceSourceAccessor (&ForwardingStrategy::m_inData))
.AddTraceSource ("DropData", "DropData", MakeTraceSourceAccessor (&ForwardingStrategy::m_dropData))
+ ////////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////
+
+ .AddTraceSource ("SatisfiedInterests", "SatisfiedInterests", MakeTraceSourceAccessor (&ForwardingStrategy::m_satisfiedInterests))
+ .AddTraceSource ("TimedOutInterests", "TimedOutInterests", MakeTraceSourceAccessor (&ForwardingStrategy::m_timedOutInterests))
+
.AddAttribute ("CacheUnsolicitedData", "Cache overheard data that have not been requested",
BooleanValue (false),
MakeBooleanAccessor (&ForwardingStrategy::m_cacheUnsolicitedData),
@@ -441,6 +447,8 @@
{
pitEntry->GetFibEntry ()->UpdateFaceRtt (inFace, Simulator::Now () - out->m_sendTime);
}
+
+ m_satisfiedInterests (pitEntry);
}
bool
@@ -600,7 +608,7 @@
void
ForwardingStrategy::WillEraseTimedOutPendingInterest (Ptr<pit::Entry> pitEntry)
{
- // do nothing for now. may be need to do some logging
+ m_timedOutInterests (pitEntry);
}
void
diff --git a/model/fw/ndn-forwarding-strategy.h b/model/fw/ndn-forwarding-strategy.h
index b87b07d..a3fe5b5 100644
--- a/model/fw/ndn-forwarding-strategy.h
+++ b/model/fw/ndn-forwarding-strategy.h
@@ -501,6 +501,13 @@
TracedCallback<Ptr<const ContentObject>, Ptr<const Packet>,
Ptr<const Face> > m_dropData; ///< @brief trace of dropped Data
+
+ ////////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////
+
+ TracedCallback< Ptr<const pit::Entry> > m_satisfiedInterests;
+ TracedCallback< Ptr<const pit::Entry> > m_timedOutInterests;
};
} // namespace ndn