[ndnSIM] Making a simple (?) custom example

Spyridon (Spyros) Mastorakis mastorakis at CS.UCLA.EDU
Mon Oct 31 16:04:04 PDT 2016


To clarify:

ndnSIM 2.2 will be using NFD 0.4.1. The CS of NFD 0.4.1 has replacement policies + handles selectors.

My opinion is that it might be easier for you to deal with the old content store to implement your own replacement policy (it offers limited support for Interest selectors though). This is just my personal feeling and I might be actually wrong.

You can take a look at the commit that updates the ndnSIM documentation for the new release here:

https://gerrit.named-data.net/#/c/3299/

Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
Internet Research Laboratory
Computer Science Department
UCLA

> On Oct 31, 2016, at 6:08 AM, John Baugh <jpbaugh at umich.edu> wrote:
> 
> Sabet,
> 
> Aha!  So ndnSIM is using an older version of NFD.  If this is so, how does one specify the content store?
> 
> Is this still customizable?  Or should we use the Old Content Store style?  Or something else?
> 
> Thanks,
> 
> John
> 
> On Mon, Oct 31, 2016 at 2:13 AM, Muhammad Hosain Abdollahi Sabet <mhasabet at gmail.com <mailto:mhasabet at gmail.com>> wrote:
> Hi John,
> 
> It's good to have you here again!
> 
> ​If you have configured ns-3 with ./waf configure --enable-examples and compiled it(I suppose you have), then you can run examples like you did (--run <name-of-the-example>). Regardless of enabling examples in the first step(./waf configure), you can always run your simulation scenario by putting the file(here ndn-tree-cs2-tracers.cc) in /scratch​ folder and run it like normal (--run ndn-tree-cs2-tracers). And if you want to have header/source files for some custom applications or something like that in your simulation, you can have your custom folder in /examples(if you have done --enable-examples) e.g.:
> /examples/JB-custom-folder
> and place the files into it, then #include them in you scenario file which should be placed in /examples folder. Likewise you can do the same with /scratch folder. I mean, you can have your custom directory
> /scratch/JB-custom-folder
> and put you custom files in it, then #include them in the scenario file. Also you can use scenario-template:
> https://github.com/named-data-ndnSIM/scenario-template <https://github.com/named-data-ndnSIM/scenario-template>
> Just follow the instruction mentioned in the page.
> 
> -----------------
> ​When I move up a couple directories and run ./wra --run=ndn-tree-cs2-tracers, I get an error saying that "SetContentStore is not a member of ns3::ndn::StackHelper", but it's right there in your documentation.
>  
> No. Compiler is right :) SetContentStore is not a member of StackHelper. You can check here:
> http://ndnsim.net/2.1/doxygen/classns3_1_1ndn_1_1StackHelper.html <http://ndnsim.net/2.1/doxygen/classns3_1_1ndn_1_1StackHelper.html>
> 
> 
> ​Is this still recommended, or can we freely use the NDF version now with no serious issues?  The previous e-mails seem to imply this.
> 
> ​As you probably know, ndnSIM uses a different(older) version of NFD. NFD's latest version is 0.5, while ndnSIM 2.1 is using 0.3.4 and ndnSIM 2.2 is going to use 0.4. Of course you can try compiling NFD's latest version with ndnSIM, ​but you will get many errors.
> 
> I hope my answer is not that complicated as it seems.
> 
> Thanks,
> Sabet
> 
> 
> 
> On Mon, Oct 31, 2016 at 8:15 AM, John Baugh <jpbaugh at umich.edu <mailto:jpbaugh at umich.edu>> wrote:
> Greetings again, ndnSIM friends,
> 
> Sorry to bother you all again.  As I tackle this simulator and all the different files and such, I'm finding it somewhat overwhelming at times.  So I hope you can understand if I'm asking silly questions.
> 
> Here's my naive thought:
> 
> I should be able to just go into the ndnSIM/ns-3/src/ndnSIM/examples directory, copy one of the files, say ndn-tree-cs-tracers to ndn-tree-cs2-tracers (note that 2 in the name).
> 
> Then, I did notice that if I move up a couple directories and run ./waf --run=ndn-tree-cs2-tracers it does seem to work.
> 
> Is this the directory we should always work out of?  Will Waf always find the file even if I make my own custom directory?
> 
> Also, it looks like most (all?) of the examples on the ndnSIM site use the Old Content store.  ​​Is this still recommended, or can we freely use the NDF version now with no serious issues?  The previous e-mails seem to imply this.
> 
> -----------------------------
> 
> I tried commenting out the SetOldContentStore lines and added a call to SetContentStore:
> 
> ndnHelper.SetContentStore ("ns3::ndn::cs::Lru",
>                            "MaxSize", "10000");
> 
> ​​When I move up a couple directories and run ./wra --run=ndn-tree-cs2-tracers, I get an error saying that "SetContentStore is not a member of ns3::ndn::StackHelper", but it's right there in your documentation.
> 
> I'm very confused and just trying to get my feet wet with the actual code before I dive in.  
> 
> Thanks!
> 
> John
> 

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


More information about the ndnSIM mailing list