[ndnSIM] Modifying pit structure

nabil khemache khemache.nabil at gmail.com
Mon May 4 10:31:17 PDT 2020


Hello to all
I'm trying to modify the pit-entry structure, and i've started with
something very simple, just one private integer and two member function
(set and get).

In the pit-entry. hpp i've done this:
public:
public:
void
setinteger(int value)
{
m_integer=value;
}

int
getinteger() const
{
return m_integer;
}
and this
private:
shared_ptr<const Interest> m_interest;
InRecordCollection m_inRecords;
OutRecordCollection m_outRecords;
name_tree::Entry* m_nameTreeEntry;
int m_integer;
also i've modified the constructor to initialize the value, so in the
pit-entry.cpp i did this:
namespace nfd {
namespace pit {

Entry::Entry(const Interest& interest)
: isSatisfied(false)
, dataFreshnessPeriod(0_ms)
, m_interest(interest.shared_from_this())
, m_nameTreeEntry(nullptr)
, m_integer(0)
{

}
like you see, it's a very basic modification, but when i try to call one of
those member functions, like, in the MulticastStrategy functions:
void
MulticastStrategy::afterReceiveInterest(const Face& inFace, const Interest&
interest,
const shared_ptr<pit::Entry>& pitEntry)
{

pitEntry.m_integer=100;


I get this error message :
[2365/3208] Compiling src/ndnSIM/NFD/daemon/fw/multicast-strategy.cpp
../src/ndnSIM/NFD/daemon/fw/multicast-strategy.cpp: In member function
‘virtual void nfd::fw::MulticastStrategy::afterReceiveInterest(const
nfd::face::Face&, const ndn::Interest&, const
std::shared_ptr<nfd::pit::Entry>&)’:
../src/ndnSIM/NFD/daemon/fw/multicast-strategy.cpp:122:22: error: ‘const
class std::shared_ptr<nfd::pit::Entry>’ has no member named ‘setinteger’
             pitEntry.setinteger(100);
                      ^

If anyone can help, i would be very grateful.
thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20200504/a142e447/attachment.html>


More information about the ndnSIM mailing list