[ndnSIM] problem with an underwater node while running the NDN layer!
Narges Mehran
narges.mehran at gmail.com
Wed Aug 2 14:03:11 PDT 2017
Hello Junxiao,
Thanks for your response.
Please consider the following code:
UanHelper uan;
uan.SetMac ("ns3::UanMacCw", "CW", UintegerValue (m_cwMin), "SlotTime",
TimeValue (m_slotTime));
NodeContainer uanNodes = NodeContainer ();
uanNodes.Create (2);
Ptr<UanPropModelIdeal> prop = CreateObjectWithAttributes<UanPropModelIdeal>
();.
//...
//The functions for installing the UAN layer on nodes.//
//...
///////////////////////------NDN
Stack------//////////////////////////////////
ns3::ndn::StackHelper ndnHelper;
ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::Flooding");
//////ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::BestRoute");
ndnHelper.SetPit ("ns3::ndn::pit::Lru","MaxSize","1000");
ndnHelper.SetContentStore ("ns3::ndn::cs::Nocache");
ndnHelper.InstallAll ();
// Installing global routing interface on all nodes
ns3::ndn::GlobalRoutingHelper ndnGlobalRoutingHelper;
ndnGlobalRoutingHelper.InstallAll ();
ns3::ndn::AppHelper producerHelper ("ns3::ndn::Producer");
std::string prefix = "/Area";
producerHelper.SetAttribute("PayloadSize", StringValue("1024"));
ndnGlobalRoutingHelper.AddOrigins (prefix, source);
producerHelper.SetPrefix (prefix);
ApplicationContainer producer = producerHelper.Install(source);
ns3::ndn::AppHelper consumerHelper1
("ns3::ndn::ConsumerZipfMandelbrot");
// frequency with which Interests are generated
consumerHelper1.SetAttribute("Frequency", StringValue("10"));
consumerHelper1.SetPrefix (prefix);
std::string NumofContent = "10";
consumerHelper1.SetAttribute ("MaxSeq",StringValue("10"));
consumerHelper1.SetAttribute ("q", StringValue ("0"));
consumerHelper1.SetAttribute ("s", StringValue ("1"));
//Number of different content (sequence numbers) that will be
requested by the applications
consumerHelper1.SetAttribute ("NumberOfContents", StringValue
(NumofContent)); // NumofContent different content file
/////////////////////////////////////////////////////////////////////////////////
// install consumer app on consumer node c_i to request data from
producer p_i //
/////////////////////////////////////////////////////////////////////////////////
ApplicationContainer consumer = consumerHelper1.Install (sink);
consumer.Start (Seconds (0.5));
producer.Start (Seconds (0.5));
///////////////////////////////////////////////////////////////////////////////
// Calculate and install FIBs
ndnGlobalRoutingHelper.CalculateRoutes ();
////////////////////////////////////////////////////////////////////////////////
ns3::ndn::AppDelayTracer::InstallAll ("app-delays-trace-UAWSN.txt");
ns3::ndn::L3RateTracer::Install(sink,"rate-trace-sink.txt", Seconds
(0.1));
ns3::ndn::L3RateTracer::Install(source,"rate-trace-source.txt", Seconds
(0.1));
.
.
.
Actually I have tested them with the help of functions in UAN library and
ndnSIM libraries of NS-3. For example, L3RateTracer shows no number of
InInterest to the source node and AppDelayTracer's file is empty. Also, I
checked another trace named "EnableAsciiAll" in UAN library; It checks the
number of "RxOk" and "Tx" and nothing is depicted neither for "RxOk" nor
for "Tx".
Regards,
Narges
On Wed, Aug 2, 2017 at 5:27 AM, Junxiao Shi <shijunxiao at email.arizona.edu>
wrote:
> Hi Narges
>
> Read about how to report a problem effectively:
> http://www.lists.cs.ucla.edu/pipermail/nfd-dev/2016-May/001748.html
>
> But by adding the NDN layer,
>>
> Can you provide a link to the code?
>
>
>> It seems that no request is coming out of the Sink-Node and no
>> "UanChannel" and "NetDevice" are registered.
>>
> What leads you to conclude that "no request is coming out of the
> Sink-Node"?
>
> Yours, Junxiao
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170803/2d523157/attachment.html>
More information about the ndnSIM
mailing list