<div dir="ltr">Hi Alex,<div><br></div><div style>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..</div>
<div style><br></div><div style><div>../src/ndnSIM/examples/ndn-linkfailure.cc: In function ‘int main(int, char**)’:</div><div>../src/ndnSIM/examples/ndn-linkfailure.cc:160:40: error: ‘FailLink’ was not declared in this scope</div>
<div><br></div><div style>Thanks in advance!</div><div style><br></div><div style>----------------------------------</div><div><br></div></div><div><div>int</div><div>main (int argc, char *argv[])</div><div>{</div><div>......</div>
<div><br></div><div>  Ptr<Node> device1 = Names::Find<Node> ("n1");</div><div>  Ptr<Node> device2 = Names::Find<Node> ("n2");</div><div><br></div><div>  Simulator::Schedule (Seconds (10.0), FailLink, device1);</div>
<div>  Simulator::Schedule (Seconds (10.0), FailLink, device2);</div><div>  </div><div>  Simulator::Run ();</div><div>  Simulator::Destroy ();</div><div><br></div><div>  return 0;</div><div>}</div><div><br></div><div>  void</div>
<div>  FailLink (Ptr<NetDevice> nd)</div><div>  {</div><div>    Ptr<RateErrorModel> error = CreateObject<RateErrorModel> ();</div><div>    error->SetAttribute ("ErrorRate", DoubleValue (1.0));</div>
<div><br></div><div>    nd->SetAttribute ("ReceiveErrorModel", PointerValue (error));</div><div>  }</div></div></div>