[ndnSIM] How to add a new variable

呂建德 v0918732669 at gmail.com
Fri Feb 10 04:06:41 PST 2017


Dear all

I want to add a new variable in data.hpp and  create get&set functions.
Then , in ndn-producer.cpp::oninterest , i use set functions like below.

data->setString(str);
//std::cout << data->getString() << std::endl;
I make sure that the str was set.

but , in ndn-consumer.cpp::ondata , i use get functions like below.

std::cout << data->getString() << std::endl;

there is something wrong, str is empty!

why i want to do that is the content may be encoded ,
and the consumer will receive some trash that i dont need.

can someone help me to solve this questions
I need some steps or tips.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170210/85910442/attachment.html>


More information about the ndnSIM mailing list