<html><head><meta http-equiv="Content-Type" content="text/html charset=GB2312"><base href="x-msg://773/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Huqian,</div><div><br></div><div>DidSendOutData and DidSendOutInterest (as I was hoping that name would suggest) are so called events that are executed just after Data or Interest packet was send out on a face.   You can override these events in a custom strategy, e.g., to calculate statistics  or do some other processing.  In any case, these are not used and not intended to be used to send packets.</div><div><br></div><div>m_outInterests and m_outData are so called TracedCallbacks, whose sole purpose is to collect statistics.</div><div><br></div><div>---</div><div><br></div><div>To send out an Interest/Data you need to simply call Send method on Face object, similar as it is done for Interests here:</div><div><a href="https://github.com/NDN-Routing/ndnSIM/blob/master/model/fw/ndn-forwarding-strategy.cc#L573">https://github.com/NDN-Routing/ndnSIM/blob/master/model/fw/ndn-forwarding-strategy.cc#L573</a></div><div>and for Data here:</div><div><a href="https://github.com/NDN-Routing/ndnSIM/blob/master/model/fw/ndn-forwarding-strategy.cc#L391">https://github.com/NDN-Routing/ndnSIM/blob/master/model/fw/ndn-forwarding-strategy.cc#L391</a></div><div><br></div><div>---</div><div>Alex</div><br><div><div>On Mar 7, 2013, at 1:40 AM, huqian <<a href="mailto:huqian@bupt.edu.cn">huqian@bupt.edu.cn</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="line-height: 1.5; font-family: ËÎÌå; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; margin: 10px; "><div>Hi,Alex:</div><div style="text-indent: 2em; ">I have some questions about "how to send a packet ".</div><div style="text-indent: 2em; ">I found that function "DidSendOutData " in "ndn-forwarding-strategy.cc " is not implemented yet,so how does a DATA packet be sended to other nodes?</div><div style="text-indent: 2em; ">the same question about "DidSendOutInterest".</div><div style="text-indent: 2em; ">do functions "m_outInterests" and "m_outData" send out the packet actually?I am confused that how do they work.....</div><div style="text-indent: 2em; ">I try to implement that,one node can send a kind of packet defined by custom,may be not INTEREST or DATA packet.</div><div style="text-indent: 2em; ">WISH YOUR HELP,THANK YOU!</div><div style="text-indent: 2em; ">-----------------------------------------------------</div><div style="text-indent: 2em; font-weight: bold; ">related codes</div><div style="text-indent: 2em; "><div>ForwardingStrategy::DidSendOutInterest (Ptr<Face> inFace,</div><div>                                        Ptr<Face> outFace,</div><div>                                        Ptr<const InterestHeader> header,</div><div>                                        Ptr<const Packet> origPacket,</div><div>                                        Ptr<pit::Entry> pitEntry)</div><div>{</div><div>  m_outInterests (header, outFace);</div><div>}</div></div><div style="text-indent: 2em; "> </div><div style="text-indent: 2em; "><div>TracedCallback<Ptr<const InterestHeader>,</div><div>                 Ptr<const Face> > m_outInterests;</div></div><div style="text-indent: 2em; "> </div><div style="text-indent: 2em; "><div style="text-indent: 2em; "><div>TracedCallback<Ptr<const InterestHeader>,</div><div>                 Ptr<const Face> > m_outData ;</div></div></div><hr align="left" size="1" style="width: 210px; height: 1px; "><div><span>Huqian</span></div>_______________________________________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a><br><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br></div></blockquote></div><br></body></html>