[ndnSIM] error when simulating link failure

yao hu huyao0107 at gmail.com
Mon Apr 29 07:53:27 PDT 2013

Hi Alex,

I added the following code to simulate the link failure between node n1 and
n2 at 10 seconds. But it is strange it produces the error " ‘FailLink’ was
not declared in this scope" as follows..

../src/ndnSIM/examples/ndn-linkfailure.cc: In function ‘int main(int,
../src/ndnSIM/examples/ndn-linkfailure.cc:160:40: error: ‘FailLink’ was not
declared in this scope

Thanks in advance!


main (int argc, char *argv[])

  Ptr<Node> device1 = Names::Find<Node> ("n1");
  Ptr<Node> device2 = Names::Find<Node> ("n2");

  Simulator::Schedule (Seconds (10.0), FailLink, device1);
  Simulator::Schedule (Seconds (10.0), FailLink, device2);

  Simulator::Run ();
  Simulator::Destroy ();

  return 0;

  FailLink (Ptr<NetDevice> nd)
    Ptr<RateErrorModel> error = CreateObject<RateErrorModel> ();
    error->SetAttribute ("ErrorRate", DoubleValue (1.0));

    nd->SetAttribute ("ReceiveErrorModel", PointerValue (error));
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20130429/1033d0c3/attachment.html>

More information about the ndnSIM mailing list