<div dir="auto">Glad I could be helpful :)</div><div class="gmail_extra"><br><div class="gmail_quote">On May 23, 2017 11:34 PM, "任沛" <<a href="mailto:renpei.bupt@qq.com">renpei.bupt@qq.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi John,</div><div><br></div><div>I'm really appreciate for your help, the approach you provided works well!</div><div><br></div><div>Thanks,</div><div><br></div><div>Pei Ren</div><div><br></div><div><div style="color:#909090;font-family:Arial Narrow;font-size:12px">------------------</div><div style="font-size:14px;font-family:Verdana;color:#000"><div>祝好!</div></div></div><div> </div><div><div><br></div><div><br></div><div style="font-size:12px;font-family:Arial Narrow;padding:2px 0 2px 0">------------------ Original --<wbr>----------------</div><div style="font-size:12px;background:#efefef;padding:8px"><div><b>From: </b> "John Baugh";<<a href="mailto:jpbaugh@umich.edu" target="_blank">jpbaugh@umich.edu</a>>;</div><div><b>Date: </b> Tue, May 23, 2017 08:28 PM</div><div><b>To: </b> "任沛"<<a href="mailto:renpei.bupt@qq.com" target="_blank">renpei.bupt@qq.com</a>>; </div><div><b>Cc: </b> "ndnsim"<<a href="mailto:ndnsim@lists.cs.ucla.edu" target="_blank">ndnsim@lists.cs.<wbr>ucla.edu</a>>; </div><div><b>Subject: </b> Re: [ndnSIM] What is the correct namespace</div></div><div><br></div><div dir="auto"><div>Your second argument (testNode) is of type Ptr<Node>, but AddOrigins requires a NodeContainer:</div><div dir="auto"><br></div><div dir="auto">see the examples:</div><div dir="auto">  </div><div dir="auto"><a href="https://ndnsim.net/2.3/examples.html" target="_blank">https://ndnsim.net/2.3/example<wbr>s.html</a><br></div><div dir="auto"><br></div><div dir="auto">AND documentation for NodeContainer:</div><div dir="auto"><br></div><div dir="auto"><a href="https://www.nsnam.org/%7Epdbarnes/docs-related/classns3_1_1_node_container.html" target="_blank">https://www.nsnam.org/~<wbr>pdbarnes/docs-related/<wbr>classns3_1_1_node_container.<wbr>html</a><br></div><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto"><br></div><div dir="auto">John</div><div dir="auto"> <br><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">On May 23, 2017 5:24 AM, "任沛" <<a href="mailto:renpei.bupt@qq.com" target="_blank">renpei.bupt@qq.com</a>> wrote:<br type="attribution"><blockquote class="m_7781711708380626656m_-1680863079506338491m_-393072641643333661m_-5650495206965620503quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi John,</div><div><br></div><div>Thank you for you reply, your suggestion really works! While after i compile the code, i got the error:</div><div><br></div><div><font color="#ff0000">no matching function for call to ‘ns3::ndn::GlobalRoutingHelper<wbr>::AddOrigins(std::string&, ns3::Ptr<ns3::Node>&)’</font></div><div><div><font color="#ff0000">         ndnGlobalRoutingHelper.AddOri<wbr>gins(prefix, testNode);</font></div><div><font color="#ff0000">                                                                                  ^</font></div></div><div><br></div><div>I don't know why the error will happen, cause the code</div><div><br></div><div><font color="#ff0000">ns3::Ptr<ns3::Node> testNode = ns3::Names::Find<ns3::Node>(tN<wbr>ode);</font></div><div><br></div><div>now works well, the form of "testNode" is apparently ns3::Ptr<ns3::Node>?</div><div><br></div><div>Thank you!</div><div><br></div><div>Pei Ren</div><div><div><br></div><div style="font-size:12px;font-family:Arial Narrow;padding:2px 0 2px 0">------------------ Original --<wbr>----------------</div><div style="font-size:12px;background:#efefef;padding:8px"><div><b>From: </b> "John Baugh";<<a href="mailto:jpbaugh@umich.edu" target="_blank">jpbaugh@umich.edu</a>>;</div><div><b>Date: </b> Tue, May 23, 2017 04:48 PM</div><div><b>To: </b> "任沛"<<a href="mailto:renpei.bupt@qq.com" target="_blank">renpei.bupt@qq.com</a>>; </div><div><b>Cc: </b> "ndnsim"<<a href="mailto:ndnsim@lists.cs.ucla.edu" target="_blank">ndnsim@lists.cs.ucla<wbr>.edu</a>>; </div><div><b>Subject: </b> Re: [ndnSIM] What is the correct namespace</div></div><div class="m_7781711708380626656m_-1680863079506338491m_-393072641643333661m_-5650495206965620503elided-text"><div><br></div><div dir="auto">Perhaps you are missing #include directives?  For example, names.h is where Names lives.<div dir="auto"><br></div><div dir="auto">Names is a class declared in ns3, and inside ns3 namespace.</div><div dir="auto"><br></div><div dir="auto">So ns3::Names::Find might work?</div><div dir="auto"><br></div><div dir="auto">And GlobalRoutingHelper is in ndn-global-routing-helper.h</div><div dir="auto"><br></div><div dir="auto">Does this help?</div><div dir="auto"><br></div><div dir="auto">John</div></div><div class="gmail_extra"><br><div class="gmail_quote">On May 23, 2017 4:37 AM, "任沛" <<a href="mailto:renpei.bupt@qq.com" target="_blank">renpei.bupt@qq.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi ndnSIM friends,</div><div><br></div><div>In NFD/daemon/fw/forwarder.cpp, i add below codes to the onIncomingData():</div><div><br></div><div><div>ns3::Ptr<ns3::Node> testNode = Names::Find<ns3::Node>(tNode);<br>ns3::ndn::GlobalRoutingHelper ndnGlobalRoutingHelper;<br>ndnGlobalRoutingHelper.AddOrig<wbr>ins(prefix, testNode);<br>ns3::ndn::GlobalRoutingHelper:<wbr>:CalculateRoutes();</div><div><br></div><div>where "tNode" and "prefix" above is in the form of std::string. What i tried to do is to tell all the another nodes that the current node can provide the content with specific prefix. While when i compile the source code, i got below message:</div><div><br></div><div>'Names' has not been declared</div><div>expected primary-expression before '>' token</div><div>'GlobalRoutingHelper' is not a member of 'ns3::ndn'</div><div>expected ';' before 'ndnGlobalRoutingHelper'</div><div>'ndnGlobalRoutingHelper' was not declareded in this scope</div><div>'ns3::ndn::GlobalRoutingHelper<wbr>' has not been declared</div><div><br></div><div>What is the correct namespace? </div><div><br></div><div>Look forward to your reply.</div></div><div><br></div><div>Pei Ren</div><br>______________________________<wbr>_________________<br>
ndnSIM mailing list<br>
<a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/m<wbr>ailman/listinfo/ndnsim</a><br>
<br></blockquote></div></div></div></div></blockquote></div>Looking</div></div></div></div></blockquote></div></div>