Reputation: 27
I want to send a message as soon as the vehicle starts. For this I am using the self-message technique. I send a self-message and in the handleMessage
method after receiving the self-message I send the WaveShortMessage
which I want to send.
Is this the correct way to send the message?
Also I want to know the difference between a cMessage and a WaveShortMessage
.
Upvotes: 0
Views: 349
Reputation: 1821
Yes, this is the correct way of doing it as you can see for example in BaseWaveApplLayer
.
A cMessage
is OMNeT++' base class for messages whereas a WaveShortMessage
is a special message type for the WAVE-Stack which inherits from cMessage
when the corresponding header file is generated.
Upvotes: 1