[ndnSIM] Get node ID in forwarder class

DJEMAA Adel a_djemaa at esi.dz
Tue Sep 21 14:15:41 PDT 2021


Hi HADIBI,
add the following libraries:
#include <ns3/simulator.h>
#include <ns3/node-list.h>
#include <ns3/node.h>
Hope this helps,
Regards.

<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Garanti
sans virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

Le mar. 21 sept. 2021 à 09:48, HADIBI ABDENNOUR via ndnSIM <
ndnsim at lists.cs.ucla.edu> a écrit :

> Hi,
> i'm trying to get node ID in forwarder class using the following code :
>
> auto node = ns3::NodeList::GetNode(ns3::Simulator::GetContext());
> std::cout<<" Node ID : "<<node->GetId()<<std::endl;
>
> It didnt work for me : error : 'ns3::NodeList' has not been declared
>
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>


-- 
Mr DJAMA Adel
Phd student
Ecole Militaire Polytechnique
Algiers 16046, ALGERIA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20210921/863dfac6/attachment.html>


More information about the ndnSIM mailing list