[ndnSIM] additional fields in an interest

Alex Afanasyev alexander.afanasyev at ucla.edu
Mon Dec 16 11:16:57 PST 2013


Hi Andriana,

There were several "major" changes with the code relatively recently.  One thing is that content object was renamed to "Data", so you can find all the relevant code in model/ndn-data.h|cc files.

As for the warning you're getting.  This is about initialization order of member variables. In C++ they are initialized in the order they are declared, not in the order you specified in the constructor.  In your case it doesn't matter, but the compiler is over-paranoid and is "suggesting" to correct either definition (put definition of m_dcValue between m_nonce and m_nackType) or the constructor.

---
Alex

On Dec 16, 2013, at 11:10 AM, ioannoa at scss.tcd.ie wrote:

> hello everyone,
> 
> I have previously used ndnsim code for my simulations but as accidents do
> happen i now need to re-implement my stuff in the new one! Fun!
> 
> So, the thing is i had some additional fields in the interest and the
> content object but now it seems that the classes have changed and i have
> no idea how to go through it.
> 
> What happened to the content object class and why is the file of this
> implementation empty?
> 
> At the moment i only tried to add a filed in interest.h and interested.cc
> but i am getting a message of :
> 
> ../src/ndnSIM/model/ndn-interest.h:249: warning:
> ‘ns3::ndn::Interest::m_dcValue’ will be initialized after
> at the constructor where i have:
> 
> 
> Interest::Interest (Ptr<Packet> payload/* = Create<Packet> ()*/)
>  : m_name ()
>  , m_scope (0xFF)
>  , m_interestLifetime (Seconds (0))
>  , m_nonce (0)
>  , m_dcValue (0)
>  , m_nackType (NORMAL_INTEREST)
>  , m_exclude (0)
>  , m_payload (payload)
>  , m_wire (0)
> {
>  if (m_payload == 0) // just in case
>    {
>      m_payload = Create<Packet> ();
>    }
> }
> 
> Could someone advice how to deal with it or if i could find the old
> version of the code which i am more familiar with to work?
> 
> Kind regards,
> Andriana.
> 
> _______________________________________________
> 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