<div dir="ltr">Hi Junxiao,<div><br></div><div>I'm glad that you liked it :) The TLV encoding/decoding is where I spent a lot of effort. I've tried different approaches and eventually settled on the current one.</div><div><br></div><div>Two things that I found most helpful in the current design:</div><div>1/ a generic decoder function that can parse a byte array into an array of TLV blocks. The compound TLV classes can call this function recursively to build the TLV parse tree.</div><div>2/ two generic TLV base classes for those whose value is a single non-negative integer and those whose value is a UTF-8 string. New TLV classes can inherit from those base classes and simply specify the desired TLV type code. The base class will handle all the encoding/decoding work. This comes very handy when you have to write a lot of TLV classes containing non-negative integers for NFD management protocol .</div><div><br></div><div>Best,</div><div>Wentao</div><div><br></div><div><br></div><div><div class="gmail_quote">On Thu, Mar 19, 2015 at 6:20 AM Junxiao Shi <<a href="mailto:shijunxiao@email.arizona.edu">shijunxiao@email.arizona.edu</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p>Hi Wentao</p>
<p>I looked at the code, and liked the simplicity of TLV decoding procedures.<br>
It appears to be much easier to add a new TLV type in SwiftNDN than in ndn-cxx or NDN-JS.</p>
<p>I probably won't use this app because I don't have iOS devices.</p>
<p>Yours, Junxiao</p>
<div class="gmail_quote"></div><div class="gmail_quote">On Mar 18, 2015 5:09 PM, "Wentao Shang" <<a href="mailto:wentaoshang@gmail.com" target="_blank">wentaoshang@gmail.com</a>> wrote:<br type="attribution"></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi team,<div><br></div><div>I write this message to inform you that there has been major progress on porting NFD to iOS platform. As for now, I'm able to compile and run NFD as an iOS App on the iPhone simulator. I cannot test it on real device because it requires signing the package with Apple-certified developer's key which I don't have. So there might be unexpected bugs when the App runs on real iPhones :P Unfortunately the code is not available on Github yet because I'm still trying to reorganize the dependencies in order to simplify the build process. After that I'll publish the code.</div><div><br></div><div>Before I started the porting work, I was already working on a new NDN client library written in (almost) pure Swift, which is designed for Apple platforms exclusively (Mac, iPhone, iPad, etc.) It is not polished right now but you can take a look at the code at <a href="https://github.com/wentaoshang/SwiftNDN" target="_blank">https://github.com/wentaoshang/SwiftNDN</a></div><div><br></div><div>The motivation of using Swift as a development language is because it is one of the best languages for building OSX and iOS apps, especially when you need a GUI interface using Cocoa or Cocoa Touch. (The other choice is Objective C but I don't quite like that language. Also, Apple is promoting the new language very hard to hopefully replace the old one.)</div><div><br></div><div>Attached are some screenshots of the NFD app running on iPhone simulator. It is built with Cocoa Touch and SwiftNDN and has the basic functionality of reporting forwarder status such as faces, fib and rib information. All my testing are done primarily using this demo app and some basic consumer/producer apps built with the same libraries.</div><div><br></div><div>Best,</div><div>Wentao</div><div><br></div></div>
<br></blockquote></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">_______________________________________________<br>
Ndn-lib mailing list<br>
<a href="mailto:Ndn-lib@lists.cs.ucla.edu" target="_blank">Ndn-lib@lists.cs.ucla.edu</a><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-lib" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-lib</a><br>
<br></blockquote></div></blockquote></div></div></div>