0

I'm doing a research for the VANET network for my master thesis. I'm using OMNET++, SUMO and VEINS, for the evaluation of the performance in a scenario of car accident. For the moment I want to generate some results for the received power, signal to noise ratio, bit-rate and packet collision, based on three types of antenna's. From the results that I'm taking from the .sca file doesn't show those parameters. I have done some modifications in the source codes, but with no results!

So I wanted to ask you, is there any possibility to generate the results of those parameters and if yes can you help or guide me telling in quick steps how to do it well (modifying the source code or something else)?

SecretAgentMan
  • 2,856
  • 7
  • 21
  • 41
Albin Zh.
  • 3
  • 2
  • I have made some modifications in the source code as follows: I declared cOutVector recvPower_dBm in the file mac1609_4.h. Than I set the name of the vector in the file mac1609_4.cc. In the same file I added some code: void Mac1609_4::handleLowerMsg(cMessage* msg) { power = (DeciderResult80211*)((PhyToMacControlInfo*)msg->getControlInfo())->getDeciderResult()->getRecvPower_dBm(); recvPower_dBm.record(power); But it generates errors: 1. use of undeclared identifier 'power'; 2. no member named 'getRecvPower_dBm' in 'DeciderResult'. Can anyone tell me what can the problem be? – Albin Zh. Dec 05 '19 at 15:15

2 Answers2

0

Hi you can take a look at omnetpp tutorial 5 https://docs.omnetpp.org/tutorials/tictoc/part5/#52-adding-statistics-collection. This should provide you the basics for scalar and vector file analysis.

0

To all of you that want to know, here is the overall solution: The MAC layer extracts some control info received from the physical layer [1]; This control info (received power, snr, etc) is given in [2]; We must modify the Mac1609_4.cc to such data as vectors (results in the .vec file) [3]; [1] https://github.com/sommer/veins/blob/master/src/veins/modules/mac/ieee80211p/Mac1609_4.cc#L558 [2] https://github.com/sommer/veins/blob/master/src/veins/modules/phy/DeciderResult80211.h [3] https://doc.omnetpp.org/omnetpp/manual/#sec:sim-lib:coutvector Next in the Mac1609_4.h add the vector: cOutVector recvPower_dBm; Now in Mac1609_4.cc add the following:

double power;
power = ((DeciderResult80211*)msg->getControlInfo())->getRecvPower_dBm();
recvPower_dBm.record(power);

This should help to record the parameters that you want!

Albin Zh.
  • 3
  • 2