[ndnSIM] Question about check consumer's CacheStore
Xinyu Ma
bitmxy at gmail.com
Tue Oct 8 23:07:19 PDT 2019
Hello,
You can try to include these files:
#include "ns3/ndnSIM/NFD/daemon/table/cs.hpp"
#include "ns3/ndnSIM/model/ndn-l3-protocol.hpp"
And then get a pointer to Cs from a specific node:
nfd::Cs& ptr = nodes.Get(0)->GetObject<ns3::ndn::L3Protocol>()->getForwarder()->getCs();
Best wishes,
Xinyu Ma.
> On Oct 8, 2019, at 7:05 PM, 大熊 浩也 <okuma at stu.kobe-u.ac.jp> wrote:
>
>
> Hello all,
>
> Thank you for always answering my questions. I am very saved.
>
>
> This time, I have a question about the ndn consumer application "ndn-consumer.cpp".
>
> I would like to modify the program to determine InterestName by checking its own ContentStore when Consumer sends Interest, but I do not know how to declare ContentStore object in "ndn-consumer.cpp".
>
> Referring to "forwarder.cpp", adding "ndn-consumer.cpp" to the following declaration will generate an error.
>
> ns3 :: Ptr <ns3 :: ndn :: ContentStore> csFromNdnSim
>
> ----------------------------------------------------------------------
> ../src/ndnSIM/apps/ndn-file-consumer.cpp: In member function ‘virtual bool ns3::ndn::FileConsumer::SendFilePacket()’:
> ../src/ndnSIM/apps/ndn-file-consumer.cpp:302:12: error: ‘ContentStore’ is not a member of ‘ns3::ndn’
> ns3::Ptr<ns3::ndn::ContentStore> csFromNdnSim;
> ^
> ../src/ndnSIM/apps/ndn-file-consumer.cpp:302:12: error: ‘ContentStore’ is not a member of ‘ns3::ndn’
> ../src/ndnSIM/apps/ndn-file-consumer.cpp:302:34: error: template argument 1 is invalid
> ns3::Ptr<ns3::ndn::ContentStore> csFromNdnSim;
> ^
> ../src/ndnSIM/apps/ndn-file-consumer.cpp:302:36: warning: unused variable ‘csFromNdnSim’ [-Wunused-variable]
> ns3::Ptr<ns3::ndn::ContentStore> csFromNdnSim;
> ^
> ----------------------------------------------------------------------
>
> I'd appreciate it if you could answer my questions.
>
> Regards,
> Hiroya Okuma
>
>
> _______________________________________________
> 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