2

I have developed an energy aware routing protocol, now for performance evaluation I want to calculate end-to-end packet transmission delay when packets travel through a multi-hop link. I am unable to decide which timing information to consider whether to consider the simulation time available in log file (log-0.txt) or the modem's transmission time (txtime and rxtime). Please let me know the method to calculate end-to-end delay in UnetStack.

1 Answers1

1

The simulation time (first column in the log files below, in milliseconds) is synchronized across all simulated nodes, and so you can use it to compute end-to-end delays if you log a START time at your source node, and END time at your destination node.

Example log file:

5673|INFO|org.arl.unet.sim.SimulationAgent/4@570:call|TxFrameNtf:INFORM[type:DATA txTime:2066947222]
6511|INFO|org.arl.unet.sim.SimulationAgent/3@567:call|TxFrameNtf:INFORM[type:DATA txTime:1157370743]
10919|INFO|org.arl.unet.sim.SimulationAgent/4@570:call|TxFrameNtf:INFORM[type:DATA txTime:2072193222

In this example, node 4 (SimulationAgent/4) transmits at time 5673. Node 3 (SimulationAgent/3) then transmits at time 6511. And so on...

The txTime and rxTime are in microseconds, but are local to each node. So they can be used to get time differences for events in the same node, but cannot directly be compared across nodes.

Mandar Chitre
  • 2,110
  • 6
  • 14
  • Sir, in the example log file, you have told to consider log entries containing ```TxFrameNtf```, but when I send ```DatagramReq``` using ```router``` agent, there will be no ```TxFrameNtf``` generated, though I subscribe to the ```phy``` agent. How to get entries with ```TxFrameNtf``` or How to log a START time at source node. – AKHILRAJ V GADAGKAR Oct 09 '19 at 12:45
  • It doesn't have to be a `TxFrameNtf`. All logs are timestamped. You can just do a `log.info` in your code to log relevant events. – Mandar Chitre Oct 10 '19 at 01:11