Warning: Tracefile events are not sorted by time. (黄化吉第三个例程有问题)

今天试验黄化吉那本书上的第三个例程的时候发现了一些小问题。有两个已经解决,还有一个有待求证。

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

第一:在建立节点之间的连接的时候添加的数据流不对:

set udp0 [newAgent/UDP]

$ns attach-agent$ss(0) $udp0

set null0 [newAgent/Null]

$ns attach-agent$sinkNode $null0

$ns connect $udp0$null0

set ugs0 [newApplication/Traffic/CBR]

$ugs0 attach-agent$udp0

 

 

set udp1 [newAgent/UDP]

$ns attach-agent$sinkNode $udp1

set null1 [newAgent/Null]

$ns attach-agent$ss(1) $null1

$ns connect $udp1$null1

set ugs1 [newApplication/Traffic/CBR]

原文上面都是

set ugs0 [newApplication/Traffic/UGS]

...

set ugs1 [newApplication/Traffic/UGS]

...

如果不改的话就是会一直报错:

invalid command name “Application/Traffic/UGS”

...



---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

第二:到这里这个例程还有一些问题,就是在执行nam动画的时候会出现很奇怪的现象:


这个问题在书上其实已经解决了,但是还是列出来看看:

书上说的是把nam文件里面的两行删掉就可以了。(如下图)

书上的解释是,会使节点0和节点1nam显示时黏合在一起。具体是怎么回事还不是很清楚。


-----------------------------------------------------------------------------------------------------

-----------------------------------------------------------------------------------------------------

第三:最后还有一个最Bug的问题,未能解决但是有解决方案(求证中)

就是执行nam文件的时候会在大概中间的时候产生很多的类似下图的警告:


找到一个解决方案但是知道是不是对的,就只是试了一下,但是貌似没什么作用,可能是操作有误吧!

如果要试试的话记得保存源文件!!!

http://blog.sokoyo.inq.tw/2008/07/solution-warning-tracefile-events-are.html

Hi,

I'vefixed two trace problems that I've found in trace/cmutrace.cc
One is for time field precision, which modifies the validation, andthe
second for wireless packet coloring.

--------

a) someparts of the trace functions have different precision, which causes
nam to protest:

"Warning:Tracefile events are not sorted by time.
v -t 7.10770017082439 -e sim_annotation 7.10770017082439 347.1077002:
HANDOVER LATENCY: seqno 42  AP_OLD:  0  max_CQ: 0  latency==
0.10770017082438699
The above event should occur at or after -t 7.107700.
(...)"

Thishappens not all parts of the code use the "TIME_FORMAT"macro:
puts-nam-traceall {r -t %.9f -s %d ...
puts-nam-traceall {r -t "TIME_FORMAT" -s %d  ...

Thebelow patch fixes this problem in cmutrace.cc.
Apparently, only imep/imep.cc continues use "-t %.9f" (see below).

pmsrve at leme:_:[cims]$ grep -C4 "t %.9f"*/*.cc
imep/imep.cc-  if (NULL == p)return;  //  no more pkts on queue
imep/imep.cc:  if (verbose) trace("T%.9f _%d_ rexmit trigger again for %d
at %.9f (in %.9f)",
imep/imep.cc-               CURRENT_TIME, ipaddr, ch->uid(), rexat, rexat -
CURRENT_TIME );
imep/imep.cc-  rexmitTimer.start(rexat -CURRENT_TIME);

HOWEVER,please note that this patch fixes the traces, causing failed
validation.

b)packet marking in wireless scenarios:
some parts of the same code have color 2 hardwired for wireless packets.
("-c 2 -a 0");

thesecond patch depends on the first, and modifies this to correct"-c
flowid() -a flowid()"

http://tagus.inesc-id.pt/~pestrela/ns2/files/namtrace_precision_time.patch
http://tagus.inesc-id.pt/~pestrela/ns2/files/namtrace_wireless_colors.patch

Pedro Estrela
http://tagus.inesc-id.pt/~pestrela/ns2

>-----Original Message-----
> From: ns-users-bounces at ISI.EDU [mailto:ns-users-bounces at ISI.EDU] On Behalf
> Of Jamal Toutouh
> Sent: quarta-feira, 7 de Novembro de 2007 15:51
> To: NS-users list
> Subject: [ns] How to colour nam simulations??
>
>
> Dear all,
>
> How are you?
>
> I want to show some simulations using NAM, but the problem isthat I want
> to show
> the different packets that are created by diferent nodes withdifferent
> colours.
>
> I am simulating mobil nodes that uses wifi connections.
>
> Thank you...
>
> ------------------------------------------------
> Jamal Toutouh El Alamin
> NEO Group - Networking and Emerging Optimization
> University of Malaga
> ------------------------------------------------
> Phone: (+34) 952 13 33 03
> ------------------------------------------------
> Addres:
> E.T.S Ingenieria Informatica
> Complejo Tecnologico, Lab. 3.3.4b
> Campus de Teatinos
> 29071 Malaga, Spain
> -------------------------------------------------
>
>
>
>
>
> ______________________________________________
> Pregunta, Responde, Descubre.
> Comparte tus consejos y opiniones con los usuarios de Yahoo!Respuestas
> http://es.answers.yahoo.com/info/welcome


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值