Identifying the source of an InterferenceHelper::Event

132 views
Skip to first unread message

Varun Reddy

unread,
Sep 21, 2017, 11:27:38 AM9/21/17
to ns-3-users
Hi everyone,

The class InterferenceHelper models interference calculations for all the received packets. My question is - is it possible to identify the node at which the interference is occurring? I ran a backtrace in the method -  struct InterferenceHelper::SnrPer InterferenceHelper::CalculatePlcpPayloadSnrPer (Ptr<InterferenceHelper::Event> event) in src/wifi/model/interference-helper.cc

#0  ns3::InterferenceHelper::
CalculatePlcpPayloadSnrPer (this=0xeda630, event=...) at ../src/wifi/model/interference-helper.cc:846
#1  0x00007ffff65a7275 in ns3::WifiPhy::EndReceive (this=0xeda610, packet=..., preamble=ns3::WIFI_PREAMBLE_LONG, mpdutype=ns3::NORMAL_MPDU,
   
event=...) at ../src/wifi/model/wifi-phy.cc:2556
#2  0x00007ffff65b81a9 in ns3::EventImpl* ns3::MakeEvent<void (ns3::WifiPhy::*)(ns3::Ptr<ns3::Packet>, ns3::WifiPreamble, ns3::MpduType, ns3::Ptr<ns3::InterferenceHelper::Event>), ns3::WifiPhy*, ns3::Ptr<ns3::Packet>, ns3::WifiPreamble, ns3::MpduType, ns3::Ptr<ns3::InterferenceHelper::Event> >(void (ns3::WifiPhy::*)(ns3::Ptr<ns3::Packet>, ns3::WifiPreamble, ns3::MpduType, ns3::Ptr<ns3::InterferenceHelper::Event>), ns3::WifiPhy*, ns3::Ptr<ns3::Packet>, ns3::WifiPreamble, ns3::MpduType, ns3::Ptr<ns3::InterferenceHelper::Event>)::EventMemberImpl4::Notify() (
   
this=0x21bbe70) at ./ns3/make-event.h:505
#3  0x00007fffef4ad83b in ns3::EventImpl::Invoke (this=0x21bbe70) at ../src/core/model/event-impl.cc:51
#4  0x00007fffef4b2ccb in ns3::DefaultSimulatorImpl::ProcessOneEvent (this=0xbc8a70) at ../src/core/model/default-simulator-impl.cc:149
#5  0x00007fffef4b30df in ns3::DefaultSimulatorImpl::Run (this=0xbc8a70) at ../src/core/model/default-simulator-impl.cc:202
#6  0x00007fffef4aea6f in ns3::Simulator::Run () at ../src/core/model/simulator.cc:230
#7  0x000000000059ec59 in main (argc=4, argv=0x7fffffffdd98) at ../scratch/wifi-hex-udp.cc:9394

Now, we can see that the interference and sinr calculations are being done for the packet that was received in WifiPhy::EndReceive(). How can we find out which node received this packet?

Thanks!
Varun

Rediet

unread,
Oct 4, 2017, 10:46:43 AM10/4/17
to ns-3-users
Hello Varun,

If you use Eclipse for debugging, you can dig into the WifiPhy object and get the information from it (namely through MacLow's self attribute).

Rediet

Varun Reddy

unread,
Oct 13, 2017, 2:43:33 PM10/13/17
to ns-3-users
Hi Rediet,

I didn't quite understand what you mean by the MacLow's self attribute. I use gdb for debugging, but can try to see what happens through Eclipse too.

Varun

Rediet

unread,
Oct 17, 2017, 6:23:58 AM10/17/17
to ns-3-users
Hi Varun,

I meant m_self attribute that simulates STA's MAC address.

Rediet

chaiyua...@gmail.com

unread,
Oct 3, 2018, 5:45:49 AM10/3/18
to ns-3-users
Hello Rediet,

I just have a problem of getting the ID of the interfering nodes. Do you have any idea where I can obtain this information?

Thank you very much.

Best wishes,
Yuan

在 2017年10月4日星期三 UTC+1下午3:46:43,Rediet写道:

Rediet

unread,
Oct 5, 2018, 2:18:01 AM10/5/18
to ns-3-users
Hello Yuan,

If you're using Eclipse's debugger (I'm not very comfortable with using directly gdb), you can go from InterferenceHelper to WifiPhy (using the call stack). You can then delve into WifiPhy's variables and make your way to m_self attribute of MacLow (tip: m_device->m_mac->RegularWifiMac->WifiMac->m_low->m_self). A bit of a long trip but you can then add a NS_DEBUG line that'll do it for you (with the appropriate DynamicCasts of course).

Rediet

chaiyua...@gmail.com

unread,
Oct 11, 2018, 6:02:39 AM10/11/18
to ns-3-users
Hi Rediet,

Thank you for your reply very much. I'm using Eclipse's debugger, but I'm not quite sure how to go from InterferenceHelper to WifiPhy. Could you please tell me with more details? Besides, I think the m_self is the MAC address of the device which is receiving the current packet. But I want to obtain the ID of interfering nodes which cause the interference to this current receiving device.

Really thank you for your time.

Yuan

在 2018年10月5日星期五 UTC+1上午7:18:01,Rediet写道:

Rediet

unread,
Oct 18, 2018, 9:49:15 AM10/18/18
to ns-3-users
Hello Yuan,

Sorry for the late reply; a bit busy.
When you're in debugging mode, you have the call stack that is available and since InterferenceHelper is called by WifiPhy it's quite direct.
However getting the interfering nodes ID is much more complex. You'll have to do that in WifiPhy, which has the received frame. You'll have to extract the MAC header (see how it's done in MacLow) and from it read to transmitter address (Addr2 I think).

Rediet

yuan chai

unread,
Oct 20, 2018, 4:02:45 AM10/20/18
to ns-3-...@googlegroups.com
Hello Rediet,

Thank you for your reply very much, and I’ll have a try.

Yuan

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/S-jPltoQoOE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages