<div dir="ltr">Hi ,<div>Thanks for your help,  After several days I read the source code, I realized I need append a TLV tag to this count and rewrite encode and decode function.</div><div>At the beginning, I think node pass data by directly sent the point of data, but latter, I realized it send a encoder buffer with TLV buffer packet.</div><div>Any way, thanks for your help.</div><div><br></div><div>qhsong</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-04-12 2:05 GMT+08:00 Spyridon (Spyros) Mastorakis <span dir="ltr"><<a href="mailto:mastorakis@cs.ucla.edu" target="_blank">mastorakis@cs.ucla.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi,<div><br></div><div>I do not know what exactly you have changed in the ndnSIM codebase, but I will try to make a guess on what might be going on.</div><div><br></div><div>When you retrieve a data packet from a cache, a hop count tag is added to the data packet (with a value of 0). Probably you tried to print out the value of the hop count before this is set to 0 after you retrieve a data packet from a cache. In this way, you are printing out the value of a variable that has not been initialized yet.</div><div><br></div><div>Hope that this helps.</div><div><span class="HOEnZb"><font color="#888888"><br><div>
<div><div><div><span style="float:none;display:inline!important">Spyridon (Spyros) Mastorakis</span><br><span style="float:none;display:inline!important">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" target="_blank">http://cs.ucla.edu/~mastorakis/</a><br><span style="float:none;display:inline!important">Internet Research Laboratory</span><br><span style="float:none;display:inline!important">Computer Science Department</span><br><span style="float:none;display:inline!important">UCLA</span></div><div><span style="float:none;display:inline!important"><br></span></div></div></div><div><br></div></div></font></span><div><div class="h5"><div><blockquote type="cite"><div>On Apr 9, 2016, at 6:43 AM, qhsong <<a href="mailto:ndn@sqh.me" target="_blank">ndn@sqh.me</a>> wrote:</div><br><div><div dir="ltr"><br><div class="gmail_quote"><div dir="ltr"><font face="arial, helvetica, sans-serif">Hello, </font><div><font face="arial, helvetica, sans-serif">Recently I want to accomplish a Path coordination Content Store policy on ndnSIM, and I want to a node receive a data and see the data can be or not stored in it.</font></div><div><font face="arial, helvetica, sans-serif">So I add a int attribute named hop in Data class, and then decrease it in Forward::</font>onOutgoingData, When I find this hop is 0, then I add it.</div><div><br></div><div>But I found some problem, First, It seems onOutgoingData function will call not one times in same face, and also called by may threads.So hop count number seem so wired,just like following ,Count is the hop attribute:</div><div><br></div><div><div>Face ID: 256 data=/prefix/%FE%1E Count:5</div><div>Face ID: 257 data=/prefix/%FE%1E Count:4</div><div>Face ID: 256 data=/prefix/%FE%1E Count:4</div><div>Face ID: 256 data=/prefix/%FE%1E Count:-1</div><div>Face ID: 256 data=/prefix/%FE%1E Count:160658872</div><div>Face ID: 256 data=/prefix/%FE%1E Count:160680288</div><div>Face ID: 256 data=/prefix/%FE%1E Count:161002048</div><div>Face ID: 257 data=/prefix/%FE%1E Count:160788463</div><div>Face ID: 256 data=/prefix/%FE%1E Count:160579534</div><div>Face ID: 258 data=/prefix/%FE%1E Count:160429366</div><div>Face ID: 256 data=/prefix/%FE%1E Count:5</div><div>Face ID: 257 data=/prefix/%FE%1E Count:161011245</div><div>Face ID: 256 data=/prefix/%FE%1E Count:161011240</div><div>Face ID: 256 data=/prefix/%FE%1E Count:161011235</div><div>Face ID: 256 data=/prefix/%FE%1E Count:160825346</div><div>Face ID: 256 data=/prefix/%FE%1E Count:160825342</div><div>Face ID: 256 data=/prefix/%FE%1E Count:160825338</div><div>Face ID: 256 data=/prefix/%FE%1E Count:160825334</div><div>Face ID: 256 data=/prefix/%FE%1E Count:160825330</div><div>Face ID: 257 data=/prefix/%FE%1E Count:160825327</div><div>Face ID: 258 data=/prefix/%FE%1E Count:160825325</div>​<br></div><div>I have no idea about this, could your gives me some clue on this, and how to avoid this?</div><div><br></div><div>thanks for your help.</div><span><font color="#888888"><div><br></div><div>qhsong</div>
                
        
        
                <div title="Page 6"><div><div><p><br></p></div></div></div></font></span></div></div></div></div></blockquote></div><br></div></div></div></div></blockquote></div><br></div>