apps+helper+utils: Fixes of consumer and producer apps to work with the new codebase
This commit also replaces boost::tuple with std::tuple in Batches class
Credits for the commit also to Spyros Mastorakis and Alex Afanasyev
diff --git a/apps/ndn-consumer-zipf-mandelbrot.cpp b/apps/ndn-consumer-zipf-mandelbrot.cpp
index f6037e3..b5b27ee 100644
--- a/apps/ndn-consumer-zipf-mandelbrot.cpp
+++ b/apps/ndn-consumer-zipf-mandelbrot.cpp
@@ -20,9 +20,8 @@
#include "ndn-consumer-zipf-mandelbrot.hpp"
-#include "ns3/ndn-app-face.hpp"
-
-#include "ns3/ndnSIM/utils/ndn-fw-hop-count-tag.hpp"
+#include "model/ndn-app-face.hpp"
+#include "utils/ndn-fw-hop-count-tag.hpp"
#include <math.h>
@@ -170,15 +169,15 @@
//
shared_ptr<Name> nameWithSequence = make_shared<Name>(m_interestName);
- nameWithSequence->appendSeqNum(seq);
+ nameWithSequence->appendSequenceNumber(seq);
//
shared_ptr<Interest> interest = make_shared<Interest>();
- interest->SetNonce(m_rand.GetValue());
- interest->SetName(nameWithSequence);
+ interest->setNonce(m_rand.GetValue());
+ interest->setName(*nameWithSequence);
// NS_LOG_INFO ("Requesting Interest: \n" << *interest);
- NS_LOG_INFO("> Interest for " << seq << ", Total: " << m_seq << ", face: " << m_face->GetId());
+ NS_LOG_INFO("> Interest for " << seq << ", Total: " << m_seq << ", face: " << m_face->getId());
NS_LOG_DEBUG("Trying to add " << seq << " with " << Simulator::Now() << ". already "
<< m_seqTimeouts.size() << " items");
@@ -192,11 +191,8 @@
m_rtt->SentSeq(SequenceNumber32(seq), 1);
- FwHopCountTag hopCountTag;
- interest->GetPayload()->AddPacketTag(hopCountTag);
-
m_transmittedInterests(interest, this, m_face);
- m_face->ReceiveInterest(interest);
+ m_face->onReceiveInterest(*interest);
ConsumerZipfMandelbrot::ScheduleNextPacket();
}