void
771 YansWifiPhy::EndReceive (Ptr<Packet> packet, Ptr<InterferenceHelper::Event> event)
773 NS_LOG_FUNCTION (this << packet << event);
774 NS_ASSERT (IsStateRx ());
775 NS_ASSERT (event->GetEndTime () == Simulator::Now ());
777 struct InterferenceHelper::SnrPer snrPer;
778 snrPer = m_interference.CalculateSnrPer (event);
779 m_interference.NotifyRxEnd ();
781 NS_LOG_DEBUG ("mode=" << (event->GetPayloadMode ().GetDataRate ()) <<
782 ", snr=" << snrPer.snr << ", per=" << snrPer.per << ", size=" << packet->GetSize ());
783 if (m_random.GetValue () > snrPer.per)
785 NotifyRxEnd (packet);
786 uint32_t dataRate500KbpsUnits = event->GetPayloadMode ().GetDataRate () / 500000;
787 bool isShortPreamble = (WIFI_PREAMBLE_SHORT == event->GetPreambleType ());
788 double signalDbm = RatioToDb (event->GetRxPowerW ()) + 30;
789 double noiseDbm = RatioToDb (event->GetRxPowerW () / snrPer.snr) - GetRxNoiseFigure () + 30;
790 NotifyMonitorSniffRx (packet, (uint16_t)GetChannelFrequencyMhz (), GetChannelNumber (), dataRate500KbpsUnits, isShortPreamble, signalDbm, noiseDbm);
791 m_state->SwitchFromRxEndOk (packet, snrPer.snr, event->GetPayloadMode (), event->GetPreambleType ());
796 NotifyRxDrop (packet);
797 m_state->SwitchFromRxEndError (packet, snrPer.snr);
if you want to get the s or n or i, you can have a look at the YansWifiPhy.cc/.h.
m_interference is a complex class depending on the wifiphy. so i think you can only get it in the source code in the yanswifiphy.cc