[ndnSIM] My Test file for manipulating/playing with the content store

John Baugh jpbaugh at umich.edu
Tue Nov 8 06:21:28 PST 2016

If anyone gets a chance to check the code I had attached and give me an
idea about perhaps why the exception is occurring, what is the appropriate
way to add items to CS etc, I'd greatly appreciate it.



On Nov 7, 2016 12:38 AM, "John Baugh" <jpbaugh at umich.edu> wrote:

> Greetings all,
> I have written some code that I'm basically trying to use to just play
> around with the content store for the purpose of learning how to use it.  I
> figured I could create (or retrieve) an instance of it, and treat it mostly
> like a container/data structure and use the methods, such as insert on it.
> I tried making my own custom Cs instance, and when that didn't work I used
> the technique Junxiao suggested by obtaining the L3Protocol, and then from
> that obtaining a forwarder and then getting the content store that way.
> I assumed that once a content store was obtained, that I could do things
> like call "insert" on it directly.
> However, although what i have attached does compile, I get a termination
> error saying that the error was "bad weak_ptr".
> I've spent several years not as focused on C++, so I will be the first to
> admit I'm not as up to speed on the smart/managed pointers as i should be,
> but i do know that weak_ptr is a type of associated smart pointer that
> doesn't own the object that it is referencing.  But even after using GDB, I
> still don't really know what's causing this problem.  Java and C# have
> spoiled me... I'll admit.
> Any help would be greatly appreciated.  I am beginning to put together
> notes and maybe some day in the near future I'll have a little sandbox
> tutorial for people to at least get use to the data structures and such
> with a more extensive treatment.  I'm a community college instructor,
> adjunct at U of M, as well as doing this PhD research, so once I truly
> understand this stuff better, I think I can really contribute especially in
> the form of instructional materials.
> Thanks a ton, everyone.
> John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20161108/e65967cf/attachment.html>

More information about the ndnSIM mailing list