sending a packet(data) to Node A, after recieving a data from Node B

51 views
Skip to first unread message

ahmad r

unread,
Aug 10, 2016, 6:38:59 PM8/10/16
to ns-3-users
Hi

My project setup:
I am using AODV.cc example, which has several mobile node, on top of WIFI.

Question:
I want to send a chunk of data(say 2 K bits) from Node 1, and Node 2 to the Node 3.  Node 3, after receiving all the data from Node 1, and Node 2, has to send a chunk of data(say 10K bits) to Node 4. Node 3 cannot send data to Node 4 before receiving data from Node 1 and Node 2.

1- How I can determine in Node 3 that specific amount of data has received from Node 1 and Node 2?
2- How I can send data after receiving data? I know I can start sending at specific time after the start of simulation, but it is not the case for me.

Thanks,

Konstantinos

unread,
Aug 11, 2016, 7:18:33 PM8/11/16
to ns-3-users
You can create your own application that can keep track of the received packets/data and when it reaches a predefined value (can be dynamic from e.g. the first packet it received) it will start the sending.

Study how example applications such as UdpEchoServer works, how it handles receiving packets and just use your brain to design the functionality you described.

To answer your questions
1) Simply count the number of data from received packets
2) The principle is the same. The trigger will be different, instead of time, it will be the number of received data. The simplest implementation is an 'if - then' statement.

Regards,
K
Reply all
Reply to author
Forward
0 new messages