[ndnSIM] Making a simple (?) custom example

John Baugh jpbaugh at umich.edu
Mon Oct 31 06:08:19 PDT 2016


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> 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
> 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
>
>
> ​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> 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
>>
>> _______________________________________________
>> ndnSIM mailing list
>> ndnSIM at lists.cs.ucla.edu
>> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20161031/259a0efa/attachment.html>


More information about the ndnSIM mailing list