[ndnSIM] Assert in TypeId::LookupByName: error. Could not find the class.

Anil Jangam anilj.mailing at gmail.com
Sun Mar 1 18:43:50 PST 2015


Hi,

When we are using AppHelper to install applications on a ndn Node, which
application classes are supported and how?

For example, in one example code, following few lines installs a Consumer
application on the ndn node.

 86   ndn::AppHelper consumerHelper ("ns3::ndn::ConsumerCbr");
 87   consumerHelper.SetPrefix (prefix);
 89   consumerHelper.Install (consumerNodes);


However, I do not see how the ndn-consumer-cbr.h/.cc files are getting
compiled?

I am trying to add a new type of application by defining its own class. I
think I have coded it right (e.g. TypeId method, and
calling NS_LOG_COMPONENT_DEFINE
("ndn.SampleApp"), NS_OBJECT_ENSURE_REGISTERED (SampleApp); macros.

 28 TypeId
 29 SampleApp::GetTypeId (void)
 30 {
 31   static TypeId tid = TypeId ("ns3::ndn::SampleApp")
 32     .SetGroupName ("Ndn")
 33     .SetParent<App> ()
 34     .AddConstructor<SampleApp> ()
 35   ;
 36   return tid;
 37 }


But I consistently get the below error.

assert failed. cond="uid != 0", msg="Assert in TypeId::LookupByName:
ns3::ndn::SampleApp not found", file=../src/core/model/type-id.cc, line=539
terminate called without an active exception


Do we have include this file into (which?) any of the wscript to be able to
compile it?

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


More information about the ndnSIM mailing list