[ndnSIM] How to get erased item of Content Store

Maziar m.mirzazad at gmail.com
Wed Jul 2 20:09:13 PDT 2014


Thanks a lot Alex,

I used it inside the function */"/**/inline void erase (typename 
parent_trie::iterator item)/**/" /*which worked perfectly.
I have another issue, and appreciate if you help me.
I am using the following code to get the node in which the replacement 
is done:
     Ptr<Node> node=item->payload ()->GetContentStore ()->template 
GetObject<Node> ();
But it always returns a single node.
Do you have any idea what I have done wrong? Any suggestions?

Thanks again
Maziar

On 07/02/2014 02:02 PM, Alex Afanasyev wrote:
> just create a new policy (lru2 or something) or disable PIT with LRU policy (since it is not default anyways) in src/pit/ndn-pit-impl.cc.
>
> ---
> Alex
>
> On Jul 2, 2014, at 1:56 PM, Maziar <m.mirzazad at gmail.com> wrote:
>
>> I am trying to use for Lru. That's why it does not compile.
>> So do you have any suggestions for Lru?
>>
>>
>> On 07/02/2014 01:42 PM, Alex Afanasyev wrote:
>>> what exactly is not working / what error you're getting?  I have copied this line from the example that I was able to compile.
>>>
>>> If you're trying to add this line to the existing policies, then you will get the error, since the policies are normally shared between different modules (CS and PIT).  You can use this customization only in CS-specific policy (e.g., LFU that is only used by CS right now)
>>>
>>> ---
>>> Alex
>>>
>>> On Jul 2, 2014, at 1:21 PM, Maziar <m.mirzazad at gmail.com> wrote:
>>>
>>>> Hi Alex,
>>>>
>>>> Thanks for the reply,
>>>> But this does not work, I have tried many other too.
>>>> Could you please tell the exact code?
>>>> I know this is because of lack of my knowledge about boost lists.
>>>>
>>>> Thanks
>>>> Maziar
>>>>
>>>> On 07/01/2014 09:16 PM, Alex Afanasyev wrote:
>>>>> Hi Maziar,
>>>>>
>>>>> Just before the item is erased, you should do something like this:
>>>>>
>>>>> std::cout << policy_container::begin()->payload()->GetName() << std::endl;
>>>>>
>>>>> ---
>>>>> Alex
>>>>>
>>>>> On Jul 1, 2014, at 7:35 PM, Maziar <m.mirzazad at gmail.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I am trying to get the prefix of the item which has been replaced in content store.
>>>>>> What I know so far is that the below command does erasing:
>>>>>> base_.erase (&(*policy_container::begin ()));
>>>>>> But I can not retrieve the prefix of the item from policy_container::begin ().
>>>>>>
>>>>>> I would appreciate if you help me.
>>>>>>
>>>>>> Thanks
>>>>>> Maz
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20140702/38a7f96b/attachment.html>


More information about the ndnSIM mailing list