[ndnSIM] Dir structure under scenario template.

Alex Afanasyev aa at cs.ucla.edu
Wed May 3 19:11:57 PDT 2017


> On May 3, 2017, at 6:29 PM, Anil Jangam <anilj.mailing at gmail.com> wrote:
> 
> Hi Spyros, Alex,
> 
> I am working on a use case where I am trying to use the 'scenario template'. Under the 'extensions' folder, I see a note:
> 
> In this directory you can put any .cc file you want to be compiled and linked to your scenarios.
> 
> This mainly useful for custom extension of ndnSIM and NS-3.
> 
> extensions/README.md (END)
> 
> So, following the note, I have a put a bunch of .hpp and .cpp files under the 'extension' folder having a sub directory structure as follows.
> 
> extensions/utils/utils.hpp
> extensions/utils/utils.cpp
> extensions/tools/tools.hpp
> extensions/tools/tools.cpp
> extensions/example/example.hpp
> extensions/example/example.cpp
> 
> However, are we supposed to keep only .hpp and .cpp here? In the example provided, they have all code file under extension folder. https://github.com/named-data-ndnSIM/scenario-ChronoSync/tree/master/extensions
> 
> I am including some of the headers in my application code e.g. #include "utils/utils.hpp", #include "utils/tools.hpp", but this does not seems to work. Most of the cases, compiler is not able to find the headers. Is this correct approach to organize the scenario code?

Check wscript.  The build rules will automatically add "extensions" folder to the header include path for any of the scenarios.  Currently, they don't do the same for the extension code, e.g., inside extension/ folder you need to use relative path for includes.  If you want to change that, replace in wscript

    common = bld.objects (
        target = "extensions",
        features = ["cxx"],
        source = bld.path.ant_glob(['extensions/**/*.cc', 'extensions/**/*.cpp']),
        use = deps,
***** includes = "extensions" *****
        )

(without ******)



> 
> I also see another related thread going on, and looks like I have to deal with that problems as well.
> http://www.lists.cs.ucla.edu/pipermail/ndnsim/2017-May/003726.html

I hope Yoshimichi Nakatsuka's answers addressed that.  Thank you very much Yoshimichi for the detailed explanation, we'll try to incorporate it on ndnSIM website asap.

--
Alex

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170503/87e571b3/attachment.sig>


More information about the ndnSIM mailing list