[ndnSIM] Node name

Alex Afanasyev aa at CS.UCLA.EDU
Sun Dec 18 13:56:46 PST 2016


To get hold of Ptr<Node>, you can use the following

Ptr<ns3::Node> node = item->payload()->GetContentStore()->template GetObject<ns3::Node>();

If you have associated name with the node (e.g., by using the AnnotatedTopologyReader), then you can get hold of it using Names API:

std::string name = Names::FindName(node)

--
Alex

> On Dec 18, 2016, at 1:36 PM, Fatemeh Goudarzi <fatemeh.university at gmail.com> wrote:
> 
>  Hi,
> 
> How to access node name in random-policy.hpp? I need to access some nodes in a node container with their names . Also How can I access to ptr<node> from its name؟
> I do appreciate your help.
> 
> Regards,
> Fatemeh
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim




More information about the ndnSIM mailing list