[ndnSIM] problem with setExclude

Sugang Li sugang.li718 at gmail.com
Mon Jul 6 11:43:47 PDT 2015


Thanks Spyridon ! It works now.

Regards,

On Mon, Jul 6, 2015 at 1:59 AM, Spyridon (Spyros) Mastorakis <
spiros.mastorakis at gmail.com> wrote:

> Hi,
>
> Do you need to set the boolean variable in the arguments of the
> appendExclude method to true for some reason? Did you try to switch it to
> false?
>
> An example that worked for me is the following:
>
>  ndn::Exclude m_exclude;
>  m_exclude.appendExclude(ndn::name::Component("postfix_of_disovered_ser"),
> false);
>  interest->setExclude(m_exclude);
>
> Did you use a debugger to check that the runtime error comes indeed from
> these methods?
>
> Hope that this helps.
>
> --
> Spyridon (Spyros) Mastorakis
> Personal Website: http://cs.ucla.edu/~mastorakis/
> Internet Research Laboratory
> PhD Computer Science
> UCLA
>
>
>
>
> > On Jul 5, 2015, at 8:10 PM, Sugang Li <sugang.li718 at gmail.com> wrote:
> >
> > Hi there,
> >
> > I am working on a service discovery protocol which might use the
> "Exclude" field in Interest.  However, after searching for a while, I coul
> not find too many examples to show how to use setExclude, and I kept
> receive segmentation fault when I tried it.
> >
> > In my case, I send a Interest  named "/service" to the network, and the
> potential producers are "/service/1" "/service/2" and "/service/2".  So the
> first time, one Data "/service/1" comes back, and consumer excludes it and
> send a Interest again. Repeat this until all the producers are discovered.
> >
> > my code is attached here:
> > In header:
> > ......
> > private:
> > ndn::Exclude &m_exclude;
> > .......
> >
> > In cpp:
> > ......
> >
> m_exclude->appendExclude(ndn::name::Component("postfix_of_disovered_ser"),true);
> > interest->setExclude(*m_exclude);
> >
> >
> > Anyone can give me a example will be appreciated!
> >
> > Thanks,
> >
> > --
> > Sugang Li
> > Rutgers,the State University of New Jersey
> > Department of Electrical and Computer Engineering
> > _______________________________________________
> > ndnSIM mailing list
> > ndnSIM at lists.cs.ucla.edu
> > http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>
>


-- 
*Sugang Li*

*Rutgers,the State University of New Jersey*
*Department of Electrical and Computer Engineering*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20150706/75230e69/attachment.html>


More information about the ndnSIM mailing list