[ndnSIM] How to define a function to receive the name of Data Packets from the Producer App

Kamrul Morshed shohanmk at yahoo.com
Fri Mar 1 11:57:52 PST 2019

Greetings ndnSIMers,
Using the following function, I can receive the name of the interest from the consumer node
voidCustomApp::OnInterest(std::shared_ptr<const ndn::Interest> interest){  ndn::App::OnInterest(interest); // forward call to perform app-level tracing  // do nothing else (receive interest from consumer)  NS_LOG_DEBUG("Requesting Interest from Consumer" << interest->getName());  }
Similarly,  I would like to receive the name of Data packets, however, defining a similar function would not work. 
For example,
voidCustomApp::OnData(std::shared_ptr<const ndn::Data> data){  ndn::App::OnData(data); // forward call to perform app-level tracing   // do nothing else (receive data from producer)  NS_LOG_DEBUG("Requesting Data from Producer" << data->getName());  }
What would be the correct approach to retrieve the name of the data packet ?

Sincerely,Kamrul Morshed

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20190301/11f1a1d1/attachment.html>

More information about the ndnSIM mailing list