<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Xiaoke,<div><br></div><div>The first one, as I mentioned, will definitely not work.  The second check should work... At least it worked when I did something similar in my simulations...</div><div><br></div><div>---</div><div>Alex</div><div><br><div><div>On Jul 10, 2013, at 11:41 PM, Xiaoke Jiang <<a href="mailto:shock.jiang@gmail.com">shock.jiang@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
                <div style="font-family: Helvetica; font-size: 13px; "><div style="margin: 0px; "><font face="Monaco"><span style="font-size: 11px;">In fact, I watched the simulation from several point:</span></font></div><div style="margin: 0px; "><font face="Monaco"><span style="font-size: 11px;"><br></span></font></div><div style="margin: 0px; "><font face="Monaco"><span style="font-size: 11px;">1. drop packet:</span></font></div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(57, 51, 255); "><span style="">oss << </span>"/NodeList/*/DeviceList/*/$ns3::PointToPointNetDevice/TxQueue/Drop"<span style="">;</span></div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(78, 144, 114); "><span style="">    </span>//<span style="text-decoration: underline">Config</span>::Connect (oss.str (), MakeBoundCallback (&AsciiTraceHelper::DefaultDequeueSinkWithContext, stream));</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; ">    Config::ConnectWithoutContext(oss.str(), MakeCallback(&P2PDropPacket));</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; "><br></div><div style="margin: 0px; font-size: 11px; font-family: Monaco; ">2.unsatisfied requests: timeout request entries of end consumers.</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; "><br></div><br></div>
                <div><div><br></div><div style="font-family: Futura; font-size: 13px; "><div style="color: rgb(34, 34, 34); font-size: small; background-color: rgb(255, 255, 255); font-family: arial; "><font face="'comic sans ms', sans-serif">thanks</font><br><br><font face="garamond, serif"><font size="4">My Regards,</font><br></font></div><hr align="left" size="1" style="color: rgb(34, 34, 34); font-size: small; font-family: arial; width: 210px; min-height: 1px; "><div style="color: rgb(34, 34, 34); font-size: small; background-color: rgb(255, 255, 255); font-family: arial; "><font face="garamond, serif"><div><span style="font-size: 10.5pt; ">Xiaoke (Shock) Jiang (蒋小可)</span></div><div><span style="font-size: 10.5pt; "><br></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Ph.D. Candidate,</font></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Department of Computer Science and Technology,</font></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Tsinghua University, Beijing, P.R.China. 100084</font></span></div></font></div></div></div><p style="color: #A0A0A8;">On Thursday, July 11, 2013 at 2:38 PM, Alex Afanasyev wrote:</p>
                <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
                    <span><meta http-equiv="Content-Type" content="text/html charset=utf-8">If you're trying to see packet drop on link layer (see red line in visualizer), then you would not see anything, since packet be dropped before coming to there (inside ndn::Face).<div><br></div><div>---</div><div>Alex</div><div><br><div><div>On Jul 10, 2013, at 11:36 PM, Xiaoke Jiang <<a href="mailto:shock.jiang@gmail.com">shock.jiang@gmail.com</a>> wrote:</div><br><blockquote type="cite">
                <div style="font-family: Helvetica; font-size: 13px; ">Hi Alex,</div><div style="font-family: Helvetica; font-size: 13px; "><span style="white-space:pre">        </span>The code can compile without error, but the result may be not right.</div><div style="font-family: Helvetica; font-size: 13px; "><br></div><div style="font-family: Helvetica; font-size: 13px; "><span style="white-space:pre"> </span>I disabled the one link at Seconds(5.0), some packets should be dropped, while I can't find any. I am trying to detect whether SetUp works.</div>
                <div><div><br></div><div style="font-family: Futura; font-size: 13px; "><div style="color: rgb(34, 34, 34); font-size: small; background-color: rgb(255, 255, 255); font-family: arial; "><font face="'comic sans ms', sans-serif">thanks</font><br><br><font face="garamond, serif"><font size="4">My Regards,</font><br></font></div><hr align="left" size="1" style="color: rgb(34, 34, 34); font-size: small; font-family: arial; width: 210px; min-height: 1px; "><div style="color: rgb(34, 34, 34); font-size: small; background-color: rgb(255, 255, 255); font-family: arial; "><font face="garamond, serif"><div><span style="font-size: 10.5pt; ">Xiaoke (Shock) Jiang (蒋小可)</span></div><div><span style="font-size: 10.5pt; "><br></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Ph.D. Candidate,</font></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Department of Computer Science and Technology,</font></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Tsinghua University, Beijing, P.R.China. 100084</font></span></div></font></div></div></div><p style="color: #A0A0A8;">On Thursday, July 11, 2013 at 1:22 AM, Alex Afanasyev wrote:</p><blockquote type="cite">
                    <span><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div>Hi Xiaoke,</div><div><br></div><div>The approaches are not wrong, you just need to add a little bit of C++ syntax craziness to it :)</div><div><br></div><div><span style="font-family: Monaco; font-size: 11px; text-decoration: underline; ">Simulator::Schedule(Seconds(hd), &ns3::ndn::Face::SetUp, face1, </span><span style="font-family: Monaco; font-size: 11px; text-decoration: underline; color: rgb(147, 26, 104); ">false</span><span style="font-family: Monaco; font-size: 11px; text-decoration: underline; ">);</span><br><div style="font-family: Helvetica; font-size: 13px; "><div style="margin: 0px; font-size: 11px; font-family: Monaco; "><span style="color: rgb(0, 97, 65); ">Simulator</span>::Schedule(Seconds(hd), &<span style="text-decoration: underline; font-size: 13px; ">ns3::ndn::Face::SetUp, </span><span style="font-size: 11px; ">face2,</span><span style="font-size: 11px; "> </span><span style="font-size: 11px; color: rgb(147, 26, 104); ">false</span><span style="font-size: 11px; ">);</span></div></div></div><div><div style="font-family: Helvetica; font-size: 13px; "><div style="margin: 0px; font-size: 11px; font-family: Monaco; "><br></div></div></div><div>Or, if you define the FailLink function (as a global function or static in some class), you can do a little bit simpler things</div><div><pre style="overflow-x: auto; overflow-y: hidden; padding: 5px; line-height: 14px; border-top-width: 1px; border-bottom-width: 1px; border-style: solid none; border-top-color: rgb(170, 204, 153); border-bottom-color: rgb(170, 204, 153); font-size: 12px; "><span style="color: rgb(144, 32, 0);">void</span>
