[ndnSIM] Problem with modify ndn-simple to replay
ygor.amaral at gmail.com
Thu Apr 22 21:44:00 PDT 2021
One approach that may be ok for you is to add a custom attribute in your
NDN application (AddAttribute, see ndn-consumer-cbr.cpp).
This attribute can be the path to your log file. Then, when instantiating
your application, the full path of the log file will be informed to your
application. For example: consumerHelper.SetAttribute("log_file",
In your application, when it starts up, you will read the file as usual in
C++ (e.g.: std::ifstream).
That is, my suggestion is that the reading of the log file occurs within
After that, you will be able to make all the schedules, according to your
On Fri, Apr 23, 2021 at 12:49 AM parisa shojaei <parisa.shojaei85 at gmail.com>
> Dear Ygor,
> Would you please explain more. I don't understand completely. How I replay
> the log file? Where I put the log file to read?
> Best regards,
> On Fri, Apr 23, 2021, 00:33 Ygor Amaral <ygor.amaral at gmail.com> wrote:
>> Hi Parisa,
>> You can do that.
>> You must create your own consumer application. Use an existing
>> application as a starting point. For example:
>> - ndnSIM/ns-3/src/ndnSIM/apps/ndn-consumer-cbr.cpp (hpp)
>> - ndnSIM/ns-3/src/ndnSIM/apps/ndn-consumer-batches.cpp (hpp)
>> These applications inherit from:
>> - ndnSIM/ns-3/src/ndnSIM/apps/ndn-consumer.cpp (hpp)
>> Note that there is the ScheduleNextPacket member function. It is very
>> important to schedule the next interest packet transmissions. You can
>> schedule to the times you want.
>> It is not a complete answer, but it may help you.
>> Ygor Amaral
>> On Thu, Apr 22, 2021 at 4:33 PM parisa shojaei via ndnSIM <
>> ndnsim at lists.cs.ucla.edu> wrote:
>>> Dear All,
>>> If I want to modify ndn-simple to replay the logs file, how I can do
>>> read from a log file and replay the requests?
>>> The log file format will be like the following:
>>> <Time (epoch)>, <name>
>>> 12345, /google/index
>>> 12346, /cnn/index
>>> 13456, /tntech/index
>>> Yours Sincerely,
>>> ndnSIM mailing list
>>> ndnSIM at lists.cs.ucla.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ndnSIM