I'm using OMNeT++ to simulate a network. The messages exchanged between nodes are type integer and complex number.
How can I exchange the type of data between different nodes, because cMessage cannot accept integer and complex data.
I'm using OMNeT++ to simulate a network. The messages exchanged between nodes are type integer and complex number.
How can I exchange the type of data between different nodes, because cMessage cannot accept integer and complex data.
You can easily define custom messages with any content using
.msg
files. Take a look at the corresponding chapter in the Simulation Manual. This way you can define your "complex" type message, by adding two fields of typedouble
, named for examplere
andim
. The message compiler will generate a subclass ofcMessage
from this definition, which you can use for communication between nodes.