[ndnSIM] When I try to use trace source, the comepile errors areOccured.

Spyridon (Spyros) Mastorakis mastorakis at cs.ucla.edu
Sun Dec 2 09:25:45 PST 2018


Hi,

If your goal is get some output when an Interest and a data packet are received, then running your scenario with the logging components you mentioned should give you enough visibility. I do not think you need to make all these changes.

Thanks,

Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
Internet Research Laboratory
Computer Science Department
UCLA

> On Dec 2, 2018, at 1:04 AM, 박종인 <whddls9632 at ajou.ac.kr> wrote:
> 
>  
> Dear Spyridon Mastorakis,
>  
> Thank you for helping me!
> Do you mean I should compile the simulation code with NS_LOG components?
> I tried it, just like NS_LOG=ndn.Consumer:ndn.Producer ./waf --run=ndn-wireless-wired
> But the error also occurred as ever.
>  
> Thanks in advance,
> Jongin Park
>  
>  
> 보낸 사람: Spyridon (Spyros) Mastorakis <mailto:mastorakis at cs.ucla.edu>
> 보낸 날짜: 2018년 12월 1일 토요일 오후 1:46
> 받는 사람: 박종인 <mailto:whddls9632 at ajou.ac.kr>
> 참조: ndnsim at lists.cs.ucla.edu <mailto:ndnsim at lists.cs.ucla.edu>
> 제목: Re: [ndnSIM] When I try to use trace source, the comepile errors areOccured.
>  
> Hi there,
>  
> why you do not enable the logging component of the consumer and producer application?
>  
> Thanks,
>  
> Spyridon (Spyros) Mastorakis
> Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
> Internet Research Laboratory
> Computer Science Department
> UCLA
>  
> On Nov 30, 2018, at 7:24 AM, 박종인 <whddls9632 at ajou.ac.kr <mailto:whddls9632 at ajou.ac.kr>> wrote:
>  
> Hi all,
>  
> I want to trace ReceivedInterests and ReceivedDatas.
> So I use ConnectWithoutContext functions to connect the traceSources to my callback functions.
>  
> Config::Connect("/NodeList/*/ApplicationList/*/$ns3::ndn::App/ReceivedInterests",MakeCallback(&WillBeCalledWhenInterestIsReceived));
> Config::Connect("/NodeList/*/ApplicationList/*/$ns3::ndn::App/ReceivedDatas", MakeCallback(&WillBeCalledWhenDataIsReceived));
>  
> And, my Callback functions are like this,
>  
> void
> WillBeCalledWhenInterestIsReceived( std::shared_ptr<const ndn::Interest> i, Ptr<ndn::App> a, std::shared_ptr<ndn::Face> f )
> {
> cout << "Interest is Received at " << f->getId() << "\t" << i->getName().toUri();
> }
>  
> void
> WillBeCalledWhenDataIsReceived( shared_ptr<const ndn::Data> d , Ptr<ndn::App> a, shared_ptr<ndn::Face> f )
> {  
>      cout << "Data is Received at " << f->getId() << "\t" << d->getName().toUri() << "\t" << d->getContent().value();
> }
>  
> When I try to compile this source code, I got Errors like this,
>  
> In file included from ./ns3/attribute.h:25:0,
>                  from ./ns3/attribute-accessor-helper.h:23,
>                  from ./ns3/core-module.h:12,
>                  from ../src/ndnSIM/examples/ndn-wireless-wired.cpp:1:
> ./ns3/ptr.h: In instantiation of ‘ns3::Ptr<T>::~Ptr() [with T = ns3::ndn::App]’:
> ./ns3/callback.h:482:31:   required from ‘R ns3::FunctorCallbackImpl<T, R, T1, T2, T3, T4, T5, T6, T7, T8, T9>::operator()(T1, T2, T3) [with T = void (*)(std::shared_ptr<const ndn::Data>, ns3::Ptr<ns3::ndn::App>, std::shared_ptr<nfd::face::Face>); R = void; T1 = std::shared_ptr<const ndn::Data>; T2 = ns3::Ptr<ns3::ndn::App>; T3 = std::shared_ptr<nfd::face::Face>; T4 = ns3::empty; T5 = ns3::empty; T6 = ns3::empty; T7 = ns3::empty; T8 = ns3::empty; T9 = ns3::empty]’
> ../src/ndnSIM/examples/ndn-wireless-wired.cpp:374:1:   required from here
> ./ns3/ptr.h:758:7: error: invalid use of incomplete type ‘class ns3::ndn::App’
>        m_ptr->Unref ();
>        ^
> In file included from ./ns3/ndn-all.hpp:34:0,
>                  from ./ns3/ndnSIM-module.h:10,
>                  from ../src/ndnSIM/examples/ndn-wireless-wired.cpp:7:
> ./ns3/ndnSIM/utils/tracers/ndn-app-delay-tracer.hpp:41:7: note: forward declaration of ‘class ns3::ndn::App’
> class App;
>        ^
> In file included from ./ns3/attribute.h:25:0,
>                  from ./ns3/attribute-accessor-helper.h:23,
>                  from ./ns3/core-module.h:12,
>                  from ../src/ndnSIM/examples/ndn-wireless-wired.cpp:1:
> ./ns3/ptr.h: In instantiation of ‘void ns3::Ptr<T>::Acquire() const [with T = ns3::ndn::App]’:
> ./ns3/ptr.h:743:11:   required from ‘ns3::Ptr<T>::Ptr(const ns3::Ptr<T>&) [with T = ns3::ndn::App]’
> ./ns3/callback.h:482:31:   required from ‘R ns3::FunctorCallbackImpl<T, R, T1, T2, T3, T4, T5, T6, T7, T8, T9>::operator()(T1, T2, T3) [with T = void (*)(std::shared_ptr<const ndn::Data>, ns3::Ptr<ns3::ndn::App>, std::shared_ptr<nfd::face::Face>); R = void; T1 = std::shared_ptr<const ndn::Data>; T2 = ns3::Ptr<ns3::ndn::App>; T3 = std::shared_ptr<nfd::face::Face>; T4 = ns3::empty; T5 = ns3::empty; T6 = ns3::empty; T7 = ns3::empty; T8 = ns3::empty; T9 = ns3::empty]’
> ../src/ndnSIM/examples/ndn-wireless-wired.cpp:374:1:   required from here
> ./ns3/ptr.h:712:7: error: invalid use of incomplete type ‘class ns3::ndn::App’
>        m_ptr->Ref ();
>        ^
> In file included from ./ns3/ndn-all.hpp:34:0,
>                  from ./ns3/ndnSIM-module.h:10,
>                  from ../src/ndnSIM/examples/ndn-wireless-wired.cpp:7:
> ./ns3/ndnSIM/utils/tracers/ndn-app-delay-tracer.hpp:41:7: note: forward declaration of ‘class ns3::ndn::App’
> class App;
>  
>  
> Am I do anything wrong?
> I need your help !! ☹
>  
>  
> Thanks in advance,
> Jongin Park

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


More information about the ndnSIM mailing list