问题
I don't know how this question will sound like but I'm this is the best place to ask anything about science.
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.
回答1:
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.
来源:https://stackoverflow.com/questions/42893578/can-i-create-omnet-cc-source-file-for-inet-module-standaredhost-or-any-module