<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Greetings Everyone,<div><b><br></b></div><div><b>I am having following error while compiling</b></div><div><br></div><div><div><div>[3118/3564] Compiling scratch/icn-test-1.cc</div><div>../scratch/icn-test-1.cc: In function ‘int ns3::main(int, char**)’:</div><div>../scratch/icn-test-1.cc:105:41: error: ‘FailLink’ was not declared in this scope</div><div>    Simulator::Schedule (Seconds (10.0), FailLink, consumer1, router1 );</div><div>                                         </div></div><div><br></div><div><b>My Annotated Topology (partial) looks like this:</b></div><div><div># node  comment     yPos    xPos</div><div>C1        NA          1       1</div><div>R1        NA          1       2</div><div>R2        NA          2       2<br></div><div>P1        NA          1       3</div><div><br></div></div><div><div># srcNode   dstNode     bandwidth   metric  delay   queue</div><div># bandwidth: link bandwidth<br></div><div># metric: routing metric<br></div><div># delay:  link delay<br></div><div># queue:  MaxPackets for transmission queue on the link (both directions)<br></div><div>C1       R1     10Mbps     1    10ms     10<br></div><div>P1       R1     10Mbps     1    10ms     10</div><div>R2       C1     10Mbps     1    10ms     10</div><div>R2       R1     10Mbps     1    10ms     10</div><div>R2       P1     10Mbps     1    10ms     10</div><div><br></div></div><div><b>And here is the code</b><br></div><div><b><br></b></div><div><div> #include "ns3/core-module.h"</div><div> #include "ns3/network-module.h"</div><div> #include "ns3/point-to-point-module.h"</div><div> #include "ns3/ndnSIM-module.h"</div><div><br></div><div> // for LinkStatusControl::FailLinks and LinkStatusControl::UpLinks</div><div><b> #include "ns3/ndnSIM/helper/ndn-link-control-helper.hpp"</b></div><div><br></div><div><br></div><div> namespace ns3 {</div><div><br></div><div><br></div><div> int</div><div> main(int argc, char* argv[])</div><div><br></div><div> {</div><div><br></div><div>   // Read optional command-line parameters (e.g., enable visualizer with ./waf --run=<> --visualize</div><div>   CommandLine cmd;</div><div>   cmd.Parse (argc, argv);</div><div><br></div><div>   // Reading a Topology File from a given directory</div><div>   AnnotatedTopologyReader topologyReader("", 25);</div><div>   topologyReader.SetFileName("src/ndnSIM/examples/topologies/topo-test.txt");</div><div>   topologyReader.Read();</div><div><br></div><div>   // Install NDN stack on all nodes</div><div>   ndn::StackHelper ndnHelper;</div><div>   ndnHelper.SetDefaultRoutes(true);</div><div>   ndnHelper.SetOldContentStore("ns3::ndn::cs::Lru", "MaxSize", "10000");</div><div>   ndnHelper.InstallAll();</div><div><br></div><div><br></div><div>   // Choosing forwarding strategy {Available Strategy: Best-Route, Multicast}</div><div>   ndn::StrategyChoiceHelper::InstallAll("/", "/localhost/nfd/strategy/best-route");</div><div>   //ndn::StrategyChoiceHelper::InstallAll("/", "/localhost/nfd/strategy/multicast");</div><div><br></div><div><br></div><div>   // Installing global routing interface on all nodes</div><div>   //ndn::GlobalRoutingHelper ndnGlobalRoutingHelper;</div><div>   //ndnGlobalRoutingHelper.InstallAll();</div><div><br></div><div><br></div><div>   // Installing applications</div><div><br></div><div>   // Getting containers for the consumer/producer/router</div><div>   Ptr<Node> consumer1 = Names::Find<Node>("C1");</div><div>   Ptr<Node> producer1 = Names::Find<Node>("P1");</div><div><b>   Ptr<Node> router1 = Names::Find<Node> ("R1");</b></div><div><b>   Ptr<Node> router2 = Names::Find<Node> ("R2");</b></div><div><br></div><div><br></div><div><br></div><div>   // Installing applications for the consumer</div><div>   ndn::AppHelper consumerHelper("ns3::ndn::ConsumerCbr");</div><div>   //consumer node install a Consumer application that will express interests in /p1 namespace</div><div>   consumerHelper.SetPrefix("/p1");</div><div>   consumerHelper.SetAttribute("Frequency", StringValue("10")); // 10 interests a second</div><div>   consumerHelper.Install(consumer1);</div><div><br></div><div><br></div><div><br></div><div>   // Installing applications for the producer</div><div>   ndn::AppHelper producerHelper("ns3::ndn::Producer");</div><div>   // Producer will reply to all requests starting with /prefix</div><div>   producerHelper.SetPrefix("/p1");</div><div>   producerHelper.SetAttribute("PayloadSize", StringValue("1024"));</div><div>   producerHelper.Install(producer1);</div><div>   // Register /dst1 prefix with global routing controller and</div><div>   //ndnGlobalRoutingHelper.AddOrigins("/p1", producer1);</div><div><br></div><div><br></div><div>   // Calculate and install FIBs</div><div>   //ndn::GlobalRoutingHelper::CalculateRoutes();</div><div><br></div><div>   // The failure of the link connecting consumer and router will start from seconds 10.0</div><div><b>   Simulator::Schedule (Seconds (10.0), FailLink, consumer1, router1 );</b><br></div><div><br></div><div>   Simulator::Stop(Seconds(30.0));</div><div><br></div><div>   Simulator::Run();</div><div>   Simulator::Destroy();</div><div><br></div><div>   return 0;</div><div>   }</div><div><br></div><div><br></div><div>   } // namespace ns3</div><div><br></div><div>   int</div><div>   main(int argc, char* argv[])</div><div>   {</div><div>   return ns3::main(argc, argv);</div><div>   }</div></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Md Monjurul Karim<div>Ph.D. Student</div><div>Beijing Institute of Technology</div><div>5 South Zhong Guan Cun Street</div><div>Haidian District</div><div>Beijing-10081</div><div>P R China</div></div></div></div></div></div></div></div></div></div></div>