运行仿真时复合模块中的 ned 语法错误.意想不到的盖茨


这是一个

基本模型,可以实现网络层 - 表现得像一个开关。

我在第 37 行收到错误。控制台打印Ned Syntax ErrorOMNeT++ 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 个无线电介质实例的网络中。

移动这两行

gates: //Error on this line
    input radioIn;

submodules:之前.

最新更新