Hi all,
I am trying to calculate the queueing delay in NS3, and wondered why using the trace files give me inconsistent results from finding the queue length and dividing it by the channel rate. In other words, I assume the way NS3 finds delays to schedule the RX event is as follows:
P2P Channel
----------------
Node 1 ---- Link Queue | ---- Node 2
----------------
Link Queue Length (i.e., number of packets in the Queue) at time t = L(t)
Channel Rate = 5 Mbps
Packet Size = 1000 Bytes
Channel Delay = 0 ms
Time between Transmit and Receive of a packet (sent at time t_1):
delta_t = L(t_1) * 1000 / 5000000
Therefore, the receive time (t_rx) should be found as follows:
t_rx = t_1 + delta_t
Now, when I find the number of packets in the queue (from the trace file Enqueue and Dequeue), and divide it by my channel rate, I get some value that is not consistent with the time that specific packet is received in the trace file. What am I doing wrong here?
Regards,
Mehdi
P.S.: For some reason, I do not want to use FlowMonitor or other packages.