riebl / artery

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

INET_API resultfilters in Artery #314

Closed Ambica2022 closed 7 months ago

Ambica2022 commented 7 months ago

Hi,

Need to use INET resultfilter i.e already available under extern/inet/src/inet/common/ResultFilters.cc in artery. How can I do this? Any clue is appreciated.Thanks in advance.

Actually I need to collect receiving power of the packets.For this have noticed a resultfilter "ReceptionMinSignalPowerFilter" as below in INET

Register_ResultFilter("receptionMinSignalPower", ReceptionMinSignalPowerFilter);

void ReceptionMinSignalPowerFilter::receiveSignal(cResultFilter prev, simtime_t_cref t, cObject object, cObject details) { if (auto reception = dynamic_cast<inet::physicallayer::FlatReceptionBase >(object)) { W minReceptionPower = reception->computeMinPower(reception->getStartTime(), reception->getEndTime()); fire(this, t, minReceptionPower.get(), details); } }

Regards, Ambica

riebl commented 7 months ago

Please refer to the OMNeT++ and INET manuals. This mechanism is not unique to Artery.