I have done simulation for a topology of 3 nodes (Node-A, B, and C). Where Node-A is the source and Node-C is the sink, Node-B is the intermediate node between A and C. Now I want to calculate the end-to-end delay for the packets sent from source to sink. For this, I am parsing the trace.json
generated after the simulation. However, in trace.json
the threadID
or the messageID
generated for the datagram at the source(Node-A) is not the same when that datagram is forwarded at the intermediate node (Node-B). Thus, when I parse the events pertaining to the sink (Node-C) the threadID
or the messageID
matches with events pertaining to the intermediate node (Node-B) but not with the source (Node-A). So I want to know, how I can calculate end-to-end delay for the packets transmitted between source and sink. Please let me know, also let me know is there any other approach I can follow to calculate the same. please find the generated trace.json
of the simulation here
Asked
Active
Viewed 101 times
2

Harendra Singh
- 109
- 7
1 Answers
1
Each node has its own thread of execution. The JSON has stimulus and response message IDs for each entry, allowing you to trace across agents and nodes. To understand this better, you may want to read this blog article.
You may also want to look at the viztrace utility. This utility does the heavy lifting of matching up stimulus-responses to create a coherent trace from the logs, and can even generate sequence diagrams for you. You could modify this utility to meet your needs, or use the output from it for easier analysis.

Mandar Chitre
- 2,110
- 6
- 14