end-to-end packet delay calculation

235 views
Skip to first unread message

Changsik Lee

unread,
Mar 31, 2014, 2:56:43 AM3/31/14
to ns-3-...@googlegroups.com
Hi, all

I'm new to NS-3 and studying packet-scheduler based on lena-dual-stripe code.

I used OnOffApplication to generate traffic. 

In this situation, I really want to calculate 'end-to-end packet delay', not 'average delay'

In order to calculate this, I've tried to utilize packet tags, but i really have no idea how to utilize it.

do you have any related example for this?

If there are other simple methods to calculate 'end-to-end packet delay' such as creating trace source and using callbacks,

anything is welcomed.

help me plz.

thank you.


Tommaso Pecorella

unread,
Mar 31, 2014, 3:25:28 AM3/31/14
to ns-3-...@googlegroups.com
Hi,

check the source code of the UdpClient and UdpServer applications. The answer is there.

T.

Changsik Lee

unread,
Mar 31, 2014, 3:54:54 AM3/31/14
to ns-3-...@googlegroups.com
Hi T,

first of all, thank you for your reply.

I looked into the source codes, and found that 

UdpServer::HandleRead (Ptr<Socket> socket)

object function logged 'delay' information.

then, i want to this log information whenever packet is received.

how can i get this information into my source code?

which part should i add into my code?

sorry for poor question.




2014년 3월 31일 월요일 오후 4시 25분 28초 UTC+9, Tommaso Pecorella 님의 말:

Konstantinos

unread,
Mar 31, 2014, 5:37:05 AM3/31/14
to ns-3-...@googlegroups.com
You have 2 options.

1) Change the OnOffApplication/PacketSink you currently use, with the UdpClient/Server
2) Modify OnOffApplication/PacketSink source code (if you really need an on-off traffic), to add/read the SeqTsHeader on each packet send/received so that you can get the delay.

Crimson9102

unread,
May 5, 2015, 12:42:24 AM5/5/15
to ns-3-...@googlegroups.com
Hello all. In order to calculate the per packet delay I added a log to the method ReportLastRx of class FlowMonitor that prints the variable "delay" everytime this method is called. Is this approach correct to my goal? 
flow-monitor.cc

Tommaso Pecorella

unread,
May 5, 2015, 3:40:26 AM5/5/15
to ns-3-...@googlegroups.com
If your goal is to print the e2e delay of the packets as seen by flow monitor, then yes, this is a way.

T.

Crimson9102

unread,
May 5, 2015, 11:10:55 PM5/5/15
to ns-3-...@googlegroups.com

Thanks a lot for your help Tommaso

Crimson9102

unread,
May 8, 2015, 4:01:26 PM5/8/15
to ns-3-...@googlegroups.com
 Hi, I want to associate the occurrence of a handover event with delay peaks (of packets that are in the neighborhood of the event) caused by the event itself and not for the poor existing signal conditions before triggering the handover , please help me with the following doubts:

1. Does the delay computation in FlowMonitor take into account the HARQ retransmission delays?

2. Is the detach time in the handover procedure (time between the UE receives the RRCConnectionReconfiguration message from the source eNB and it sends the RRCConecctionReconfigurationComplete message to the target eNB) the difference in time between the fire of HandoverStart trace and ConnectionReconfiguration trace in lte-ue-rrc class?

3. Is the detach time added to delaysum in FlowMonitor class or in any other delay computation? If yes, where? If no, can you give me some ideas of how to do it?

Thanks in advance.

Konstantinos

unread,
May 8, 2015, 4:22:47 PM5/8/15
to ns-3-...@googlegroups.com, crims...@gmail.com
Hi Crimson,

First of all, please open a new thread for your question as it does not relate to the previous. You ask specific topics for LTE.
For (1) and (3), please study how FlowMonitor works and what it actually traces. Then you should be able to answer that question. Just a hint, it tracks IP end-to-end flow packets.
Fro (2), I can not answer, but again, I suggest to study the documentation. For me they might look different as they have different definition, but if the HandoverStart happens when your receive the RrcConnectionReconfiguration and if the ConnectionReconf with the Complete, then they are the same. But you need to study that.
Reply all
Reply to author
Forward
0 new messages