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/examples/ndn-custom-apps/custom-app.cpp b/examples/ndn-custom-apps/custom-app.cpp
index 9aad485..00e79a5 100644
--- a/examples/ndn-custom-apps/custom-app.cpp
+++ b/examples/ndn-custom-apps/custom-app.cpp
@@ -29,7 +29,7 @@
#include "ns3/ndnSIM/helper/ndn-stack-helper.hpp"
#include "ns3/ndnSIM/helper/ndn-fib-helper.hpp"
-#include "ns3/random-variable.h"
+#include "ns3/random-variable-stream.h"
NS_LOG_COMPONENT_DEFINE("CustomApp");
@@ -76,8 +76,8 @@
// Create and configure ndn::Interest
auto interest = std::make_shared<ndn::Interest>("/prefix/sub");
- UniformVariable rand(0, std::numeric_limits<uint32_t>::max());
- interest->setNonce(rand.GetValue());
+ Ptr<UniformRandomVariable> rand = CreateObject<UniformRandomVariable>();
+ interest->setNonce(rand->GetValue(0, std::numeric_limits<uint32_t>::max()));
interest->setInterestLifetime(ndn::time::seconds(1));
NS_LOG_DEBUG("Sending Interest packet for " << *interest);