Inter-Module-Communication Example: How to get different node’s queue length during simulation time?


  In this example, I will show how to get different node’s queue length during simulation time. It is useful for video communication. When you know that the router’s output queue is in full, you can decide to discard some less-important packets at the sender side. Otherwise, more video packets are injected into networks. This will make delivered video quality worse.



Please refer to the developer manual for related API information.



1.      In this example, you must design the topology beforehand. You must know each node’s id and related port id. Therefore, we assume that there are two senders (node 1 and node 2), one router (node 3), and one receiver (node 4). Node 1’s IP address is Node 2’s IP address is Node 4’s IP is Therefore, the corresponding link between router and Node 4 is port 3.


2.      Modify the fifo.h


3.      Modify the





4.      Recompile




1.      Create the topology that contains 2 senders, 1 router, and 1 receiver. And the requirement IP settings should follow the aforementioned description.



2.      Click “E” to edit property.





3.      Click “R” and start simulation.


4.      After simulation, you will find the qlen file. You can use “yum install gnuplot” to install gnuplot software.

The above figure is what Node 1 sees in the Node 3’s output queue.



Dr. Chih-Heng Ke (,

Department of Computer Science and Information Engineering, National Quemoy University, Taiwan