Several Packet Receiving Before Finishing Previous Receive Callback Method

37 views
Skip to first unread message

Mohammad Afrashteh

unread,
Oct 2, 2017, 9:40:16 AM10/2/17
to ns-3-users
Hi,

I would like to know what happens (How ns3 handles) when several packets receive to one wireless node that each one triggers same Receive Callback method.

To clarify my mean:
Suppose the wireless node receives several packets during one millisecond which required time to execute Receive Callback method for every receiving packet is two milliseconds. Now when the first packet receives it takes two milliseconds to run Receive Callback method while other packets are receiving and need to execute Receive Callback method. In this situation how all of the packets receiving handles?

Thanks for your attention.

Rediet

unread,
Oct 9, 2017, 3:33:00 AM10/9/17
to ns-3-users
Hi,

There is no parallel execution as such in ns-3. Events are added to the scheduler's list, and the latter calls them one after another according to their scheduled times (and insertion priority if same time requested). So if the first event executes a callback, it'll add it to the scheduler's event list. The second Rx will add it's callback and so forth. So when it's time for the first callback to be called, it'll execute itself without interruption, and adds events into the scheduler's list if need be. The second callback will do the same. For more information, refer to the documentation concerning the scheduler (and also Peter Barnes' posts regarding this particular point).
Whoever, you'll have to note that the fact that the first callback has been fired might induce the second Rx to be ignored, since the device is already in RX mode (unless capture mode is enabled).

BR,

Rediet
Reply all
Reply to author
Forward
0 new messages