<span style="color: rgb(6, 40, 126);">FailLinks</span> <span>(</span><span>Ptr</span><span style="color: rgb(102, 102, 102);"><</span><span>Node</span><span style="color: rgb(102, 102, 102);">></span> <span>node1</span><span>,</span> <span>Ptr</span><span style="color: rgb(102, 102, 102);"><</span><span>Node</span><span style="color: rgb(102, 102, 102);">></span> <span>node2</span><span>)</span>
</pre></div><br><div>Simulator::Schedule (Seconds (10.0), FailLinks, Names::Find<Node> ("node1"), Names::Find<Node> ("node2"));</div><div><br></div><div><br></div><div>I haven't checked, but I hope this code should compile. Let me know if it doesn't, so I'll double check.</div><div><br></div><div>---</div><div>Alex</div><div><br></div><br><div><div>On Jul 9, 2013, at 11:44 PM, Xiaoke Jiang <<a href="mailto:shock.jiang@gmail.com">shock.jiang@gmail.com</a>> wrote:</div><br><blockquote type="cite">
                <div style="font-family: Helvetica; font-size: 13px; ">thank you, Alex. But I have to fail the link at a specified time:<div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Monaco; "><span style="white-space:pre">     </span>          <span style="text-decoration: underline">Simulator::Schedule(Seconds(hd), &&ns3::ndn::Face::SetUp, face1, </span><span style="text-decoration: underline ; color: #931a68">false</span><span style="text-decoration: underline">);</span></div><div style="margin: 0px; font-size: 11px; font-family: Monaco; "><span style="white-space:pre">  </span>          <span style="color: #006141">Simulator</span>::Schedule(Seconds(hd), &face2->SetUp, <span style="color: #931a68">false</span>);</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; ">The above two approaches are wrong. What is your suggestion?</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; "><br></div></div></div>
                <div><div><br></div><div style="font-family: Futura; font-size: 13px; "><div style="color: rgb(34, 34, 34); font-size: small; background-color: rgb(255, 255, 255); font-family: arial; "><font face="'comic sans ms', sans-serif">thanks</font><br><br><font face="garamond, serif"><font size="4">My Regards,</font><br></font></div><hr align="left" size="1" style="color: rgb(34, 34, 34); font-size: small; font-family: arial; width: 210px; min-height: 1px; "><div style="color: rgb(34, 34, 34); font-size: small; background-color: rgb(255, 255, 255); font-family: arial; "><font face="garamond, serif"><div><span style="font-size: 10.5pt; ">Xiaoke (Shock) Jiang (蒋小可)</span></div><div><span style="font-size: 10.5pt; "><br></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Ph.D. Candidate,</font></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Department of Computer Science and Technology,</font></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Tsinghua University, Beijing, P.R.China. 100084</font></span></div></font></div></div></div><p style="color: #A0A0A8;">On Wednesday, July 10, 2013 at 2:09 PM, Alex Afanasyev wrote:</p><blockquote type="cite">
                    <span><meta http-equiv="content-type" content="text/html; charset=utf-8"><div style="-webkit-text-size-adjust: auto; ">With point to point links you cannot remove any of them, but you can "fail" them.  You can try to make something base on this example: <span style="font-family: '.HelveticaNeueUI'; font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); -webkit-text-size-adjust: none; "><a href="http://ndnsim.net/faq.html#code-questions">http://ndnsim.net/faq.html#code-questions</a></span></div><br>To get Ptr<Node> from string (defined in the topology file), just use something like this: Names::Find<Node> ("node1")---<div style="-webkit-text-size-adjust: auto; ">Alex</div><div style="-webkit-text-size-adjust: auto; "><br>On Jul 9, 2013, at 10:40 PM, Xiaoke Jiang <<a href="mailto:shock.jiang@gmail.com">shock.jiang@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div>
                <div>
                    Dear all,
                </div><div><span style="white-space:pre">   </span>I read a topology with AnnotatedTopologyReader, now I am trying to disable a link, say link between node1 and node2, anyone can give me any hint?</div>
                <div><div><br></div><div style="font-family: Futura; font-size: 13px; "><div style="color: rgb(34, 34, 34); font-size: small; background-color: rgb(255, 255, 255); font-family: arial; "><font face="'comic sans ms', sans-serif">thanks</font><br><br><font face="garamond, serif"><font size="4">My Regards,</font><br></font></div><hr align="left" size="1" style="color: rgb(34, 34, 34); font-size: small; font-family: arial; width: 210px; min-height: 1px; "><div style="color: rgb(34, 34, 34); font-size: small; background-color: rgb(255, 255, 255); font-family: arial; "><font face="garamond, serif"><div><span style="font-size: 10.5pt; ">Xiaoke (Shock) Jiang (蒋小可)</span></div><div><span style="font-size: 10.5pt; "><br></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Ph.D. Candidate,</font></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Department of Computer Science and Technology,</font></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Tsinghua University, Beijing, P.R.China. 100084</font></span></div></font></div></div></div>
            </div><div><span>_______________________________________________</span><br><span>ndnSIM mailing list</span><br><span><a href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a></span><br><span><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a></span><br></div></blockquote></span>
                   
                   
                   
                   
                </blockquote><div>
                    <br>
                </div>
            </blockquote></div><br></span>
                  
                  
                  
                  
                </blockquote><div>
                    <br>
                </div>
            _______________________________________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a><br><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br></blockquote></div><br></div></span>
                 
                 
                 
                 
                </blockquote>
                 
                <div>
                    <br>
                </div>
            _______________________________________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a><br>http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim<br></blockquote></div><br></div></body></html>