[ndnSIM] When I try to use trace source, the comepile errors are Occured.
Spyridon (Spyros) Mastorakis
mastorakis at cs.ucla.edu
Fri Nov 30 20:46:45 PST 2018
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> 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/20181130/3eadf5c5/attachment-0001.html>
More information about the ndnSIM
mailing list