Setdest problem with $god in ns-2

http://mailman.isi.edu/…038047.html

** My solution in NS-2 ver.2.26 (all-in-one distribution) ***

setdest.cc:
Using $god_ as a variable in scenario files is wrong.
When running the actual version of NS-2, “GOD” is not a variable. Is a TCL
Class, called “God” (“G” is uppercase and “o” and “d” are lowercase),
located
in module “god.cc”.

Solution:
Change these lines in setdest.cc:

Original:

#define GOD_FORMAT "$ns_ at %.12f \"$god_ set-dist %d %d %d\"\n"
#define GOD_FORMAT2 "$god_ set-dist %d %d %d\n"

Modified:

#define GOD_FORMAT "$ns_ at %.12f \"God set-dist %d %d %d\"\n"
#define GOD_FORMAT2 "God set-dist %d %d %d\n"

You may have to change text “$god_” (variable?) to “God” (Class name) in
these definition lines and RE-COMPILE (run “make” again).

It´s ready!

After these modifications the “setdest” runs normally for all scenarios
generations and my simulations are OK now.

Hope it helps!

Cheers,

Robson Luis
robsonls@compuland.com.br

3 thoughts on “Setdest problem with $god in ns-2

  1. Vo says:

    Hi !

    I am using ns-2.26 and I have an error with SETDEST.

    I had followed your instruction; however, it informs another error :

    setdest.h:26: error: extra qualification ‘vector::’ on member ‘operator=’
    setdest.h:31: error: extra qualification ‘vector::’ on member ‘operator+=’
    setdest.h:36: error: extra qualification ‘vector::’ on member ‘operator==’
    setdest.h:39: error: extra qualification ‘vector::’ on member ‘operator!=’
    make: *** [setdest.o] Error 1

    Could you please tell me the way to solve this prolem.
    Thanks a lot !
    Regards,
    Vo

    • Erlend says:

      Hi, usually this is only matter of removing the “vector::” part of the lines specified. So just use the delete button to remove “vector::” at the lines 26, 31, 36 and 39 in setdest.h and then run make again.

      Good luck!

  2. Vo says:

    Hi!

    Thanks you so much.

    I totally fix this problem thanks to your help.
    Regards,
    Vo

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.