ns-3ndnsim

How to simulate process delay in NS-3/ndnSIM?


I want to add some process delay on a consumer node before Interest packets being sent out. And I find that Simulator::Schedule() functions may achieve this purpose. But I am not sure how to use it exactly because ndnSIM has its own protocol process and if I schedule a new event it may cause some unexpected results. Or is there some other way to insert a delay on a node in NS-3?


Solution

  • AFAIK, the way to introduce processing delay is with Simulator::Schedule(). In your example you mention you want to delay the send of an Interest packet. Instead of calling the method directly, you can schedule it after some (randon) time, ie. your process delay. This should not break the simulation.