[Ns-bugs] [Bug 473] [PATCH] Alternative ns-2 trace reader

code@nsnam.ece.gatech.edu code at nsnam.ece.gatech.edu
Tue Mar 30 00:30:02 PDT 2010


http://www.nsnam.org/bugzilla/show_bug.cgi?id=473





--- Comment #30 from Pavel Boyko <boyko at iitp.ru>  2010-03-30 03:30:02 EDT ---
  Hi, Michael, 

(In reply to comment #26)
> I added to Francesco's files to turn on and off IPv4 adapters.  

  I am pretty sure that copy-pasting one more implementation of the ns-2
mobility trace reader is a really bad idea. "The" ns-2 trace reader is reviewed
here: http://codereview.appspot.com/802041 and it will be the only ns-2 trace
reader. I will not test/review/merge the attached code. I do not recommend to
use it either.

  Note, that shutting down an IP interface is quite different from node-level
failure requested above. Also be aware the current implementation is quite
limited, e.g. IP interface up/down doesn't cause the device shutdown/restart
and some routing protocols do not respect it at all.

  Best regards,
  Pavel 

> While this
> works for a specific case, I'm sure someone can figure out how to make it work
> for the general case.  The trace files mentioned in comment 17 do have entries
> that, by turning the interface on and off, basically allows nodes to enter and
> leave the simulation at any time (the nodes are all created at the start of the
> simulation, but don't interact unless the interface is turned on).
> 
> The interface on/off lines are at 182-224 in the attached file
> (ns2-waypoint-mobility-helper.cc).  I know this file doesn't meet the ns-3
> coding style and there are some other coding no-no's in there, but like I said,
> it works for a specific case now, not the general case.  Hopefully it will be
> useful in some form to someone though.
> 
> Here are few lines from the trace file:
> 
> $ns_ at 0.0 "$node_(2) switch OFF" # set_X,Y,Z  
> $node_(2) set X_ 0.000000
> $node_(2) set Y_ 0.000000
> $node_(2) set Z_ 0.0
> $ns_ at 0.000000 "$node_(2) setdest 3940.046526 4116.298353 1000000000.000000"
> # init_node
> $ns_ at 0.000100 "$node_(2) switch ON" # inside  
> $ns_ at 0.000100 "$node_(2) setdest 4010.000000 4063.703704 12.713851" # 
> $ns_ at 6.903802 "$node_(2) switch OFF" # leaving_area  
> 
> Michael

-- 
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the Ns-bugs mailing list