<div dir="ltr">Hi Xinyu,<div><br></div><div>That's what am worrying about. If there is a way to overcome the "members being private" issue kindly help me. There is only one private member that is creating the problem as I mentioned before.</div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><span style="font-size:12.8px">Best Regards,</span></div><div dir="ltr"><span style="font-size:12.8px">Ashish Pradhan<br></span><div style="font-size:12.8px"><div style="font-size:12.8px"><br></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Nov 26, 2018 at 3:02 PM Xinyu Ma <<a href="mailto:bitmxy@gmail.com">bitmxy@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Sorry for replying late.<div><div><br><blockquote type="cite"><div>On Nov 25, 2018, at 4:31 PM, Ashish Pradhan <<a href="mailto:ashishpradhan1162@gmail.com" target="_blank">ashishpradhan1162@gmail.com</a>> wrote:</div><br class="m_3200275428339490630Apple-interchange-newline"><div><div dir="ltr">Hi all,<div><br></div><div>Thank you for all your support and guidance. I was not able to send Data with “m_forwarder.onOutgoingData” instead of  “sendData” as stated before. So, I changed the Strategy.cpp of the NFD and reinstalled everything so that my separate repository is also able to use the updated Strategy.cpp. In the Strategy.cpp I just commented out the  "pitEntry->deleteInRecord(outFace); ". </div><div><br></div></div></div></blockquote><div>Congratulations. But be aware that this will affect all strategies, so most normal scenarios may not work properly.</div><div><br></div><div>Best,</div><div>Xinyu Ma.</div><br><blockquote type="cite"><div><div dir="ltr"><div>Now the multiple data produced are able to reach the consumer with just one interest.</div><div><div><div dir="ltr" class="m_3200275428339490630gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Best Regards</div><div style="font-size:12.8px"><span style="font-size:12.8px">Ashish Pradhan,</span><br></div><div style="font-size:12.8px"><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Nov 25, 2018 at 6:58 PM Ashish Pradhan <<a href="mailto:ashishpradhan1162@gmail.com" target="_blank">ashishpradhan1162@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>This is my sendData reimplementation code(just commented the 2 lines):<br></div><div dir="ltr">void CustomStrategy::sendData(const shared_ptr<pit::Entry>& pitEntry, const Data& data, const Face& outFace)<br>{<br>      //BOOST_ASSERT(pitEntry->getInterest().matchesData(data));<br><br>      // delete the PIT entry's in-record based on outFace,<br>      // since Data is sent to outFace from which the Interest was received<br>      //pitEntry->deleteInRecord(outFace);<br>      NFD_LOG_INFO("pitEntry not deleted");<br><br>      Strategy::m_forwarder.onOutgoingData(data, *const_pointer_cast<Face>(outFace.shared_from_this()));</div><div>}</div><div>I get this error : error: ‘nfd::Forwarder& nfd::fw::Strategy::m_forwarder’ is private within this context<br><br clear="all"></div><div dir="ltr"><div><div dir="ltr" class="m_3200275428339490630m_2424544278774303177gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><span style="font-size:12.8px"></span>Best Regards,</div><div>Ashish Pradhan<br></div></div></div></div></div></div></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Nov 25, 2018 at 6:35 PM Ashish Pradhan <<a href="mailto:ashishpradhan1162@gmail.com" target="_blank">ashishpradhan1162@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hello Xinyu,</div><div><br></div><div>Thank you for reaching out. Trying to send Data with “<span>m_forwarder.</span><span>onOutgoingData</span><span>” gives an error of m_forwarder being a private member. <br></span></div><div><span><br></span></div><div><span>The multiple data objects have the same name.<br></span></div><div><div><div dir="ltr" class="m_3200275428339490630m_2424544278774303177m_6500058237771087616gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><span style="font-size:12.8px"></span><div style="font-size:12.8px"><br></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Nov 25, 2018 at 6:17 PM Xinyu Ma <<a href="mailto:bitmxy@gmail.com" target="_blank">bitmxy@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Hello, Pradhan<br><div><br><blockquote type="cite"><div>On Nov 24, 2018, at 9:38 PM, Ashish Pradhan <<a href="mailto:ashishpradhan1162@gmail.com" target="_blank">ashishpradhan1162@gmail.com</a>> wrote:</div><br class="m_3200275428339490630m_2424544278774303177m_6500058237771087616m_-5506212483604157237Apple-interchange-newline"><div><div dir="ltr"><div dir="ltr"><div dir="ltr" class="m_3200275428339490630m_2424544278774303177m_6500058237771087616m_-5506212483604157237gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px">Can't this be done simply by making a custom strategy and using the setExpiryTimer? If not, where is the setExpiryTimer useful?</div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">In the documentation it is mentioned that "</span><span style="font-size:13px;font-family:"Lucida Grande",Verdana,Geneva,Arial,sans-serif">If the strategy wishes to collect responses from additional upstream nodes, it should invoke </span><code style="font-size:13px">setExpiryTimer</code><span style="font-size:13px;font-family:"Lucida Grande",Verdana,Geneva,Arial,sans-serif"> within this function to prolong the PIT entry lifetime. If a Data arrives from another upstream during the extended PIT entry lifetime, this trigger will be invoked again. At that time, this function must invoke </span><code style="font-size:13px">setExpiryTimer</code><span style="font-size:13px;font-family:"Lucida Grande",Verdana,Geneva,Arial,sans-serif"> again to continue collecting more responses.</span><span style="font-size:12.8px">" <a href="http://ndnsim.net/current/doxygen/classnfd_1_1fw_1_1Strategy.html#a97b4f1e5496c4dd08cc17b5d3d265f08" target="_blank">http://ndnsim.net/current/doxygen/classnfd_1_1fw_1_1Strategy.html#a97b4f1e5496c4dd08cc17b5d3d265f08</a></span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Shouldn't this simply work?</span></div></div></div></div></div></div></div></div><br></div></blockquote><div><br></div><div>Yes, this works if you only want to "<span>prolong the PIT entry lifetime</span><span>” and “</span><span>collecting more responses</span><span>” at this node.</span></div><div><span>But what you need is to continue forwarding data, which means the in-record of PIT entry should not be deleted.</span></div><div><span>In-records are deleted in the “</span><span>Strategy::sendData</span><span>” function, which is called by “</span>Strategy::afterReceiveData” after “beforeSatisfyInterest”</div><div>So if you don’t want to hack NFD, you can override “afterReceiveData” and try to send Data with “<span>m_forwarder.</span><span>onOutgoingData</span><span>” but not  “sendData”.</span></div><br><blockquote type="cite"><div><div class="gmail_quote"><div dir="ltr">On Sun, Nov 25, 2018 at 2:31 PM Lixia Zhang <<a href="mailto:lixia@cs.ucla.edu" target="_blank">lixia@cs.ucla.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><br><div><br><blockquote type="cite"><div>On Nov 24, 2018, at 9:20 PM, Ashish Pradhan <<a href="mailto:ashishpradhan1162@gmail.com" target="_blank">ashishpradhan1162@gmail.com</a>> wrote:</div><br class="m_3200275428339490630m_2424544278774303177m_6500058237771087616m_-5506212483604157237m_2300554114872668597Apple-interchange-newline"><div><div dir="ltr">No, the producers produces multiple data objects(not segmenting into multiple data packets). </div></div></blockquote><div><br></div>no difference: the producer knows how many total packets it produces.</div><div><br></div></div></blockquote></div></div></blockquote><div><br></div><div>Could you please tell me whether the multiple data objects have the same name?</div><div>If their names are different, I think you can make it with out keep the PIT entry.</div><div><br></div><div>Best wishes,</div><div>Xinyu Ma.</div><br><blockquote type="cite"><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div><br><blockquote type="cite"><div><br><div class="gmail_quote"><div dir="ltr">On Sun, Nov 25, 2018 at 2:15 PM Lixia Zhang <<a href="mailto:lixia@cs.ucla.edu" target="_blank">lixia@cs.ucla.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><br><div><blockquote type="cite"><div>On Nov 24, 2018, at 4:08 PM, Ashish Pradhan <<a href="mailto:ashishpradhan1162@gmail.com" target="_blank">ashishpradhan1162@gmail.com</a>> wrote:</div><br class="m_3200275428339490630m_2424544278774303177m_6500058237771087616m_-5506212483604157237m_2300554114872668597m_-5697558466934445600Apple-interchange-newline"><div><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Xinyu,<div><br></div><div>Thank you for your reply.</div><div><br></div><div>I am fully aware of the One-Interest-One-Data behavior. However, I have a custom app(a producer) where it produces multiple data for a single interest.</div></div></div></div></div></blockquote><div><br></div>I would like to better understand what is going on here: do you mean the producer app generates a data object which needs to be segmented into multiple data packets?</div><div><br></div><div>If so: yes one can find a way to hack the code to allow the bread crumb of one Interest to retrieve multiple data packets, but it is unclear to me a good idea to use across a network </div><div>(one interest can retrieve the first data packet, which can carry "<span style="color:rgb(34,34,34);font-size:0.9em;background-color:rgb(247,247,247)">FinalBlockId" to inform the consumer how many more data packets to fetch).</span><div><br></div></div><div>Lixia</div><div><br></div><div><blockquote type="cite"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Then I want all the produced data to reach the consumer. So for that, I am implementing a custom strategy where the PIT entry lifetime of the nodes are extended after it receives the first data from the producer. I have followed the ndnSIM API documentation for it. </div><div><br></div><div>beforeSatisfyInterest documentation:</div><div><a href="http://ndnsim.net/current/doxygen/classnfd_1_1fw_1_1Strategy.html#a97b4f1e5496c4dd08cc17b5d3d265f08" target="_blank">http://ndnsim.net/current/doxygen/classnfd_1_1fw_1_1Strategy.html#a97b4f1e5496c4dd08cc17b5d3d265f08</a><br></div><div><br></div><div>setExpiryTimer documentation:<br></div><div><a href="http://ndnsim.net/current/doxygen/classnfd_1_1fw_1_1Strategy.html#a967ad88184231f79b245ce202e9d4ea7" target="_blank">http://ndnsim.net/current/doxygen/classnfd_1_1fw_1_1Strategy.html#a967ad88184231f79b245ce202e9d4ea7</a><br></div><div><br></div><div><div><div dir="ltr" class="m_3200275428339490630m_2424544278774303177m_6500058237771087616m_-5506212483604157237m_2300554114872668597m_-5697558466934445600gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Best regards,</div><div dir="ltr">Ashish Pradhan<br><div style="font-size:12.8px"><div style="font-size:12.8px"><br></div></div></div></div></div></div></div></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Nov 25, 2018 at 2:21 AM Xinyu Ma <<a href="mailto:bitmxy@gmail.com" target="_blank">bitmxy@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Hello, Pradhan<div><br></div><div>I’m sorry I don’t understand why you want to extend the PIT entry’s lifetime and what you mean by “data response other than the first one”.</div><div>NDN follows One-Interest-One-Data, so the PIT entry should be deleted after receiving the data.</div><div>You can send another Interest if you still want the PIT entry to be there.</div><div><br></div><div>Best,</div><div>Xinyu Ma.</div><div><div><br><blockquote type="cite"><div>On Nov 24, 2018, at 6:20 AM, Ashish Pradhan <<a href="mailto:ashishpradhan1162@gmail.com" target="_blank">ashishpradhan1162@gmail.com</a>> wrote:</div><br class="m_3200275428339490630m_2424544278774303177m_6500058237771087616m_-5506212483604157237m_2300554114872668597m_-5697558466934445600m_-7572912407932601274Apple-interchange-newline"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi all,</div><div><br></div><div>I am trying to use the setExpiryTimer to extend the PIT entry's lifetime. However the data response other than the first one is not being forwarded back to the consumer. I have included the setExpiryTimer in the beforeSatisfyInterest function as follows:</div><div>"NFD_LOG_DEBUG("beforeSatisfyInterest pitEntry=" << pitEntry->getName() <<<br>                " inFace=" << inFace.getId() << " data=" << data.getName());<br><br>  this->Strategy::setExpiryTimer(pitEntry, ndn::time::milliseconds(100));"</div><div><br></div><div>Is there any thing that needs to be added?<br></div><div><br></div><div>After looking at the sendData function there is this line "pitEntry->deleteInRecord(outFace);". If it is deleting the inRecord how does the setExpiryTimer help to preserve the entry?</div><div><br></div><div>Best regards,</div><div>Ashish Pradhan<br></div><div><div><div dir="ltr" class="m_3200275428339490630m_2424544278774303177m_6500058237771087616m_-5506212483604157237m_2300554114872668597m_-5697558466934445600m_-7572912407932601274gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><span style="font-size:12.8px"></span><div style="font-size:12.8px"><br></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br></div></blockquote></div><br></div></div></blockquote></div></div>
_______________________________________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br></div></blockquote></div><br></div></blockquote></div>
</div></blockquote></div><br></div></blockquote></div>
_______________________________________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br></div></blockquote></div><br></div></blockquote></div>
</blockquote></div>
</blockquote></div>
</div></blockquote></div><br></div></div></blockquote></div>