Reputation: 265
I want to animate a node receiving messages from three different nodes in OMNET++. Right now the nodes send in a sequential manner. But, I want the nodes to send messages to the root node simultaneously. Root node is occupied with an array of input gates. Is it possible in Omnet?
Upvotes: 1
Views: 3543
Reputation: 1
You have to define parameter id in ned file. In initialize set the condition if(getIndex==id)
, send the message. Same message will be send to the node simultaneously.
Upvotes: -1
Reputation: 71
You can configure the 3 nodes to send the messages at the same time by scheduling messages to be sent at the same time using the scheduleAt() function. The simulation will always show that they are transmitted sequentially, but check the T (event time) value in the simulation window. If the T value is the same every time any of the 3 messages are being sent, it means they are sent simultaneously.
The messages arriving to the root node can't be processed at the same time. Every node, including the root node, implements the handleMessage() function which will analyze each incoming message individually.
I hope this is the answer you were looking for.
Upvotes: 2