[ndnSIM] Adding new field to data packet

Renato Cavalcante renato.frca at gmail.com
Mon Oct 16 18:14:07 PDT 2017


Hi all,

I created a new field to Data packet, following this steps:
http://www.lists.cs.ucla.edu/pipermail/ndnsim/2015-July/002039.html

The my field created "Access" store the access in the data. On the
ContentStore Policy this need to be updated (here is the problem).

The alterations aren't persistent on Datas stored on the Data Structure
from the custom policy.


*src/data.hpp*
//my field
mutable uint32_t m_access = 1;

//get
inline uint32_t
Data::getCountAccessData() const
{
  return m_access;
}

*src/data.cpp*
// set
Data&
Data::setCountAccessData(uint32_t cAccess)
{
onChanged();
m_access = cAccess;
return *this;
}

I added my field to tlv.hpp and i respected wireEncod and wireDecode.


Thanks.

-- 
Renato Araújo
Computer Science Department
UFBA -- Brazil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20171016/c335189d/attachment.html>


More information about the ndnSIM mailing list