model+apps+utils+examples+ci+docs: Update code for changes in ns-2.23
- Replace removed RandomVariable with RandomVariableStream
- Replace deprecated usages of AddTraceSource
- Update changed LogComponent interface
ci: This commit also integrates a script for Jenkins and Travis CI to
clone NS-3 and pybindgen repositories, so the code can be built.
docs: Update to reflect new home of ndnSIM and related sources
Change-Id: Ic14e1269bf15366b0041fd670c577053b6704dc7
Refs: #3122, #3123
diff --git a/apps/ndn-consumer-zipf-mandelbrot.cpp b/apps/ndn-consumer-zipf-mandelbrot.cpp
index 2c7f71f..ac83022 100644
--- a/apps/ndn-consumer-zipf-mandelbrot.cpp
+++ b/apps/ndn-consumer-zipf-mandelbrot.cpp
@@ -64,7 +64,7 @@
: m_N(100) // needed here to make sure when SetQ/SetS are called, there is a valid value of N
, m_q(0.7)
, m_s(0.7)
- , m_SeqRng(0.0, 1.0)
+ , m_seqRng(CreateObject<UniformRandomVariable>())
{
// SetNumberOfContents is called by NS-3 object system during the initialization
}
@@ -174,7 +174,7 @@
//
shared_ptr<Interest> interest = make_shared<Interest>();
- interest->setNonce(m_rand.GetValue());
+ interest->setNonce(m_rand->GetValue(0, std::numeric_limits<uint32_t>::max()));
interest->setName(*nameWithSequence);
// NS_LOG_INFO ("Requesting Interest: \n" << *interest);
@@ -204,9 +204,9 @@
uint32_t content_index = 1; //[1, m_N]
double p_sum = 0;
- double p_random = m_SeqRng.GetValue();
+ double p_random = m_seqRng->GetValue();
while (p_random == 0) {
- p_random = m_SeqRng.GetValue();
+ p_random = m_seqRng->GetValue();
}
// if (p_random == 0)
NS_LOG_LOGIC("p_random=" << p_random);