[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [ns] nam1.0a10 problem for wireless?



Hi,

This may be not caused by my patch..
I hope.

> Hello,
> 
> I had a same problem and I have modified parser.cc according to this patch.
> But as I run simulator it runs for a while without giving any errors /
> warnings. It also moves objects in nam. But, then it started giving same
> warning and stop displaying movement of nodes in nam till the end.
> 
> Warnings are :
> 
> Unexpected end of line :  -t     ...................
> Perhaps you have extra spaces at the end of the line.
> Last parsed attribute flag was -k 

Perhaps, this is a bug(?) in file: ns-2.1b8/cmu-trace.cc line: 628
I have attached a small patch.
Patch file is attached to this mail.

> In addition to this, Initially when I start simulation, it gives me warning
> about having -v instead of -V in .nam file.

this is a bug(?) in file: ns-2.1b8/mobilenode.cc line: 444
change "-u" -> "-U" and "-v" -> "-V"

also another bug can be found
in file: ns-2.1b8/tcl/lib/ns-lib.tcl line: 1092,1096
"-Z" option is not supported in current nam.

you can easily find how to fix bugs.

> Is it normal behavior or it require more patches ?
 yes.:-

# parser.cc defines nam syntax well.  but ns-2 codes does not catch
# up current syntax --- especially wireless stuff.

*** cmu-trace.cc.orig	Thu Jun 14 14:38:34 2001
--- cmu-trace.cc	Thu Jun 14 15:06:47 2001
*************** CMUTrace::nam_format(Packet *p, int offs
*** 625,631 ****
  	if (op == 'D') op = 'd' ;
  	if (op == 'h') {
  	   sprintf(pt_->nbuffer(),
! 		"+ -t %.9f -s %d -d %d -p %s -e %d -c 2 -a %d -i %d -k %3s ",
  		Scheduler::instance().clock(),
  		src_,                           // this node
  		next_hop,
--- 625,631 ----
  	if (op == 'D') op = 'd' ;
  	if (op == 'h') {
  	   sprintf(pt_->nbuffer(),
! 		"+ -t %.9f -s %d -d %d -p %s -e %d -c 2 -a %d -i %d -k %3s",
  		Scheduler::instance().clock(),
  		src_,                           // this node
  		next_hop,