tictoc11.ned文件
simple Txc11
{
parameters:
@display("i=block/routing");
gates:
input in[]; // declare in[] and out[] to be vector gates
output out[];
}
//
// Using local channel type definition to reduce the redundancy利用本地信道类型定义减少连接定义的冗余
// of connection definitions.
//和tictoc10一样
//三种channel:ned.IdealChannel ned.DelayChannel ned.DatarateChannel
network Tictoc11
{
types:
//ned.IdealChannel(理想情况下)
//ned.DelayChannel(参数delay,disabled 默认flase, =true时信道丢弃所有消息)
//ned.DatarateChannel(参数)
channel Channel extends ned.DelayChannel {
delay = 100ms;
}
submodules:
tic[6]: Txc11;
connections:
tic[0].out++ --> Channel --> tic[1].in++;
tic[0].in++ <-- Channel <-- tic[1].<