In a network with 3 submodules I don't want that a message starts always in the submodule[0] for example.So I was thinking to change in the network declaration, as it follows:
simple Txc1
{
parameters:
bool sendMsgOnInit = default(false);
gates:
inout gate[ ];
}
network three_nodes
{
types:
channel Channel extends ned.DelayChannel {
delay = 100ms;
}
submodules:
tic[3]: Txc1{
parameters: tic[2].sendMsgOnInit = true;
}
connections:
tic[0].gate++ <--> Channel <--> tic[1].gate++;
tic[0].gate++ <--> Channel <--> tic[2].gate++;
tic[1].gate++ <--> Channel <--> tic[2].gate++;
}
How can I declare it properly? After that I am planning to change the index (in this case 2) to a random value.