On 12/11/2015 01:24 PM, Christixn Criollo wrote:
> Hi, i was trying to add a module to ns3, i downloaded the protocol
> "Shortest-Path" from the next source:
>
http://www2.engr.arizona.edu/~junseok/shortest_path.html
>
> I create the path according the step 1
> in:
https://www.nsnam.org/docs/release/3.24/manual/html/new-modules.html
>
> I did some changes in wscript according the next steps but not many,
> then i just copied the files from my "download folder" to my
> src/sp-routing (new protocol) and finally did the step 8, but it didnt works
>
> Now i delete the "new protocol" from src/ and when i try to run the
> example "first" to check if ns3 still works i got the next problem Could
> not find a task generator for the name 'ns3-shortest-path'
Christixn,
This error typically arises when you have a mismatch between the wscript
and the name of your module.
If you want a module named 'shortest-path', make sure that you name the
directory 'src/shortest-path' and that in the wscript found in
'src/shortest-path/wscript', that you have a line declaring the module
with the same name:
module = bld.create_ns3_module('shortest-path', ['network'])
If you have something else in the above statement, like 'sp-routing', it
will cause the error that you cite.
The other thing to look out for when moving from ns-3.12 to ns-3.24, is
that where it used to say in the wscript:
headers = bld.new_task_gen('ns3header')
it should now say
headers = bld(features='ns3header')
but this will raise a different error if you neglect to make this change.
- Tom