[ndnSIM] What is the correct namespace
renpei.bupt at qq.com
Tue May 23 02:15:31 PDT 2017
Thank you for you reply, your suggestion really works! While after i compile the code, i got the error:
no matching function for call to ‘ns3::ndn::GlobalRoutingHelper::AddOrigins(std::string&, ns3::Ptr<ns3::Node>&)’
I don't know why the error will happen, cause the code
ns3::Ptr<ns3::Node> testNode = ns3::Names::Find<ns3::Node>(tNode);
now works well, the form of "testNode" is apparently ns3::Ptr<ns3::Node>?
------------------ Original ------------------
From: "John Baugh";<jpbaugh at umich.edu>;
Date: Tue, May 23, 2017 04:48 PM
To: "任沛"<renpei.bupt at qq.com>;
Cc: "ndnsim"<ndnsim at lists.cs.ucla.edu>;
Subject: Re: [ndnSIM] What is the correct namespace
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);
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.
ndnSIM mailing list
ndnSIM at lists.cs.ucla.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ndnSIM