[ns] please help!!!

2012-10-03 Thread Najma Ismat
hi,i have simulated LEACH protocol for 10 nodes in ns-2. 29 with mannasim and observe that the trace file show nodes greater than 10 with tag -Hd when packets are received. i have marked the portion of trace with error in red. please guide why i getting this and how to resolve this issue?

[ns] using Pcap/BPF Network Objects

2012-10-03 Thread חגית מריומה
Hello All, I tried to use the configuration example for using Network/Pcap Objects, but ran into an error. http://www.cubinlab.ee.unimelb.edu.au/~jrid/Docs/Manuel-NS2/node484.html Anyone knows this error and how to solve it? it says that the simulator doesn't recognize the command. *Here is

[ns] Schedule an event

2012-10-03 Thread Rafael P B Mota
Hello, I am trying to use a random delay (in receiver) before the packet is sent back to the sender agent. For example: 1) the receiver agent receive the sender packet 2) the receiver sets up a response packet 3) Wait for a random time (in ms) 4) sends the packet. I don't know how to do the

[ns] Random time to send a packet

2012-10-03 Thread Rafael P B Mota
Hello, I am trying to use a random delay (in receiver) before the packet is sent back to the sender agent. For example: 1) the receiver agent receive the sender packet 2) the receiver sets up a response packet 3) Wait for a random time (in ms) 4) sends the packet. I don't know how to do the

Re: [ns] Random time to send a packet

2012-10-03 Thread Rafael P B Mota
Thanks for the response Christos!! I tried the while solution with no success. Is there any way to wait, for instance, 100ms, before the command send(pktret,0) is executed ? I guess it's a simple issue, but until now I was not able to solve. Does anyone can suggest something to do ? Thanks

Re: [ns] Random time to send a packet

2012-10-03 Thread Rafael P B Mota
Hello Natalya, I tryed the solution: srand(time(NULL)); int tempo = rand() % 400 + 100; Scheduler sch = Scheduler::instance(); sch.schedule(target_,pktret,tempo); //send(pktret,0); But the packet is not sent. If I uncomment the line

[ns] How ???

2012-10-03 Thread Christos Spatiotis
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, ne users How can i give 2 data channels for transmission? I want to send simultaneously the same data from two channels. Anybody help me? Thanks, all - -- === Undergraduate student

[ns] How give two data channels

2012-10-03 Thread Christos Spatiotis
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, ns users How can i give two data channels for transmission? I want to send simultaneously the same data from two channels. Anybody help me? Thanks, all - -- === Undergraduate student

Re: [ns] Random time to send a packet

2012-10-03 Thread Rafael P B Mota
Hello Natalya, I found a problem in my random number generator. The number generated was to high. I tried to use your solution (Random::uniform(0,1)) but the compiler was unable to find the function and class Random. What library should I include to use Random::uniform ? Another question: If I

Re: [ns] Random time to send a packet

2012-10-03 Thread Rafael P B Mota
Hello Natalya Thank you very much for your help. Now my agent is working properly. It delays x random seconds. Rafael 2012/10/3 Natalya Rozhnova rojnovanatha...@yandex.ru Hi Rafael, In order to use the Random class of ns2 you should include random.h in your code. I guess there are some