riebl / artery

OMNeT++ V2X simulation framework for ETSI ITS-G5
GNU General Public License v2.0
203 stars 131 forks source link

Data Rate based on access category #205

Closed OverwatchGirl closed 1 year ago

OverwatchGirl commented 3 years ago

Hello @riebl

I'm trying to measure the data rate of the messages sent through each access category (knowing that some messages might be dropped), but i don't know where to put exactly the function that does so, i.e, i don't know in which module/part of code the transmission of the messages really takes place.

Thank you in advance.

riebl commented 3 years ago

One option is extending InetRadioDriver::handleDataRequest.

OverwatchGirl commented 3 years ago

Hello @riebl ,

I am trying to use the setByteLength() to set the cPackets size, and i don't know where exactly i should use it ? any suggestion ?

Thank you in advance.

riebl commented 3 years ago

Just set the length where you create the packet, e.g. in your service module.

OverwatchGirl commented 3 years ago

Hello @riebl ,

Thank you for you reply.

I have another question, i am actually trying to add some needed code inside the function Radio::startTransmission(), in artery/extern/inet/src/inet/physicallayer/common/packetlevel/Radio.cc. The code that i am trying to add is between the #ifdef NS3_VALIDATION and #endif, but the code between these two # is not being run.

Any suggestions, please ?

Thank you in advance.

riebl commented 3 years ago

Well, the simplest way to enable the code between #ifdefand the corresponding #endif is to remove these two lines.

OverwatchGirl commented 3 years ago

@riebl

Thank you for your answer.

I already tried that, but i'm getting this error :

error: ‘ieee80211’ in namespace ‘inet’ does not name a type
  386 |     auto *df = dynamic_cast<inet::ieee80211::Ieee80211DataFrame *>(macFrame);

Thank you for your help.

riebl commented 3 years ago

Do not forget to remove the #ifdef in line 24 to include the Ieee80211Frame_m.h header file (and the corresponding #endif of course).

OverwatchGirl commented 3 years ago

Hello,

Thank you so much for your answer.

riebl commented 3 years ago

CaService does not use cPacket, i.e. the length of a CAM is always the length of its ASN.1 UPER encoding. See https://github.com/riebl/artery/blob/e9ad63b6e2d4f16c1d5cf1711de464ae921581d4/src/artery/application/RtcmMockService.cc#L76 for a service using cPacket and how it sets its packet's length.