Rohit Tapikar
Rohit Tapikar

Reputation: 27

Regarding Messages in Veins

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

Answers (1)

Julian Heinovski
Julian Heinovski

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

Related Questions