OMNeT++ ask to define module module while it is already defined

1,486 views
Skip to first unread message

Daniel Febrian Sengkey

unread,
Jul 22, 2014, 12:12:47 AM7/22/14
to omn...@googlegroups.com
Hi all,

I tried to build my own modules for my thesis research by inheriting some of available classes and modules from Veins 3a3 (my previous post was here https://groups.google.com/forum/#!topic/omnetpp/3F_hGEyO57s).

To achieve my goal, I created my own application layer module (I named it TDEWaveAppLayer) based on Veins' BaseWaveApplLayer by inheritance, so I made the C++ source and its ned file. Also, I copy the TraCIDemo11p{.cc, .h, .ned} into my project directoty, renamed them, and modify it so instead of extending BaseWaveApplLayer, I made it extending my own TDEWaveAppLayer. I also have my own car compound module which incorporate the application layer modules I made.

All my sources are located in separate directory Veins just to keep the Veins' codes clean (but I link my project is linked to Veins). While building the project, I found no problem, but when I made another project to test my modules, OMNeT++ gave me this error message:

<!> Error in module (cCompoundModule) Belajar01.node[0] (id=6) at event #2, t=0.1: Class "TraciTDE80211p" not found -- perhaps its code was not linked in, or the class wasn't registered with Register_Class(), or in the case of modules and channels, with Define_Module()/Define_Channel().

I already have Define_Module(TraciTDE80211p); in respective source file (TraciTDE80211p.cc).
So, why I keep getting this error while the module itself already defined?

Thanks in advance.
Best regards,
Daniel

Christoph Sommer

unread,
Jul 22, 2014, 3:19:49 AM7/22/14
to omn...@googlegroups.com
Daniel,

Daniel Febrian Sengkey wrote:
>> Class "TraciTDE80211p" not found -- perhaps its code was not linked in,
>> or the class wasn't registered [...]
>
> So, why I keep getting this error while the module itself already defined?

This error message has two possible reasons:
1) the code was not linked in
2) the class was not registered

You seem to have made sure that the class is registered (number 2).

Could it be that the code was not linked in? (number 1)


Best,

Christoph

--
Dr. Christoph Sommer
Distributed Embedded Systems Group
University of Paderborn, Germany
http://www.ccs-labs.org/~sommer/

Daniel Febrian Sengkey

unread,
Jul 22, 2014, 4:09:28 AM7/22/14
to omn...@googlegroups.com

Hi Dr. Sommer, thank you for your fast response.

How to check if the code already linked in or not?

Regards,
Daniel

Sent from Gmail for Android

--
You received this message because you are subscribed to the Google Groups "omnetpp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Christoph Sommer

unread,
Jul 22, 2014, 6:50:15 AM7/22/14
to omn...@googlegroups.com
Daniel Febrian Sengkey wrote:
> How to check if the code already linked in or not?
>

you should be able to get a full list of all registered classes in your
simulation by running it with the "-h classes" option.

Daniel Febrian Sengkey

unread,
Jul 24, 2014, 4:53:20 AM7/24/14
to omn...@googlegroups.com
Hi,

I ran "-h classes" against my simulation and I found that my classes are
not registered.
How to make my classes registered in the simulation if the
Define_Module() did not work?

Regards,
Daniel

Daniel Febrian Sengkey

unread,
Jul 25, 2014, 2:31:22 AM7/25/14
to omn...@googlegroups.com

I solved it by modifying the makemake option in the project properties.

Thanks,
Daniel

Sent from Gmail for Android

Javi

unread,
Aug 3, 2014, 3:28:44 AM8/3/14
to omn...@googlegroups.com
Dear Daniel, 

I've ended up in a situation similar to the one you described in your publication. Could you please elaborate a bit more on the modifications you made in the makemake options? I'd be greatly thankful.

Best, 

Javier.  

Daniel Febrian Sengkey

unread,
Aug 3, 2014, 7:24:49 AM8/3/14
to omn...@googlegroups.com
Hi Javier,

You can change the makemake option by opening your project properties, then find OMNeT++ at the left panel. Click the arrow next to it and you can find several options including the makemake option. What I did was changing the option for my src folder by marking the radio button next to Makemake in the Build frame (the upper right). When Makemake is selected then the "Options..." button will be available. Open the Makemake options by clicking respective button. The Makemake options dialogue will be opened.

At the options dialogue, in the Target tab, choose Shared Library as the target type. This should make your project as library for another projects. By the way, you can also see this configuration by opening the other frameworks (such as Veins or INET) project properties.

Regards,
Daniel

Sipra Behera

unread,
Sep 12, 2017, 2:06:10 AM9/12/17
to OMNeT++ Users
Hi Daniel,

I am also facing same error while adding the new simple module. Can u please elaborate how you run the simulation with -h classes option and how to make the class register with Register_Class().

Regards
Sipra

nithin puranik

unread,
Jan 7, 2018, 4:28:52 AM1/7/18
to OMNeT++ Users

Hello Daniel,

I am doing my master thesis similar to this and I am encountering a similar problem. I want to create my own scheduler for Veins. For this, I followed the example of sockets of omnet and I edited the TraCIConnection file present in the src folder of veins to convert it into a scheduler by inheriting cScheduler. I have included the class TraCIConnection in omnetpp.ini file. However, when I try to run the simulation, I get the following error: " Class TraCIconnection" not found -- perhaps it's code was not linked in, or the class wasn't registered with Register_Class(), or in the case of modules and channels with Define_Module()/Define_Channel(). Can you please guide me how can I resolve this problem? 

Regards,
Nithin

faezeh

unread,
Aug 21, 2019, 2:46:30 AM8/21/19
to OMNeT++ Users
Hi Deneil
where shoud I write "-h class" ?

furqan yaqub

unread,
May 11, 2020, 1:43:28 AM5/11/20
to OMNeT++ Users
plz someomne help me
file attached
Screenshot from 2020-05-11 17-07-35.png

Alfonso Ariza Quintana

unread,
May 11, 2020, 6:14:56 AM5/11/20
to OMNeT++ Users
You have two elements with the same name "sri", you can change the name to this element

De: omn...@googlegroups.com <omn...@googlegroups.com> en nombre de furqan yaqub <furka...@gmail.com>
Enviado: lunes, 11 de mayo de 2020 7:43
Para: OMNeT++ Users <omn...@googlegroups.com>
Asunto: [Omnetpp-l] Re: OMNeT++ ask to define module module while it is already defined
 
plz someomne help me
file attached

--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.

furqan yaqub

unread,
May 12, 2020, 12:15:04 AM5/12/20
to OMNeT++ Users
my system cant found erlangen
screen shot attached
Screenshot from 2020-05-12 15-41-54.png

furqan yaqub

unread,
May 12, 2020, 12:50:17 AM5/12/20
to OMNeT++ Users

gtk pro blem as well
Screenshot from 2020-05-12 16-18-14.png

furqan yaqub

unread,
May 18, 2020, 11:00:24 PM5/18/20
to OMNeT++ Users
plz some one help me plz alfonso
Reply all
Reply to author
Forward
0 new messages