OMNET++:如何替换我的自定义继承模块中的 INET 4.0 子模块?

OMNET++: How to replace INET 4.0 submodules in my custom inherited module?

我有一个AdhocHost,它继承自INET 自己的AdhocHost 模块,但是,我希望用我手动开发的网络接口卡(wlan) 替换它。我该怎么做?

好的...所以在深入研究 INET 的代码后,我发现使用 typename 参数很容易实现。

我只需将以下行添加到 CustomAdhoc.ned 的参数部分:

wlan[*].typename = default("myCustomNic");