0

I am conducting experiments for vehicular networks using VEINS. One of my objectives is to obtain the size of the message generated by the protocol. After checking the message, I noticed that the size was fixed at 42 Bytes.

how can I obtain the size of the message generated by the protocol?

Thank you for your help.

Cleber
  • 23
  • 3

1 Answers1

0

I assume that your messages extend omnetpp::cPacket class. In that case you may use getByteLength() method. Otherwise you have to implement a field in your message, which holds a payload size and then read it.

gehirndienst
  • 424
  • 2
  • 13