<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::AddOrigins(std::string&, ns3::Ptr<ns3::Node>&)¡¯</font></div><div><div><font color="#ff0000">         ndnGlobalRoutingHelper.AddOrigins(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>(tNode);</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 ------------------</div><div style="font-size: 12px;background:#efefef;padding:8px;"><div><b>From: </b> "John Baugh";<jpbaugh@umich.edu>;</div><div><b>Date: </b> Tue, May 23, 2017 04:48 PM</div><div><b>To: </b> "ÈÎÅæ"<renpei.bupt@qq.com>; <wbr></div><div><b>Cc: </b> "ndnsim"<ndnsim@lists.cs.ucla.edu>; <wbr></div><div><b>Subject: </b> Re: [ndnSIM] What is the correct namespace</div></div><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.<wbr>AddOrigins(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::<wbr>GlobalRoutingHelper' 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">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/<wbr>mailman/listinfo/ndnsim</a><br>
<br></blockquote></div></div></div>