2017-02-10 21 views
0

你能告诉我如何连接与其它模块或单模模块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的输入门不与任何模块或简单模块连接。这是我的问题,所以如果你有帮助,请告诉我。谢谢

回答

0

R被定义为一个“复合”模块,这意味着它必须有内部子模块连接到它的门。当前定义的R是空的,所以当有东西到达它的'入口'时应该发生什么?复合模块上的所有门必须连接外部和内部。

+0

哦!!,那真的很棒,你帮了我很多Rudi先生,非常感谢。 Rudi先生,如果我在使用OMNet ++和C++时遇到问题,我可否在未来请求您的帮助?当然,如果我不打扰您的话,先生。 –