在omnetpp中定义模块时出现问题 [英] Problem in defining a module in omnetpp
问题描述
您好
我在omnet编写一个项目,但我坚持定义我自己的模块。在 https://github.com/lbedogni/Basic-Broadcast-Simulation 上,有完整代码。问题是,我得到以下错误消息:
Hi I'm writing a project in omnet, but I'm stuck on defining my own module. On https://github.com/lbedogni/Basic-Broadcast-Simulation there is the full code. The problem is that i get the following error message:
<!> Error in module (cCompoundModule) scenario.host[0] (id=4) at event
\#1, t=0: Class "basic::Flooding" 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().
$ b < 。
But I defined it via Define_Module()
.
我认为这可能是一个包相关的问题,但没有找到解决方案。任何想法?
I think it could possibly be a package related problem, but didn't find a solution. Any idea?
感谢
推荐答案
,但来自package.ned
I am not familiar with it, but from package.ned
//指定此文件夹的NED包
package basic;
// designate the NED package of this folder package basic;
//模块C ++类的命名空间
@namespace(basic);
// namespace of module C++ classes @namespace(basic);
@license(LGPL);
@license(LGPL);
你需要在命名空间基本中我想?
you need to be in namespace basic I guess?
你的泛型类没有在命名空间basic中定义?
And you flooding class is not defined within namespace basic?
这篇关于在omnetpp中定义模块时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!