[ndnSIM] (no subject)

Xinyu Ma bitmxy at gmail.com
Mon Apr 23 21:16:40 PDT 2018


Hello.

Finally I've understood what's wrong. Sorry for giving incomplete answer
yesterday.
In conclusion, you need to change -1.0 of this line:
producerHelper.SetAttribute("Freshness", TimeValue(Seconds(-1.0))); //
unlimited freshness
into 0:
producerHelper.SetAttribute("Freshness", TimeValue(Seconds(0))); //
unlimited freshness
or delete this line which means the same thing.

Actually there are two mistakes in the examples.
The first one is the consumer app OneInterestRequester but not
DumbRequester, which is used only in ndnSIM1.0.
Please do not insert NS_OBJECT_ENSURE_REGISTERED(DumbRequester);  into main
cpp file. It will record the log of main file but not the consumer.
The second one is the freshness time should be greater than zero. 0
(default value) stands for unlimited freshness period in ndn-cxx. -1 is
senceless.

If you fix the time and run it with:
NS_LOG=OneInterestRequester ./waf --run=ndn-simple-with-content-freshness

You are expected to get:
+1.000000000s 0 OneInterestRequester:SendInterest(): [DEBUG] Sending
Interest packet for /no-freshness
+1.000000000s 0 OneInterestRequester:SendInterest(): [DEBUG] >> I:
/no-freshness
+1.057727998s 0 OneInterestRequester:OnData(): [DEBUG] << D: /no-freshness
+2.000000000s 0 OneInterestRequester:SendInterest(): [DEBUG] Sending
Interest packet for /with-freshness
+2.000000000s 0 OneInterestRequester:SendInterest(): [DEBUG] >> I:
/with-freshness
+2.057855998s 0 OneInterestRequester:OnData(): [DEBUG] << D: /with-freshness
+10.000000000s 0 OneInterestRequester:SendInterest(): [DEBUG] Sending
Interest packet for /no-freshness
+10.000000000s 0 OneInterestRequester:SendInterest(): [DEBUG] >> I:
/no-freshness
+10.028863999s 0 OneInterestRequester:OnData(): [DEBUG] << D: /no-freshness
+12.000000000s 0 OneInterestRequester:SendInterest(): [DEBUG] Sending
Interest packet for /with-freshness
+12.000000000s 0 OneInterestRequester:SendInterest(): [DEBUG] >> I:
/with-freshness
+12.057855998s 0 OneInterestRequester:OnData(): [DEBUG] << D:
/with-freshness

The response time of the 2nd "no-freshness" should be about half of other
three interests, indicating the cache hits.
In my computer they are about 0.029s and 0.058s.

Xinyu Ma.

2018-04-24 12:38 GMT+09:00 amulya amy <ammu.amulya12 at gmail.com>:

> Yes, I will check.... Do i use t use just this NS_OBJECT_ENSURE_
> REGISTERED(DumbRequester);??
>
> On Tue, Apr 24, 2018, 9:03 AM John Baugh <jpbaugh at umich.edu> wrote:
>
>> Could you put it there and see if it does anything?
>>
>> Thanks
>>
>> JPB
>>
>> On Mon, Apr 23, 2018, 11:31 PM amulya amy <ammu.amulya12 at gmail.com>
>> wrote:
>>
>>> No, I don't.
>>>
>>> On Tue, Apr 24, 2018, 12:39 AM John Baugh <jpbaugh at umich.edu> wrote:
>>>
>>>> In your main file, do you have:
>>>>
>>>> NS_OBJECT_ENSURE_REGISTERED(DumbRequester);
>>>>
>>>>
>>>>
>>>> at the top before the main function?
>>>>
>>>> On Mon, Apr 23, 2018 at 10:36 AM, amulya amy <ammu.amulya12 at gmail.com>
>>>> wrote:
>>>>
>>>>> Sir, i did try using this but got same error... Please help
>>>>>
>>>>> On Mon, Apr 23, 2018, 7:07 PM Xinyu Ma <bitmxy at gmail.com> wrote:
>>>>>
>>>>>> Hello, Amulya
>>>>>>
>>>>>> The instruction is out of dated. You should use OneInterestRequester:
>>>>>>
>>>>>>  NS_LOG=OneInterestRequester:ndn.cd.Freshness.Lru ./waf
>>>>>> --run=ndn-simple-with-content-freshness
>>>>>>
>>>>>> Xinyu Ma.
>>>>>>
>>>>>> 2018-04-23 18:43 GMT+09:00 amulya amy <ammu.amulya12 at gmail.com>:
>>>>>>
>>>>>>> Hello Folks...
>>>>>>> I am new to ndnsim and whenever i run
>>>>>>>
>>>>>>> NS_LOG=DumbRequester:ndn.cs.Freshness.Lru ./waf
>>>>>>> --run=ndn-simple-with-content-freshness
>>>>>>>
>>>>>>> I encounter a  problem
>>>>>>>
>>>>>>>  msg="Invalid or unregistered component name "DumbRequester" in env variable NS_LOG, see above for a list of valid components", file=../src/core/model/log.cc, line=567
>>>>>>> terminate called without an active exception
>>>>>>> Command ['/home/iiitd/ndnSIM/ns-3/build/src/ndnSIM/examples/ns3-dev-ndn-simple-with-content-freshness-debug'] terminated with signal SIGIOT. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").
>>>>>>> .
>>>>>>>
>>>>>>> How to resolve it? please help
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> ndnSIM mailing list
>>>>>>> ndnSIM at lists.cs.ucla.edu
>>>>>>> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>>>>>>>
>>>>>>>
>>>>>>
>>>>> _______________________________________________
>>>>> ndnSIM mailing list
>>>>> ndnSIM at lists.cs.ucla.edu
>>>>> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>>>>>
>>>>>
>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20180424/78ea667f/attachment.html>


More information about the ndnSIM mailing list