signetlabdei / lorawan

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

Packet Error rate at End Device level. #36

Closed kaustubhshrotri closed 4 years ago

kaustubhshrotri commented 5 years ago

Hello Group,

I am new to this LoRaWAN simulator tool/Module. Please guide me on how can I approach to create a method for calculation of packet error rate at end device level.

Prapi123 commented 5 years ago

I am working on the similar topic. On the adr branch you can look for lora-helper files. There is a method called GetPacketTracker(), which returns pointer to m_packettracker. The packet tracker also has sender id. which can help to identify sending end nodes. I started off with this.

kaustubhshrotri commented 5 years ago

Hello,

My code is below to access m_packetracker

LoraHelper helper = LoraHelper (); LoraPacketTracker& packettracker = helper.GetPacketTracker();
for (auto itPhy = packettracker.begin (); itPhy != packettracker.end (); ++itPhy) { NS_LOG_INFO("Packet: " << itPhy); }

I want to access the packet in m_packetracker to get information of the packet.

I receive the error shown in picture

Packeterror

@DvdMgr

DvdMgr commented 5 years ago

It looks like you are trying to access the packet tracker as it were a vector: instead, you should treat it as an object, which exposes the methods defined in the lora-packet-tracker.h file!

kaustubhshrotri commented 4 years ago

This Issue has been resolved. You can close the issue.

Prapi123 commented 4 years ago

The issue is resolved