omnet++ - 运行模拟时复合模块中的 Ned 语法错误。意外之门
问题描述
这是实现网络层的基本模型 - 表现得像一个交换机。
我在第 37 行遇到错误。控制台打印Ned Syntax Error
OMNeT++ IDE 告诉我:syntax error, unexpected GATES, expecting '}' - NED Syntax Problem
我不明白为什么我会收到此错误,也不知道如何修复它。
import inet.linklayer.ieee802154.Ieee802154Mac;
import inet.physicallayer.ieee802154.bitlevel.Ieee802154UwbIrRadio;
// Module to hold application down to Mac layers.
module Node
{
submodules:
Communication: Ieee802154UwbIrRadio;
Link: Ieee802154Mac;
Net: BroadcastRouting;
connections:
radioIn --> Communicataion.radioIn;
Communication.upperLayerOut --> Link.lowerLayerIn;
Communication.upperLayerIn <-- Link.lowerLayerOut;
Link.upperLayerOut --> Net.fromMac;
Link.upperLayerIn <-- Net.toMac;
gates: //Error on this line
input radioIn;
}
//Module to provide coarse routing
simple BroadcastRouting
{
gates:
input fromMac;
output toMac;
}
如果相关,则此模块包含在具有 3 个它的实例和 1 个 radiomedium 实例的网络中。
解决方案
移动这两行
gates: //Error on this line
input radioIn;
之前submodules:
。
推荐阅读
- python - 如何在python中检查回文?
- node.js - 示例 NodeJS 和 Wordcloud
- c - 如何按用户请求删除 proc 条目?
- c# - 在 Visual Studio 中为 MSIX 打包设置桌面应用程序时出错
- python - 尝试将表单添加到 DetailView
- python-3.x - Groupby 列值并根据另一列值保留行
- kotlin - 通过 Kotlin 实现 PyTorch 和 DJL 之间的推理差异
- c# - MVVM DataGrid ComboBox SelectedValue 绑定
- sql - 来自 IFS 的 System i SQL 流文件
- php - 我无法使我的 .htaccess 文件与 MAMP 一起使用