我可以为INET模块StandaredHost或任何模块创建omnet ++ cc源文件吗 [英] Can I create omnet++ cc source file for INET module StandaredHost or any module
问题描述
我不知道这个问题听起来如何,但是我是问科学的最佳场所.
I don't know how this question will sound like but I'm this is the best place to ask anything about science.
我正在尝试为INET模版创建cc omnet ++源文件.就像我们在简单模块中所做的一样,我们使用cSimpleModule简单继承该类,然后提供Initialize和handleMessage方法的实现.我尝试创建一个cc源文件,然后由StandaredHost继承它,并声明这两个方法initialize和handleMessge,但均不起作用.
I am trying to create a cc omnet++ source file for INET modues. Like we do in simple module, we simple inherit that class with cSimpleModule and then we give implementation of Initialize and handleMessage methods. I tried creating a cc source file and then inherit it by StandaredHost and declared the both methods initialize and handleMessge, but it is not working.
我想知道这样做的正确方法.
I want to know the proper way of doing so.
我想要实现的是,当我可以探查消息,安排消息,应用其他排队算法(如我们做简单的模块)时,我想为每个模块制作一个源文件.
What I want to achieve is that I want to make a source file for each module when I can probe message, schedule it, apply other queuing algorithms like we do simple modules.
推荐答案
StandardHost
是简单模块.在OMNeT++
中,行为仅针对简单模块定义.因此,不能为复合模块定义C ++类.
StandardHost
from INET
is a compound module. Usually compound module includes simple modules. In OMNeT++
behavior is defined only for simple modules. So one cannot define a C++ classes for a compound module.
这篇关于我可以为INET模块StandaredHost或任何模块创建omnet ++ cc源文件吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!