【问题标题】:Resolving NED Path issue Veins/Omnet++解决 NED 路径问题 Veins/Omnet++
【发布时间】:2016-03-29 15:01:03
【问题描述】:

我正在研究静脉。我需要更改BaseWaveApplLayer 的默认行为。而是在文件更改中,我创建了第二个名为 MyApp 的应用程序文件。我添加了MyApp.ccMyApp.hMyApp.ned 文件。然后我复制了TraCIDemoRSU11p,并为TraCIDemoRSU11pEnhanced 添加了文件。现在在.ini 文件中,当我将*.rsu[*].applType 更改为指向“TraCIDemoRSU11pEnhanced”时。它编译得很好,但是当我尝试运行它时,会产生以下错误:

 Submodule appl: no module type named `TraCIDemo11pEnhanced' found that implements module interface org.car2x.veins.base.modules.IBaseApplLayer (not in the loaded NED files?).

MyApp.ned 文件中,它被声明为IBaseApplLayer 类型。我尝试在ini文件中设置ned-path参数,没有解决问题。在静脉项目属性中,检查了 NED 源文件夹。我是否必须在某处为新创建的应用程序文件添加 ned 路径?

【问题讨论】:

  • 检查 NED 路径是否设置正确——您粘贴的错误之前的输出应该告诉您 OMNeT++ 认为 NED 文件应该在哪里。还要确保.ned 文件在文件中包含正确的路径和名称(您是否将模块重命名为 TraCIDemoRSU11pEnhanced?)。
  • @RensvanderHeijden 我确实检查过。它说的是Loading NED files from .: 1 Loading NED files from ../../src/veins: 32 Loading NED files from /home/path/veins-4a2/examples/veins: 1。这些文件位于 /src/veins。实际上TraCIDemoRSU11pEnhancedTraCIDemoRSU11p 在同一个文件夹中。我仔细检查了它,名字检查出来了。我没有重命名原始模块,我在此名称下创建了另一个扩展 MyApp 的文件。
  • 您准备的复制NED模块的确切名称是什么:TraCIDemoRSU11pEnhancedTraCIDemo11pEnhanced?因为您提到了TraCIDemoRSU11pEnhanced,但错误中是TraCIDemo11pEnhanced

标签: simulation omnet++ veins


【解决方案1】:

尝试使用 cookiecutter 包 (https://veins.car2x.org/tutorial/#newprojects) 创建使用静脉而不是复制和粘贴文件的新应用程序: 使用 pip 安装包 (https://github.com/cookiecutter/cookiecutter) 然后按照(https://github.com/veins/cookiecutter-veins-project/blob/master/README.md)中的步骤创建新项目;按照出现的提示进行操作。 这将创建一个使用 Veins 的新项目,并拥有应用层相关文件供您根据您的应用进行更新而不会出现错误。

【讨论】:

    猜你喜欢
    • 2019-10-24
    • 2018-12-09
    • 2022-01-23
    • 1970-01-01
    • 2020-04-10
    • 1970-01-01
    • 2017-04-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多