[ns] How Connector::drop_ initialized?

2006-11-23 Thread Huang Wei
Hi, all. We know in function Connector::drop(Packet* p), if drop_ is not zero then it will pass the packet to the object using drop_->recv(p). I set up a simple simulation and I have not do any initialization to the drop_. But I use printf in Connector::drop(Packet* p). The result shows that dr

[ns] How can I get the link object?

2006-11-24 Thread Huang Wei
Hello, everyone. I first set up two nodes and a duplex link between them, and I want to get the link object using this script: - #Create 2 nodes for {set i 1} {$i<3} {incr i} { set n([expr $i]) [$ns node] } #Create a duplex

[ns] How does agent's target_ got initialized?

2006-12-25 Thread Huang Wei
Hi, all. Wish everyone a merry Christmas and a happy new year! I was going through the source code of ns and got confused when I wanted to find out how 'target_' of class agent, which is derived from class connector, gets initialized? I know in Connector::command(), command "target" is defined to

[ns] Why NAM doesn't dispaly the packet dropped because of collision?

2007-07-21 Thread Huang Wei
Hi all, I've been doing wireless simulations these days. I want to show NAM to my colleagues to help them to better know about how RTS/CTS reduce the chance of collisions. But I found NAM doesn't display the packet dropped because of collisions. Why? Here is a line of the trace file and the NAM t