Moving TraceSources from CcnxProducer/Consumer to CcnxApp
diff --git a/apps/ccnx-app.cc b/apps/ccnx-app.cc
index 5093cf7..ef81197 100644
--- a/apps/ccnx-app.cc
+++ b/apps/ccnx-app.cc
@@ -51,6 +51,12 @@
.AddTraceSource ("ReceivedContentObjects", "ReceivedContentObjects",
MakeTraceSourceAccessor (&CcnxApp::m_receivedContentObjects))
+
+ .AddTraceSource ("TransmittedInterests", "TransmittedInterests",
+ MakeTraceSourceAccessor (&CcnxApp::m_transmittedInterests))
+
+ .AddTraceSource ("TransmittedContentObjects", "TransmittedContentObjects",
+ MakeTraceSourceAccessor (&CcnxApp::m_transmittedContentObjects))
;
return tid;
}
diff --git a/apps/ccnx-app.h b/apps/ccnx-app.h
index 80a789c..cf333a4 100644
--- a/apps/ccnx-app.h
+++ b/apps/ccnx-app.h
@@ -111,6 +111,13 @@
TracedCallback<Ptr<const CcnxContentObjectHeader>, Ptr<const Packet>,
Ptr<CcnxApp>, Ptr<CcnxFace> > m_receivedContentObjects;
+
+
+ TracedCallback<Ptr<const CcnxInterestHeader>,
+ Ptr<CcnxApp>, Ptr<CcnxFace> > m_transmittedInterests;
+
+ TracedCallback<Ptr<const CcnxContentObjectHeader>, Ptr<const Packet>,
+ Ptr<CcnxApp>, Ptr<CcnxFace> > m_transmittedContentObjects;
};
} // namespace ns3
diff --git a/apps/ccnx-consumer.cc b/apps/ccnx-consumer.cc
index 66da4b8..c0b4b65 100644
--- a/apps/ccnx-consumer.cc
+++ b/apps/ccnx-consumer.cc
@@ -92,9 +92,6 @@
MakeTimeAccessor (&CcnxConsumer::GetRetxTimer, &CcnxConsumer::SetRetxTimer),
MakeTimeChecker ())
- .AddTraceSource ("TransmittedInterests", "TransmittedInterests",
- MakeTraceSourceAccessor (&CcnxConsumer::m_transmittedInterests))
-
.AddTraceSource ("PathWeightsTrace", "PathWeightsTrace",
MakeTraceSourceAccessor (&CcnxConsumer::m_pathWeightsTrace))
;
diff --git a/apps/ccnx-consumer.h b/apps/ccnx-consumer.h
index 9a30fef..58ed12d 100644
--- a/apps/ccnx-consumer.h
+++ b/apps/ccnx-consumer.h
@@ -169,12 +169,6 @@
SeqTimeoutsContainer m_seqTimeouts; ///< \brief multi-index for the set of SeqTimeout structs
SeqTimeoutsContainer m_seqLifetimes;
-
- /**
- * \brief A trace that is called after each transmitted Interest packet
- */
- TracedCallback<Ptr<const CcnxInterestHeader>,
- Ptr<CcnxApp>, Ptr<CcnxFace> > m_transmittedInterests;
TracedCallback<Ptr<Node>, Ptr<Node>, uint32_t, uint32_t > m_pathWeightsTrace;
};
diff --git a/apps/ccnx-producer.cc b/apps/ccnx-producer.cc
index 37209b3..fe4960f 100644
--- a/apps/ccnx-producer.cc
+++ b/apps/ccnx-producer.cc
@@ -57,9 +57,6 @@
UintegerValue (1024),
MakeUintegerAccessor(&CcnxProducer::m_virtualPayloadSize),
MakeUintegerChecker<uint32_t>())
-
- .AddTraceSource ("TransmittedContentObjects", "TransmittedContentObjects",
- MakeTraceSourceAccessor (&CcnxProducer::m_transmittedContentObjects))
;
return tid;
@@ -127,12 +124,12 @@
// // Ptr<WeightsPathStretchTag>. Echoing will be simplified after change is done
// }
- m_transmittedContentObjects (header, packet, this, m_face);
-
packet->AddHeader (*header);
packet->AddTrailer (tail);
m_protocolHandler (packet);
+
+ m_transmittedContentObjects (header, packet, this, m_face);
}
} // namespace ns3
diff --git a/apps/ccnx-producer.h b/apps/ccnx-producer.h
index 45794b2..cf579ab 100644
--- a/apps/ccnx-producer.h
+++ b/apps/ccnx-producer.h
@@ -52,9 +52,6 @@
private:
CcnxNameComponents m_prefix;
uint32_t m_virtualPayloadSize;
-
- TracedCallback<Ptr<const CcnxContentObjectHeader>, Ptr<const Packet>,
- Ptr<CcnxApp>, Ptr<CcnxFace> > m_transmittedContentObjects;
};
}