如何在OMNet ++中将模块与其他模块或简单模块连接

时间:2017-02-10 19:39:02

标签: omnet++

你能告诉我如何将模块与omnet ++中的其他模块或简单模块连接起来,例如我有这个模块

module R
{
    parameters:
        @display("bgb=151,47,white;i=device/palm;b=40,40,rect");
    gates:
        input in;
}

这是简单的模块

simple sender
{
    gates:
        output out;
        output out1;
        input in;
}

并且还有两个相同的,最后是我的连接

connections:
  s.out --> r.in;
  s.out1 --> r1.in;// s is the simple module and r1 is the module
  r.out1 --> s1.in;
  r.out --> s.in;
}

但是当我开始模拟时,OMNet ++给我一个错误,说模块r1的输入门没有连接任何模块或简单模块。这是我的问题,所以如果你有帮助请告诉我。谢谢

1 个答案:

答案 0 :(得分:0)

R被定义为'化合物'模块,这意味着它必须具有连接到其门的内部子模块。 R - 如目前所定义的那样 - 是空的,所以当某些东西到达其中时会发生什么。门?复合模块上的所有门必须连接在外部和内部。

相关问题