Search code examples
wifins-3

Enabling trace files in wifi, NS3


How do I enable trace files using WifiHelper in NS3 something similar to its lte equivalnt of:

LteHelper lteHelper->EnableTraces();

I am particularly interested in the SINR information.


Solution

  • You can call any of the functions defined in trace-helper.h. I would recommend one from the pcap family that generates information which can be read with wireshark: signalDbm and noiseDb, both of which are defined in the code in src/wifi/core/yans-wifi-phy.cc:YansWifiPhy::EndReceive

    double signalDbm = RatioToDb (event->GetRxPowerW ()) + 30;
    double noiseDbm = RatioToDb (event->GetRxPowerW () / snrPer.snr) - GetRxNoiseFigure () + 30;