[ndnSIM] What is the correct namespace

John Baugh jpbaugh at umich.edu
Tue May 23 01:48:00 PDT 2017

Perhaps you are missing #include directives?  For example, names.h is where
Names lives.

Names is a class declared in ns3, and inside ns3 namespace.

So ns3::Names::Find might work?

And GlobalRoutingHelper is in ndn-global-routing-helper.h

Does this help?


On May 23, 2017 4:37 AM, "任沛" <renpei.bupt at qq.com> wrote:

> Hi ndnSIM friends,
> In NFD/daemon/fw/forwarder.cpp, i add below codes to the onIncomingData():
> ns3::Ptr<ns3::Node> testNode = Names::Find<ns3::Node>(tNode);
> ns3::ndn::GlobalRoutingHelper ndnGlobalRoutingHelper;
> ndnGlobalRoutingHelper.AddOrigins(prefix, testNode);
> ns3::ndn::GlobalRoutingHelper::CalculateRoutes();
> 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:
> 'Names' has not been declared
> expected primary-expression before '>' token
> 'GlobalRoutingHelper' is not a member of 'ns3::ndn'
> expected ';' before 'ndnGlobalRoutingHelper'
> 'ndnGlobalRoutingHelper' was not declareded in this scope
> 'ns3::ndn::GlobalRoutingHelper' has not been declared
> What is the correct namespace?
> Look forward to your reply.
> Pei Ren
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170523/86563d88/attachment.html>

More information about the ndnSIM mailing list