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

박종인 whddls9632 at ajou.ac.kr
Sun Dec 2 19:55:57 PST 2018


Dear Spyridon Mastorakis,
 
I misunderstood your answer. now I just decided to use NS_LOG.
Thank you very much for helping me.
 
Thanks in advance,
Jongin Park




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/
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
보낸 날짜: 2018년 12월 1일 토요일 오후 1:46
받는 사람: 박종인
참조: 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/
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/20181203/1ea36038/attachment-0001.html>


More information about the ndnSIM mailing list