signetlabdei / lorawan

An ns-3 module for simulation of LoRaWAN networks
GNU General Public License v2.0
190 stars 132 forks source link

question regarding InterferenceCallback #95

Closed shobhitaggarwal92 closed 3 years ago

shobhitaggarwal92 commented 4 years ago

Hello, I have a question regarding the InterferenceCallback. The method gives back the number of packets interfered with on the gateway from all the devices.

I have created two device containers for 2 types of end devices (one for sf=7 and another for sf=8). I want to get just the number of interfered packets from sf=8 devices. Is this possible?

Can you please help me or walk me through what function or which file to modify to get what I am looking for.

Thanks Shobhit

DvdMgr commented 4 years ago

Hi! If you haven't modified it, the InterferenceCallback should actually return the gateway that is reporting the failure to receive the packet, not the number of packets.

I'm not sure I understand your question - are you interested in counting the number of packets using SF8 that suffered interference, or the number of packets that were lost because of interference from a packet using SF8?

shobhitaggarwal92 commented 4 years ago

Thanks for the prompt reply.

For now I am interested in counting number of packets using sf=8 that are lost due to interference.

In future I may need to count the the number of packets that were lost because of interference from a packet using SF8.

I will really appreciate if you can walk me through both.

DvdMgr commented 3 years ago

In this case, you can connect to the LoraPhy::LostPacketBecauseInterference trace source of the GW node: that way, your callback will be called every time a packet is lost because of interference, and you only need to check its Spreading Factor to see whether it's 8 or not.

DvdMgr commented 3 years ago

Closing because of inactivity.