这是一个
基本模型,可以实现网络层 - 表现得像一个开关。
我在第 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 个无线电介质实例的网络中。
移动这两行
gates: //Error on this line
input radioIn;
在submodules:
之前.