Does setting length of WSM via setWsmLength
or adding a large payload via setWsmData
makes any difference during simulation? I am trying to simulate a heavily used network, but changing any of those two values doesn't seem to make any difference. I found this, but wanted to confirm this. And If I wanted to change the size of the WSM do I have to implement it?
Changing WSM(WAVE Short Message) packet size in Veins
1.5k views Asked by AudioBubble At
2
There are 2 answers
0
On
I know it is decades later, but maybe it can help some new vanets lovers like me.
In omnet++5.4.1 and Veins 4.7.1, in the function
populateWSM()
defined in BaseWaveApplLayer.cc (veins/modules/application/ieee80211p), you can set the bit length with the
wsm->setBitLength()
method and it changes the size of the wsm packet. By default, it has the length of the header
wsm->setBitLength(headerLength)
I have played with this and could obtain different packet sizes.
Hope this is useful.
You can implement a packet for your application in a
.msg
file as follows:Then in your code you can use the built-in
setByteLength()
. Use cPacket subclass for your messages because:Related Q&A which shows the casting from
cMessage
tocPacket
.